summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-11-20 00:39:57 +0000
committerAndrew Tridgell <tridge@samba.org>2002-11-20 00:39:57 +0000
commitea3787d819df14f8b451780a55d2bf76dc4030ef (patch)
tree4c1b42caa779db4c7137c6c3b2f124930bc7da25
parent9ead4fc3c3f8b83f03c762a4dab77a64aabccbf9 (diff)
downloadsamba-ea3787d819df14f8b451780a55d2bf76dc4030ef.tar.gz
samba-ea3787d819df14f8b451780a55d2bf76dc4030ef.tar.xz
samba-ea3787d819df14f8b451780a55d2bf76dc4030ef.zip
more %U fixes for head
-rw-r--r--source/lib/substitute.c3
-rw-r--r--source/rpc_server/srv_netlog_nt.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/source/lib/substitute.c b/source/lib/substitute.c
index 48d8e35dae5..2d1b2ab1fa1 100644
--- a/source/lib/substitute.c
+++ b/source/lib/substitute.c
@@ -68,6 +68,9 @@ void sub_set_smb_name(const char *name)
{
fstring tmp;
+ /* don't let anonymous logins override the name */
+ if (! *name) return;
+
fstrcpy(tmp,name);
trim_string(tmp," "," ");
strlower(tmp);
diff --git a/source/rpc_server/srv_netlog_nt.c b/source/rpc_server/srv_netlog_nt.c
index 12841a2e087..dee0866b12a 100644
--- a/source/rpc_server/srv_netlog_nt.c
+++ b/source/rpc_server/srv_netlog_nt.c
@@ -566,6 +566,7 @@ NTSTATUS _net_sam_logon(pipes_struct *p, NET_Q_SAM_LOGON *q_u, NET_R_SAM_LOGON *
nt_workstation, nt_domain));
pstrcpy(current_user_info.smb_name, nt_username);
+ sub_set_smb_name(nt_username);
/*
* Convert to a UNIX username.