mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
Fix input size computation in SetSPrefs pioctl
Patchset718f85a8b6
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 commit552d59186b
) Change-Id: I2226334c558bdc4d24e17d32751154f99f2a53a6 Reviewed-on: http://gerrit.openafs.org/5566 Tested-by: Jeffrey Altman <jaltman@openafs.org> Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
be937e205a
commit
8c9187a127
@ -3949,7 +3949,7 @@ DECL_PIOCTL(PSetSPrefs)
|
|||||||
|
|
||||||
ssp = (struct setspref *)ainPtr;
|
ssp = (struct setspref *)ainPtr;
|
||||||
if (ainSize < (sizeof(struct setspref)
|
if (ainSize < (sizeof(struct setspref)
|
||||||
+ sizeof(struct spref) * ssp->num_servers-1))
|
+ sizeof(struct spref) * (ssp->num_servers-1)))
|
||||||
return EINVAL;
|
return EINVAL;
|
||||||
|
|
||||||
afs_setsprefs(&(ssp->servers[0]), ssp->num_servers,
|
afs_setsprefs(&(ssp->servers[0]), ssp->num_servers,
|
||||||
|
Loading…
Reference in New Issue
Block a user