]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Fix input size computation in SetSPrefs pioctl
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 19 Sep 2011 14:35:11 +0000 (10:35 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Fri, 7 Oct 2011 22:32:32 +0000 (15:32 -0700)
Patchset 718f85a8b69a78ac77beb5c8471af20657be2a53 contained
a small typo that prevents the SetSPrefs pioctl processing from
functioning in all cases.  fs setserverprefs continues to work
for non-DB preference lists because fs.c pokeServers() attempts
to try the old SetSPrefs33 pioctl in the non-DB server case.

Reviewed-on: http://gerrit.openafs.org/5465
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 552d59186b135af55eeaa6136a9cbb8965dd2f04)

Change-Id: I2226334c558bdc4d24e17d32751154f99f2a53a6
Reviewed-on: http://gerrit.openafs.org/5566
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
src/afs/afs_pioctl.c

index 4edeadac05a32f1a8c5968bd84661c7f0c8d82ae..5ffb36626bf28392065f13467d728085bf9fcae3 100644 (file)
@@ -3949,7 +3949,7 @@ DECL_PIOCTL(PSetSPrefs)
 
     ssp = (struct setspref *)ainPtr;
     if (ainSize < (sizeof(struct setspref)
-                  + sizeof(struct spref) * ssp->num_servers-1))
+                  + sizeof(struct spref) * (ssp->num_servers-1)))
        return EINVAL;
 
     afs_setsprefs(&(ssp->servers[0]), ssp->num_servers,