diff options
author | Volker Lendecke <vlendec@samba.org> | 2005-12-03 18:34:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:05:43 -0500 |
commit | 05ac2de0df78d22ad5afb42ea5c72ba17bef8395 (patch) | |
tree | f4968eaab779b3f09dfac41e34f6088f32c38463 /source3/modules | |
parent | 678f13c761bea7b4dc4b96c4c1a7d65ee143181c (diff) | |
download | samba-05ac2de0df78d22ad5afb42ea5c72ba17bef8395.tar.gz samba-05ac2de0df78d22ad5afb42ea5c72ba17bef8395.tar.bz2 samba-05ac2de0df78d22ad5afb42ea5c72ba17bef8395.zip |
r12051: Merge across the lookup_name and lookup_sid work. Lets see how the build farm
reacts :-)
Volker
(This used to be commit 9f99d04a54588cd9d1a1ab163ebb304437f932f7)
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_afsacl.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/source3/modules/vfs_afsacl.c b/source3/modules/vfs_afsacl.c index 41f40d1e3c..3794299b9a 100644 --- a/source3/modules/vfs_afsacl.c +++ b/source3/modules/vfs_afsacl.c @@ -105,27 +105,6 @@ static struct afs_ace *clone_afs_ace(TALLOC_CTX *mem_ctx, struct afs_ace *ace) return result; } - -/* Ok, this is sort-of a hack. We assume here that we have winbind users in - * AFS. And yet another copy of parse_domain_user.... */ - -static BOOL parse_domain_user(const char *domuser, fstring domain, - fstring user) -{ - char *p = strchr(domuser,*lp_winbind_separator()); - - if (p==NULL) { - return False; - } - - fstrcpy(user, p+1); - fstrcpy(domain, domuser); - domain[PTR_DIFF(p, domuser)] = 0; - strupper_m(domain); - - return True; -} - static struct afs_ace *new_afs_ace(TALLOC_CTX *mem_ctx, BOOL positive, const char *name, uint32 rights) @@ -168,14 +147,16 @@ static struct afs_ace *new_afs_ace(TALLOC_CTX *mem_ctx, } else { - fstring user, domain; + fstring domain, uname; + char *p; - if (!parse_domain_user(name, domain, user)) { - fstrcpy(user, name); - fstrcpy(domain, lp_workgroup()); + p = strchr_m(name, lp_winbind_separator()); + if (p != NULL) { + *p = '\\'; } - - if (!lookup_name(domain, user, &sid, &type)) { + + if (!lookup_name(name, LOOKUP_NAME_FULL, + domain, uname, &sid, &type)) { DEBUG(10, ("Could not find AFS user %s\n", name)); sid_copy(&sid, &global_sid_NULL); |