From 05ac2de0df78d22ad5afb42ea5c72ba17bef8395 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 3 Dec 2005 18:34:13 +0000 Subject: r12051: Merge across the lookup_name and lookup_sid work. Lets see how the build farm reacts :-) Volker (This used to be commit 9f99d04a54588cd9d1a1ab163ebb304437f932f7) --- source3/modules/vfs_afsacl.c | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) (limited to 'source3/modules') 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); -- cgit