summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-10-20 16:49:45 +0000
committerGerald Carter <jerry@samba.org>2003-10-20 16:49:45 +0000
commit3fb80f1926e1770f650bca1485c21cf5ee6b9c4f (patch)
tree046fadcc7d7c5d61842c88c7c138dfdff0deda07 /source3/smbd
parentd6aa4b38c86be4778b29552255252af02f542411 (diff)
downloadsamba-3fb80f1926e1770f650bca1485c21cf5ee6b9c4f.tar.gz
samba-3fb80f1926e1770f650bca1485c21cf5ee6b9c4f.tar.bz2
samba-3fb80f1926e1770f650bca1485c21cf5ee6b9c4f.zip
more 2.2.x compatibility fixes - allow user looksup in the kerb5
sesssetup to fall back to 'user' instaed of failing is REA.LM\user doesn't exist. also fix include line in smb_acls.h as requested by metze (This used to be commit 62ed2598b3441b3c198872df8eb55e594332807b)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/sesssetup.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 427caa3ba1..945855b832 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -198,28 +198,25 @@ static int reply_spnego_kerberos(connection_struct *conn,
/* this gives a fully qualified user name (ie. with full realm).
that leads to very long usernames, but what else can we do? */
- asprintf(&user, "%s%s%s", p+1, lp_winbind_separator(), client);
+
+ asprintf(&user, "%s%c%s", p+1, *lp_winbind_separator(), client);
- pw = Get_Pwnam(user);
- if (!pw && !foreign) {
- pw = Get_Pwnam(client);
- SAFE_FREE(user);
- user = smb_xstrdup(client);
- }
-
+ pw = smb_getpwnam( user );
+
+ SAFE_FREE(user);
SAFE_FREE(client);
- /* setup the string used by %U */
- sub_set_smb_name(user);
-
- reload_services(True);
-
if (!pw) {
DEBUG(1,("Username %s is invalid on this system\n",user));
data_blob_free(&ap_rep);
return ERROR_NT(NT_STATUS_LOGON_FAILURE);
}
+ /* setup the string used by %U */
+
+ sub_set_smb_name(pw->pw_name);
+ reload_services(True);
+
if (!NT_STATUS_IS_OK(ret = make_server_info_pw(&server_info,pw))) {
DEBUG(1,("make_server_info_from_pw failed!\n"));
data_blob_free(&ap_rep);