libafs: do not allow NULL creds for afs_CreateReq
authorMichael Meffie <mmeffie@sinenomine.net>
Mon, 28 Jul 2014 21:27:40 +0000 (17:27 -0400)
committerD Brashear <shadow@your-file-system.com>
Wed, 6 Aug 2014 14:19:08 +0000 (10:19 -0400)
commitb7f1763652fb932ca5bd3f3351a48df11e58f2dc
tree3a009301bd8918db588f853e718aac53979921f6
parenteb5102e998d09466c5169eabe96d3e1ed1919d17
libafs: do not allow NULL creds for afs_CreateReq

Do not allow callers to pass a NULL cred to afs_CreateReq.  This
avoids setting the uid of zero in the vrequest when no cred is
passed.  Update callers to pass afs_osi_credp for an anonymous cred
when no cred is available.

Thanks to Andrew Deason for pointing out afs_osi_credp should be
used.

Change-Id: I05f694026ec72ab701160d9920e47c16cda46cd7
Reviewed-on: http://gerrit.openafs.org/11336
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
src/afs/afs_osi_pag.c
src/afs/afs_osi_vget.c
src/afs/afs_vcache.c