* *.c (*): initialize lock_arg to a copy of a static
authorMark Eichin <eichin@mit.edu>
Thu, 16 Nov 1995 03:08:18 +0000 (03:08 +0000)
committerMark Eichin <eichin@mit.edu>
Thu, 16 Nov 1995 03:08:18 +0000 (03:08 +0000)
commitaa9faf302a09736947dd70b0b05d4fcbb06c37b9
tree3bcd696cb885af9eda56e15823ff674f0f24d4fb
parent1b24d5b626e4999085efdfec6b32033fb09dab07
* *.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
src/appl/popper/ChangeLog
src/appl/popper/pop_dropcopy.c
src/appl/popper/pop_updt.c
src/lib/kdb4/ChangeLog
src/lib/kdb4/krb_dbm.c
src/lib/krb4/ChangeLog
src/lib/krb4/tf_util.c
src/lib/krb5/ccache/file/ChangeLog
src/lib/krb5/ccache/file/fcc_maybe.c
src/lib/krb5/os/ChangeLog
src/lib/krb5/os/lock_file.c