summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-07-18 12:58:25 +1000
committerAndrew Bartlett <abartlet@samba.org>2011-07-20 09:17:13 +1000
commit128ae06a619b2c50cc9379053abb18277e814747 (patch)
treef3c7c0639a4adcbcff13cbfb1322cee0b08cba1a /source3/smbd
parent8d72e612ac2845cd873c4fd614456fe8749db130 (diff)
downloadsamba-128ae06a619b2c50cc9379053abb18277e814747.tar.gz
samba-128ae06a619b2c50cc9379053abb18277e814747.tar.bz2
samba-128ae06a619b2c50cc9379053abb18277e814747.zip
s3-auth use auth_user_info not netr_SamInfo3 in auth3_session_info
This makes auth3_session_info identical to auth_session_info The logic to convert the info3 to a struct auth_user_info is essentially moved up the stack from the named pipe proxy in source3/rpc_server to create_local_token(). Andrew Bartlett Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/lanman.c6
-rw-r--r--source3/smbd/password.c6
-rw-r--r--source3/smbd/process.c2
-rw-r--r--source3/smbd/service.c12
-rw-r--r--source3/smbd/smb2_server.c2
-rw-r--r--source3/smbd/uid.c6
6 files changed, 17 insertions, 17 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index c1b7ab6077..4f905cf9b1 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -121,7 +121,7 @@ static int CopyExpanded(connection_struct *conn,
conn->connectpath,
conn->session_info->unix_token->gid,
conn->session_info->unix_info->sanitized_username,
- conn->session_info->info3->base.domain.string,
+ conn->session_info->info->domain_name,
buf);
if (!buf) {
*p_space_remaining = 0;
@@ -172,7 +172,7 @@ static int StrlenExpanded(connection_struct *conn, int snum, char *s)
conn->connectpath,
conn->session_info->unix_token->gid,
conn->session_info->unix_info->sanitized_username,
- conn->session_info->info3->base.domain.string,
+ conn->session_info->info->domain_name,
buf);
if (!buf) {
return 0;
@@ -4696,7 +4696,7 @@ static bool api_WWkstaUserLogon(struct smbd_server_connection *sconn,
PACKS(&desc,"z",lp_workgroup());/* domain */
PACKS(&desc,"z", vuser ?
- vuser->session_info->info3->base.logon_script.string
+ vuser->session_info->info->logon_script
: ""); /* script path */
PACKI(&desc,"D",0x00000000); /* reserved */
}
diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 9daecaf48e..c4329bc000 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -293,12 +293,12 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
(unsigned int)vuser->session_info->unix_token->gid,
vuser->session_info->unix_info->unix_name,
vuser->session_info->unix_info->sanitized_username,
- vuser->session_info->info3->base.domain.string,
+ vuser->session_info->info->domain_name,
vuser->session_info->unix_info->guest ));
DEBUG(3, ("register_existing_vuid: User name: %s\t"
"Real name: %s\n", vuser->session_info->unix_info->unix_name,
- vuser->session_info->info3->base.full_name.string));
+ vuser->session_info->info->full_name));
if (!vuser->session_info->security_token) {
DEBUG(1, ("register_existing_vuid: session_info does not "
@@ -346,7 +346,7 @@ int register_existing_vuid(struct smbd_server_connection *sconn,
set_current_user_info(
vuser->session_info->unix_info->sanitized_username,
vuser->session_info->unix_info->unix_name,
- vuser->session_info->info3->base.domain.string);
+ vuser->session_info->info->domain_name);
return vuser->vuid;
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 66c7d08383..0e198ee0e5 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1414,7 +1414,7 @@ static connection_struct *switch_message(uint8 type, struct smb_request *req, in
set_current_user_info(
vuser->session_info->unix_info->sanitized_username,
vuser->session_info->unix_info->unix_name,
- vuser->session_info->info3->base.domain.string);
+ vuser->session_info->info->domain_name);
}
}
}
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index d5a757c61f..2ac462f930 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -403,7 +403,7 @@ static NTSTATUS create_connection_session_info(struct smbd_server_connection *sc
}
} else {
if (!user_ok_token(vuid_serverinfo->unix_info->unix_name,
- vuid_serverinfo->info3->base.domain.string,
+ vuid_serverinfo->info->domain_name,
vuid_serverinfo->security_token, snum)) {
DEBUG(2, ("user '%s' (from session setup) not "
"permitted to access this share "
@@ -617,7 +617,7 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
conn->connectpath,
conn->session_info->unix_token->gid,
conn->session_info->unix_info->sanitized_username,
- conn->session_info->info3->base.domain.string,
+ conn->session_info->info->domain_name,
lp_pathname(snum));
if (!s) {
*pstatus = NT_STATUS_NO_MEMORY;
@@ -739,7 +739,7 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
conn->connectpath,
conn->session_info->unix_token->gid,
conn->session_info->unix_info->sanitized_username,
- conn->session_info->info3->base.domain.string,
+ conn->session_info->info->domain_name,
lp_rootpreexec(snum));
DEBUG(5,("cmd=%s\n",cmd));
ret = smbrun(cmd,NULL);
@@ -777,7 +777,7 @@ connection_struct *make_connection_snum(struct smbd_server_connection *sconn,
conn->connectpath,
conn->session_info->unix_token->gid,
conn->session_info->unix_info->sanitized_username,
- conn->session_info->info3->base.domain.string,
+ conn->session_info->info->domain_name,
lp_preexec(snum));
ret = smbrun(cmd,NULL);
TALLOC_FREE(cmd);
@@ -1097,7 +1097,7 @@ void close_cnum(connection_struct *conn, uint16 vuid)
conn->connectpath,
conn->session_info->unix_token->gid,
conn->session_info->unix_info->sanitized_username,
- conn->session_info->info3->base.domain.string,
+ conn->session_info->info->domain_name,
lp_postexec(SNUM(conn)));
smbrun(cmd,NULL);
TALLOC_FREE(cmd);
@@ -1113,7 +1113,7 @@ void close_cnum(connection_struct *conn, uint16 vuid)
conn->connectpath,
conn->session_info->unix_token->gid,
conn->session_info->unix_info->sanitized_username,
- conn->session_info->info3->base.domain.string,
+ conn->session_info->info->domain_name,
lp_rootpostexec(SNUM(conn)));
smbrun(cmd,NULL);
TALLOC_FREE(cmd);
diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c
index 7e181ef5dd..11b5ed8bf0 100644
--- a/source3/smbd/smb2_server.c
+++ b/source3/smbd/smb2_server.c
@@ -1190,7 +1190,7 @@ static NTSTATUS smbd_smb2_request_check_session(struct smbd_smb2_request *req)
set_current_user_info(session->session_info->unix_info->sanitized_username,
session->session_info->unix_info->unix_name,
- session->session_info->info3->base.domain.string);
+ session->session_info->info->domain_name);
req->session = session;
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 47c9786116..7b6b644dcc 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -110,13 +110,13 @@ static bool check_user_ok(connection_struct *conn,
}
if (!user_ok_token(session_info->unix_info->unix_name,
- session_info->info3->base.domain.string,
+ session_info->info->domain_name,
session_info->security_token, snum))
return(False);
readonly_share = is_share_read_only_for_token(
session_info->unix_info->unix_name,
- session_info->info3->base.domain.string,
+ session_info->info->domain_name,
session_info->security_token,
conn);
@@ -141,7 +141,7 @@ static bool check_user_ok(connection_struct *conn,
admin_user = token_contains_name_in_list(
session_info->unix_info->unix_name,
- session_info->info3->base.domain.string,
+ session_info->info->domain_name,
NULL, session_info->security_token, lp_admin_users(snum));
if (valid_vuid) {