diff options
author | Jeremy Allison <jra@samba.org> | 2001-02-16 19:21:18 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-02-16 19:21:18 +0000 |
commit | fd46817f0b20c633c80dee70a29cf7478e2dfd68 (patch) | |
tree | c7bc095fe35ac78b061d36ae04851ff04b006275 /source3/smbd | |
parent | 62dc55a43295e9e3abd9da13148b322b3aa89917 (diff) | |
download | samba-fd46817f0b20c633c80dee70a29cf7478e2dfd68.tar.gz samba-fd46817f0b20c633c80dee70a29cf7478e2dfd68.tar.bz2 samba-fd46817f0b20c633c80dee70a29cf7478e2dfd68.zip |
Excise snprintf -> slprintf.
srv_samr.c: duplicate gid fix.
srv_spoolss_nt.c: Merge of JF's work.
uid.c: Fix for returning names when a PDC.
Jeremy.
(This used to be commit d938ad6963a2dd4eda930d508600ec1902dc2b16)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/uid.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 1d2b8f4e9f..db43106b77 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -271,6 +271,7 @@ void unbecome_root(void) BOOL lookup_name(char *name, DOM_SID *psid, enum SID_NAME_USE *name_type) { extern pstring global_myname; + extern fstring global_myworkgroup; fstring sid; char *sep = lp_winbind_separator(); @@ -287,9 +288,17 @@ BOOL lookup_name(char *name, DOM_SID *psid, enum SID_NAME_USE *name_type) split_domain_name(name, domain, username); - if (strcasecmp(global_myname, domain) != 0) { - DEBUG(5, ("domain %s is not local\n", domain)); - return False; + switch (lp_server_role()) { + case ROLE_DOMAIN_PDC: + case ROLE_DOMAIN_BDC: + if (strequal(domain, global_myworkgroup)) + fstrcpy(domain, global_myname); + /* No break is deliberate here. JRA. */ + default: + if (strcasecmp(global_myname, domain) != 0) { + DEBUG(5, ("domain %s is not local\n", domain)); + return False; + } } ret = local_lookup_name(domain, username, psid, |