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 | 9f99d04a54588cd9d1a1ab163ebb304437f932f7 (patch) | |
tree | 7c21c41f90e5fe6dab51b42d49ed25a545a95c17 /source/modules/vfs_afsacl.c | |
parent | b9d1a659109daeeb625f3e6caf7ec706ccdde230 (diff) | |
download | samba-9f99d04a54588cd9d1a1ab163ebb304437f932f7.tar.gz |
r12051: Merge across the lookup_name and lookup_sid work. Lets see how the build farm
reacts :-)
Volker
Diffstat (limited to 'source/modules/vfs_afsacl.c')
-rw-r--r-- | source/modules/vfs_afsacl.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/source/modules/vfs_afsacl.c b/source/modules/vfs_afsacl.c index 41f40d1e3c4..3794299b9a0 100644 --- a/source/modules/vfs_afsacl.c +++ b/source/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); |