summaryrefslogtreecommitdiffstats
path: root/source/rpc_server/srv_netlog.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1998-06-10 19:45:13 +0000
committerJeremy Allison <jra@samba.org>1998-06-10 19:45:13 +0000
commitfb6ed81844e7cb6049749e43ac9b4adfaf4ca2de (patch)
treed2c49a3c9b4dc0dd3c741a269aa02ac1fec78cc2 /source/rpc_server/srv_netlog.c
parent1d77728bbba49699a05eb70b685a4a97d7598122 (diff)
downloadsamba-fb6ed81844e7cb6049749e43ac9b4adfaf4ca2de.tar.gz
samba-fb6ed81844e7cb6049749e43ac9b4adfaf4ca2de.tar.xz
samba-fb6ed81844e7cb6049749e43ac9b4adfaf4ca2de.zip
De-coupled the mapping of a Windows to UNIX username from the Get_Pwnam
username case conversion wrapper. It is now (very) explicit where we are mapping between an incoming Windows username, and when we are doing a UNIX password entry lookup, which may change the case of the given username. This makes things *much* clearer (IMHO:-) and will ease the adding of the 'groupname map' parameter, and the addition of the special 'jeremy' mode for Samba where unix users will not be needed. (We must think of a better name for it :-). Jeremy.
Diffstat (limited to 'source/rpc_server/srv_netlog.c')
-rw-r--r--source/rpc_server/srv_netlog.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/rpc_server/srv_netlog.c b/source/rpc_server/srv_netlog.c
index 38481cd2d3b..8bcf1682bcb 100644
--- a/source/rpc_server/srv_netlog.c
+++ b/source/rpc_server/srv_netlog.c
@@ -641,6 +641,16 @@ static void api_net_sam_logon( int uid,
DEBUG(3,("User:[%s]\n", samlogon_user));
+ /*
+ * Convert to a UNIX username.
+ */
+ map_username(samlogon_user);
+
+ /*
+ * Do any case conversions.
+ */
+ (void)Get_Pwnam(samlogon_user, True);
+
become_root(True);
smb_pass = getsmbpwnam(samlogon_user);
unbecome_root(True);