]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Do not check *aoutSize in PGetPAG
authorAndrew Deason <adeason@sinenomine.net>
Wed, 11 Nov 2009 16:51:19 +0000 (10:51 -0600)
committerRuss Allbery <rra@debian.org>
Mon, 30 Nov 2009 22:50:36 +0000 (14:50 -0800)
*aoutSize is always zero in pioctls, since afs_HandlePioctl handles
checking the output buffer size, and sets outSize to 0 before calling
the pioctl. So, PGetPAG was always returning E2BIG; remove the check to
make it work.

Reviewed-on: http://gerrit.openafs.org/814
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 97d3fcfcd1617bafa6ee62d291f09b2e8bb6daf7)

Change-Id: Icc401904c26027e235ec869e834297861a640d39
Reviewed-on: http://gerrit.openafs.org/816
Reviewed-by: Dan Hyde <drh@umich.edu>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs_pioctl.c

index dbb2c596d9102e35e74a4cc5d4d088e88093cb68..e01951f927ece26cc40bb06d196ebc8983b7e961 100644 (file)
@@ -3877,18 +3877,12 @@ DECL_PIOCTL(PNewUuid)
  * \param[in] ain      not in use
  * \param[out] aout    PAG value or NOPAG
  *
- * \retval E2BIG       Error not enough space to copy out value
- *
  * \post get PAG value for the caller's cred
  */
 DECL_PIOCTL(PGetPAG)
 {
     afs_int32 pag;
 
-    if (*aoutSize < sizeof(afs_int32)) {
-       return E2BIG;
-    }
-
     pag = PagInCred(*acred);
 
     memcpy(aout, (char *)&pag, sizeof(afs_int32));