summaryrefslogtreecommitdiffstats
path: root/src/appl
diff options
context:
space:
mode:
authorMark Eichin <eichin@mit.edu>1995-11-16 03:08:18 +0000
committerMark Eichin <eichin@mit.edu>1995-11-16 03:08:18 +0000
commitaa9faf302a09736947dd70b0b05d4fcbb06c37b9 (patch)
tree3bcd696cb885af9eda56e15823ff674f0f24d4fb /src/appl
parent1b24d5b626e4999085efdfec6b32033fb09dab07 (diff)
* *.c (*): initialize lock_arg to a copy of a static
(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
Diffstat (limited to 'src/appl')
-rw-r--r--src/appl/popper/ChangeLog9
-rw-r--r--src/appl/popper/pop_dropcopy.c3
-rw-r--r--src/appl/popper/pop_updt.c3
3 files changed, 15 insertions, 0 deletions
diff --git a/src/appl/popper/ChangeLog b/src/appl/popper/ChangeLog
index f32e06e78..bd9885fd0 100644
--- a/src/appl/popper/ChangeLog
+++ b/src/appl/popper/ChangeLog
@@ -6,6 +6,15 @@ Fri Jul 7 15:44:56 EDT 1995 Paul Park (pjpark@mit.edu)
* 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
diff --git a/src/appl/popper/pop_dropcopy.c b/src/appl/popper/pop_dropcopy.c
index 130989bb4..e745db902 100644
--- a/src/appl/popper/pop_dropcopy.c
+++ b/src/appl/popper/pop_dropcopy.c
@@ -46,7 +46,10 @@ struct passwd * pwp;
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 */
diff --git a/src/appl/popper/pop_updt.c b/src/appl/popper/pop_updt.c
index 306f6707f..190279342 100644
--- a/src/appl/popper/pop_updt.c
+++ b/src/appl/popper/pop_updt.c
@@ -55,7 +55,10 @@ POP * p;
int begun; /* Sanity check */
#ifdef POSIX_FILE_LOCKS
+ static struct flock flock_zero;
struct flock lock_arg;
+
+ lock_arg = flock_zero;
#endif
#ifdef DEBUG