summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-05-31 10:52:06 -0400
committerAndreas Schneider <asn@samba.org>2010-05-31 18:21:29 +0200
commit471ed70c497f4eeaca27594d609f41f2b2c689cd (patch)
tree18a3246eeb729a1439cd7cfa42b061a4d251b20b /source3/smbd
parent6a25668e55929a8111ac0fc5e34b5a83ae936349 (diff)
downloadsamba-471ed70c497f4eeaca27594d609f41f2b2c689cd.tar.gz
samba-471ed70c497f4eeaca27594d609f41f2b2c689cd.tar.bz2
samba-471ed70c497f4eeaca27594d609f41f2b2c689cd.zip
s3:smbd map_username() doesn't need sconn anymore
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/map_username.c2
-rw-r--r--source3/smbd/service.c5
-rw-r--r--source3/smbd/sesssetup.c4
-rw-r--r--source3/smbd/smb2_sesssetup.c3
4 files changed, 6 insertions, 8 deletions
diff --git a/source3/smbd/map_username.c b/source3/smbd/map_username.c
index 4d2a9db307..9b24d8fa4e 100644
--- a/source3/smbd/map_username.c
+++ b/source3/smbd/map_username.c
@@ -118,7 +118,7 @@ static void store_map_in_gencache(const char *from, const char *to)
TALLOC_FREE(key);
}
-bool map_username(struct smbd_server_connection *sconn, fstring user)
+bool map_username(fstring user)
{
XFILE *f;
char *mapfile = lp_username_map();
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index afd9cad27d..8642544c4f 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -306,7 +306,6 @@ int add_home_service(const char *service, const char *username, const char *home
int find_service(fstring service)
{
int iService;
- struct smbd_server_connection *sconn = smbd_server_conn;
all_string_sub(service,"\\","/",0);
@@ -321,7 +320,7 @@ int find_service(fstring service)
* Try mapping the servicename, it may
* be a Windows to unix mapped user name.
*/
- if(map_username(sconn, service))
+ if(map_username(service))
phome_dir = get_user_home_dir(
talloc_tos(), service);
}
@@ -1158,7 +1157,7 @@ connection_struct *make_connection(struct smbd_server_connection *sconn,
fstring unix_username;
fstrcpy(unix_username,
current_user_info.smb_name);
- map_username(sconn, unix_username);
+ map_username(unix_username);
snum = find_service(unix_username);
}
if (snum != -1) {
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 7f99d6283c..dba6dabd26 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -413,7 +413,7 @@ static void reply_spnego_kerberos(struct smb_request *req,
/* lookup the passwd struct, create a new user if necessary */
- username_was_mapped = map_username(sconn, user);
+ username_was_mapped = map_username(user);
pw = smb_getpwnam( mem_ctx, user, real_username, True );
@@ -1676,7 +1676,7 @@ void reply_sesssetup_and_X(struct smb_request *req)
data_blob_free(&nt_resp);
data_blob_clear_free(&plaintext_password);
- map_username(sconn, sub_user);
+ map_username(sub_user);
add_session_user(sconn, sub_user);
add_session_workgroup(sconn, domain);
/* Then force it to null for the benfit of the code below */
diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index d91d0fe510..88454c1222 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -170,7 +170,6 @@ static NTSTATUS smbd_smb2_session_setup_krb5(struct smbd_smb2_session *session,
fstring tmp;
bool username_was_mapped = false;
bool map_domainuser_to_guest = false;
- struct smbd_server_connection *sconn = smbd_server_conn;
if (!spnego_parse_krb5_wrap(*secblob, &ticket, tok_id)) {
status = NT_STATUS_LOGON_FAILURE;
@@ -265,7 +264,7 @@ static NTSTATUS smbd_smb2_session_setup_krb5(struct smbd_smb2_session *session,
/* lookup the passwd struct, create a new user if necessary */
- username_was_mapped = map_username(sconn, user);
+ username_was_mapped = map_username(user);
pw = smb_getpwnam(talloc_tos(), user, real_username, true );
if (pw) {