setcifsacl: fix verify_ace_sid
authorJeff Layton <jlayton@samba.org>
Wed, 7 Nov 2012 15:19:17 +0000 (10:19 -0500)
committerJeff Layton <jlayton@samba.org>
Wed, 7 Nov 2012 15:19:17 +0000 (10:19 -0500)
commit5ba83a1f28d8feb0110a129fa24b8749016f2be7
treefba0509a6c83551cb74122a5fec5255fd1cbe567
parente2bfd38719c05c2d04579adda5f089755c79eba0
setcifsacl: fix verify_ace_sid

The current method of trying to convert a name to a password struct and
then back to a SID is just weird. It also doesn't seem to work correctly.

Instead, look for a '\\' in the string. If there isn't one then try to
convert it directly to a SID.

If there is a '\\' or the direct-to-SID conversion didn't work, then
use wbcLookupName to do the conversion directly to a SID instead.

Also, fix the error handling. These routines return a wbcErr, so we
should use their macros to check whether it worked or not.

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