Do not check *aoutSize in PGetPAG
authorAndrew Deason <adeason@sinenomine.net>
Wed, 11 Nov 2009 16:51:19 +0000 (10:51 -0600)
committerDerrick Brashear <shadow|account-1000005@unknown>
Wed, 11 Nov 2009 17:38:05 +0000 (09:38 -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.

Change-Id: Ibed16b35ea14237f44a494add8c7a4a48e0c2b71
Reviewed-on: http://gerrit.openafs.org/814
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/afs_pioctl.c

index 467b381..a16388e 100644 (file)
@@ -2342,18 +2342,12 @@ DECL_PIOCTL(PViceAccess)
  * \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));