Fix input size computation in SetSPrefs pioctl

Patchset 718f85a8b6 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.

Change-Id: I2e06dccb51c53ba312418fb5f51be3d621a2004c
Reviewed-on: http://gerrit.openafs.org/5465
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Jeffrey Altman 2011-09-19 10:35:11 -04:00 committed by Derrick Brashear
parent 624c5d09e2
commit 552d59186b

View File

@ -4022,7 +4022,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,