viced: Return separate error from ParseRights()
Currently, if a user gives the 'H' right to the -implicit option, the
fileserver will silently exit with an error code. This happens because
we detect a bogus string given to -implicit by checking for a negative
return value from ParseRights(). But the 'H' right corresponds to
PRSFS_USR7, which is 0x80000000, so setting that bit makes the returned
value negative (since we return an afs_int32). So we interpret the
returned value as an error, and exit without printing out an error
message.
While we could check for the value -1 specifically to detect an error,
try to avoid this error-prone design and change ParseRights() to return
an error code separately from the parsed rights bitfield.
The only other place where we parse ACL rights in the tree is Convert()
in fs.c. That function just exit()s on an invalid string, and so callers
do not check for errors at all and don't need to be updated in this
commit.
Change-Id: I0ebbee2c7e7afefb36a5fbfd7b67e086d9a281bd
Reviewed-on: https://gerrit.openafs.org/16223
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>