From 552d59186b135af55eeaa6136a9cbb8965dd2f04 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 19 Sep 2011 10:35:11 -0400 Subject: [PATCH] Fix input size computation in SetSPrefs pioctl 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. Change-Id: I2e06dccb51c53ba312418fb5f51be3d621a2004c Reviewed-on: http://gerrit.openafs.org/5465 Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/afs/afs_pioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 2d46ac2424..cf432d621d 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -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,