summaryrefslogtreecommitdiff
path: root/source3/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
commit72bf410b6e9b85f8fbff7f6175661829bef35f62 (patch)
tree11c6f694c2f4b4c3bb2e9325b071215a6d0dfbbf /source3/rpc_server/srv_netlog.c
parent1b86bead993051f93ea1570ad404e270b06045d3 (diff)
downloadsamba-72bf410b6e9b85f8fbff7f6175661829bef35f62.tar.gz
samba-72bf410b6e9b85f8fbff7f6175661829bef35f62.tar.bz2
samba-72bf410b6e9b85f8fbff7f6175661829bef35f62.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. (This used to be commit fb6ed81844e7cb6049749e43ac9b4adfaf4ca2de)
Diffstat (limited to 'source3/rpc_server/srv_netlog.c')
-rw-r--r--source3/rpc_server/srv_netlog.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c
index 38481cd2d3..8bcf1682bc 100644
--- a/source3/rpc_server/srv_netlog.c
+++ b/source3/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);