From: Andrew Deason Date: Wed, 11 Nov 2009 16:51:19 +0000 (-0600) Subject: Do not check *aoutSize in PGetPAG X-Git-Tag: debian/1.4.11+dfsg-6~16 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b96e29618fadaf449817223010e9770e95f23e8b;p=packages%2Fo%2Fopenafs.git Do not check *aoutSize in PGetPAG *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 Tested-by: Derrick Brashear (cherry picked from commit 97d3fcfcd1617bafa6ee62d291f09b2e8bb6daf7) Change-Id: Icc401904c26027e235ec869e834297861a640d39 Reviewed-on: http://gerrit.openafs.org/816 Reviewed-by: Dan Hyde Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index dbb2c596d..e01951f92 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -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));