From 8c9187a12787da491dc4b0ee8132eba5545db58c 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. Reviewed-on: http://gerrit.openafs.org/5465 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 552d59186b135af55eeaa6136a9cbb8965dd2f04) Change-Id: I2226334c558bdc4d24e17d32751154f99f2a53a6 Reviewed-on: http://gerrit.openafs.org/5566 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- 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 4edeadac05..5ffb36626b 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -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,