setcifsacl: fix up ACE mask handling
authorJeff Layton <jlayton@samba.org>
Wed, 7 Nov 2012 15:19:19 +0000 (10:19 -0500)
committerJeff Layton <jlayton@samba.org>
Wed, 7 Nov 2012 15:19:19 +0000 (10:19 -0500)
commit6a091a5aa6fd9de3e2ea700896e1949a5623b1c6
tree2f64542042cb2a7567571424f526a76775d952f6
parent3a41103dfea64856c8317099496716a7f9010769
setcifsacl: fix up ACE mask handling

Change verify_ace_mask to just attempt to convert the argument to an
unsigned long first. If that fails, then try to treat it as a symbolic
mask string.

Also, clean up ace_mask_value. There's no need to walk the string
twice. Walk it once and turn the single-char mask checks into a switch
statement instead of if/else clauses.

Finally, fix the endianness of the resulting value. It must be in LE.

Signed-off-by: Jeff Layton <jlayton@samba.org>
setcifsacl.c