summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-12-01 22:39:33 +0000
committerLuke Leighton <lkcl@samba.org>1998-12-01 22:39:33 +0000
commit08cdea519c692de092ba7a70664411c1a3cedac0 (patch)
tree58dc70460b23a8c55144fd5a21723687fb7d1fd1 /source3/smbd
parent5dd26daad55da89a7a0996caadd1d474f6031001 (diff)
downloadsamba-08cdea519c692de092ba7a70664411c1a3cedac0.tar.gz
samba-08cdea519c692de092ba7a70664411c1a3cedac0.tar.bz2
samba-08cdea519c692de092ba7a70664411c1a3cedac0.zip
check server role before doing nt user to unix user mapping
(This used to be commit 9d4e810e7dd8d6d80b47204636f9a37774f95455)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/reply.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 169f69ee07..d706976714 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -73,20 +73,23 @@ static void map_nt_and_unix_username(const char *domain, char *user)
* function.
*/
- memset(nt_username, 0, sizeof(nt_username));
- if (domain != NULL)
+ if (lp_server_role() != ROLE_DOMAIN_NONE)
{
- slprintf(nt_username, sizeof(nt_username)-1, "%s\\%s",
- domain, user);
- }
- else
- {
- fstrcpy(nt_username, user);
- }
+ memset(nt_username, 0, sizeof(nt_username));
+ if (domain != NULL)
+ {
+ slprintf(nt_username, sizeof(nt_username)-1, "%s\\%s",
+ domain, user);
+ }
+ else
+ {
+ fstrcpy(nt_username, user);
+ }
- if (lookupsmbpwntnam(nt_username, &gmep))
- {
- fstrcpy(user, gmep.unix_name);
+ if (lookupsmbpwntnam(nt_username, &gmep))
+ {
+ fstrcpy(user, gmep.unix_name);
+ }
}
/*