(thus zero) struct flock, to avoid panic'ing sunos 4.1.4.
If you call fcntl F_SETLKW with l_type == F_UNLCK and l_xxx == 15
(GRANT_LOCK_FLAG) you'll panic sunos 4.1.4 with
assertion failed: ld->l_xxx != GRANT_LOCK_FLAG, file: ../../ufs/ufs_lockf.c, line: 995
Since automatic structs like these have random values in uninitialized
fields, we initialize from a static struct (since using memset in this
case is abhorrent, and naming l_xxx is non POSIX.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7109
dc483132-0cff-0310-8789-
dd5450dbe970
* Makefile.in - Remove all explicit library handling.
* configure.in - add USE_KADM_LIBRARY and KRB5_LIBRARIES.
+Wed Nov 15 20:36:33 1995 Mark Eichin <eichin@cygnus.com>
+
+ * pop_updt.c (pop_updt): initialize lock_arg to a copy of a static
+ (thus zero) struct flock, to avoid panic'ing sunos 4.1.4.
+
+Wed Nov 15 20:35:19 1995 Mark Eichin <eichin@cygnus.com>
+
+ * pop_dropcopy.c (pop_dropcopy): initialize lock_arg to a copy of
+ a static (thus zero) struct flock, to avoid panic'ing sunos 4.1.4.
Thu Jun 15 17:38:06 EDT 1995 Paul Park (pjpark@mit.edu)
* Makefile.in - Change explicit library names to -l<lib> form, and
off_t offset; /* Old/New boundary */
int nchar; /* Bytes written/read */
#ifdef POSIX_FILE_LOCKS
+ static struct flock flock_zero;
struct flock lock_arg;
+
+ lock_arg = flock_zero;
#endif
/* Create a temporary maildrop into which to copy the updated maildrop */
int begun; /* Sanity check */
#ifdef POSIX_FILE_LOCKS
+ static struct flock flock_zero;
struct flock lock_arg;
+
+ lock_arg = flock_zero;
#endif
#ifdef DEBUG
+Wed Nov 15 20:37:30 1995 Mark Eichin <eichin@cygnus.com>
+
+ * krb_dbm.c (kerb_dbl_lock): initialize f to a copy of a static
+ (thus zero) struct flock, to avoid panic'ing sunos 4.1.4.
+ (kerb_dbl_unlocK): ditto.
Thu Jun 15 18:06:24 EDT 1995 Paul Park (pjpark@mit.edu)
* configure.in - Create symlink for archive when we build it.
int mode;
{
#ifdef POSIX_FILE_LOCKS
+ static struct flock flock_zero;
struct flock f;
int rv;
+
+ f = flock_zero;
#else
int flock_mode;
#endif
static void kerb_dbl_unlock()
{
#ifdef POSIX_FILE_LOCKS
+ static struct flock flock_zero;
struct flock f;
+
+ f = flock_zero;
#endif
if (!mylock) { /* lock already unlocked */
+Wed Nov 15 20:38:38 1995 Mark Eichin <eichin@cygnus.com>
+
+ * tf_util.c (emul_flock): initialize f to a copy of a static
+ (thus zero) struct flock, to avoid panic'ing sunos 4.1.4.
+
Sun Nov 12 05:26:08 1995 Mark W. Eichin <eichin@cygnus.com>
* g_cnffile.c (krb__get_srvtabname): new function, looks up
int emul_flock(fd, cmd)
int fd, cmd;
{
+ static struct flock flock_zero;
struct flock f;
+ f = flock_zero;
+
memset(&f, 0, sizeof (f));
if (cmd & LOCK_UN)
* fcc_gennew.c conditons for HAS_MACSOCK_H and THREEPARAMOPEN
* fcc_maybe.c conditons for HAS_MACSOCK_H
+Wed Nov 15 20:39:18 1995 Mark Eichin <eichin@cygnus.com>
+
+ * fcc_maybe.c (fcc_lock_file_posix): initialize lock_arg to a copy
+ of a static (thus zero) struct flock, to avoid panic'ing sunos
+ 4.1.4.
+
Wed Jun 14 23:54:09 1995 Theodore Y. Ts'o (tytso@dcl)
* fcc_errs.c (krb5_fcc_interpret): Add #ifdef around switch
int lock_cmd = F_SETLKW;
struct flock lock_arg;
+ static struct flock flock_zero;
+
+ lock_arg = flock_zero;
#define lock_flag lock_arg.l_type
lock_flag = -1;
+Wed Nov 15 20:40:03 1995 Mark Eichin <eichin@cygnus.com>
+
+ * lock_file.c (krb5_lock_file): initialize lock_arg to a copy of a
+ static (thus zero) struct flock, to avoid panic'ing sunos 4.1.4.
+
Sun Nov 12 05:31:21 1995 Mark W. Eichin <eichin@cygnus.com>
* def_realm.c (krb5_get_default_realm): check for PROF_NO_PROFILE
{
#ifdef POSIX_FILE_LOCKS
int lock_cmd = F_SETLKW;
+ static struct flock flock_zero;
struct flock lock_arg;
+ lock_arg = flock_zero;
#define lock_flag lock_arg.l_type
lock_flag = -1;
#else