summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-04-30 00:37:05 +0200
committerGünther Deschner <gd@samba.org>2011-05-02 15:03:43 +0200
commit61cd1067efacd91e22b4acbdf0d1d92dc2efc162 (patch)
tree44ec7babfc5f97f420b5ef853440c4c191022345
parentcd5b2b242b39437081592d41d297bce0668b40ab (diff)
downloadsamba-61cd1067efacd91e22b4acbdf0d1d92dc2efc162.tar.gz
samba-61cd1067efacd91e22b4acbdf0d1d92dc2efc162.tar.bz2
samba-61cd1067efacd91e22b4acbdf0d1d92dc2efc162.zip
s3-smbd: avoid using pipes_struct when only session_info is needed.
Guenther
-rw-r--r--source3/rpc_server/srv_pipe.c2
-rw-r--r--source3/smbd/proto.h2
-rw-r--r--source3/smbd/uid.c9
3 files changed, 6 insertions, 7 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 27a7aaeaf4..256540965c 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -1547,7 +1547,7 @@ static bool api_pipe_request(struct pipes_struct *p,
((p->auth.auth_type == DCERPC_AUTH_TYPE_NTLMSSP) ||
(p->auth.auth_type == DCERPC_AUTH_TYPE_KRB5) ||
(p->auth.auth_type == DCERPC_AUTH_TYPE_SPNEGO))) {
- if(!become_authenticated_pipe_user(p)) {
+ if(!become_authenticated_pipe_user(p->session_info)) {
data_blob_free(&p->out_data.rdata);
return False;
}
diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h
index 36eea5e16e..86745f122d 100644
--- a/source3/smbd/proto.h
+++ b/source3/smbd/proto.h
@@ -1051,7 +1051,7 @@ bool change_to_user(connection_struct *conn, uint16 vuid);
bool change_to_user_by_session(connection_struct *conn,
const struct auth_serversupplied_info *session_info);
bool change_to_root_user(void);
-bool become_authenticated_pipe_user(struct pipes_struct *p);
+bool become_authenticated_pipe_user(struct auth_serversupplied_info *session_info);
bool unbecome_authenticated_pipe_user(void);
void become_root(void);
void unbecome_root(void);
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index b554b36054..7b04713bab 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -25,7 +25,6 @@
#include "libcli/security/security.h"
#include "passdb/lookup_sid.h"
#include "auth.h"
-#include "ntdomain.h"
/* what user is current? */
extern struct current_user current_user;
@@ -409,14 +408,14 @@ bool change_to_root_user(void)
user. Doesn't modify current_user.
****************************************************************************/
-bool become_authenticated_pipe_user(struct pipes_struct *p)
+bool become_authenticated_pipe_user(struct auth_serversupplied_info *session_info)
{
if (!push_sec_ctx())
return False;
- set_sec_ctx(p->session_info->utok.uid, p->session_info->utok.gid,
- p->session_info->utok.ngroups, p->session_info->utok.groups,
- p->session_info->security_token);
+ set_sec_ctx(session_info->utok.uid, session_info->utok.gid,
+ session_info->utok.ngroups, session_info->utok.groups,
+ session_info->security_token);
return True;
}