diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-07-18 13:06:47 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-07-20 09:17:13 +1000 |
commit | 9fcc617ff5a216cc4ff1a587786522d28d84c7f2 (patch) | |
tree | 7d8589355c0ae8f9a13e48238879706bd58d70c6 /source3/smbd | |
parent | 128ae06a619b2c50cc9379053abb18277e814747 (diff) | |
download | samba-9fcc617ff5a216cc4ff1a587786522d28d84c7f2.tar.gz samba-9fcc617ff5a216cc4ff1a587786522d28d84c7f2.tar.bz2 samba-9fcc617ff5a216cc4ff1a587786522d28d84c7f2.zip |
s3-auth Use the common auth_session_info
This patch finally has the same structure being used to describe the
authorization data of a user across the whole codebase.
This will allow of our session handling to be accomplished with common code.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/globals.h | 2 | ||||
-rw-r--r-- | source3/smbd/msdfs.c | 2 | ||||
-rw-r--r-- | source3/smbd/password.c | 2 | ||||
-rw-r--r-- | source3/smbd/proto.h | 12 | ||||
-rw-r--r-- | source3/smbd/server_reload.c | 2 | ||||
-rw-r--r-- | source3/smbd/service.c | 10 | ||||
-rw-r--r-- | source3/smbd/sesssetup.c | 8 | ||||
-rw-r--r-- | source3/smbd/uid.c | 12 |
8 files changed, 25 insertions, 25 deletions
diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index c7bf239a36..6d13e568d1 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -422,7 +422,7 @@ struct smbd_smb2_session { NTSTATUS status; uint64_t vuid; struct auth_ntlmssp_state *auth_ntlmssp_state; - struct auth3_session_info *session_info; + struct auth_session_info *session_info; DATA_BLOB session_key; bool do_signing; diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index c71f83dedd..702dd1d28d 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -225,7 +225,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx, connection_struct **pconn, int snum, const char *path, - const struct auth3_session_info *session_info, + const struct auth_session_info *session_info, char **poldcwd) { connection_struct *conn; diff --git a/source3/smbd/password.c b/source3/smbd/password.c index c4329bc000..d529dc1a63 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -263,7 +263,7 @@ int register_homes_share(const char *username) int register_existing_vuid(struct smbd_server_connection *sconn, uint16 vuid, - struct auth3_session_info *session_info, + struct auth_session_info *session_info, DATA_BLOB response_blob, const char *smb_name) { diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index f3b54e7221..1f414db59f 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -478,7 +478,7 @@ NTSTATUS create_conn_struct(TALLOC_CTX *ctx, connection_struct **pconn, int snum, const char *path, - const struct auth3_session_info *session_info, + const struct auth_session_info *session_info, char **poldcwd); /* The following definitions come from smbd/negprot.c */ @@ -711,7 +711,7 @@ int register_initial_vuid(struct smbd_server_connection *sconn); int register_homes_share(const char *username); int register_existing_vuid(struct smbd_server_connection *sconn, uint16 vuid, - struct auth3_session_info *session_info, + struct auth_session_info *session_info, DATA_BLOB response_blob, const char *smb_name); void add_session_user(struct smbd_server_connection *sconn, const char *user); @@ -1009,7 +1009,7 @@ int list_sessions(TALLOC_CTX *mem_ctx, struct sessionid **session_list); /* The following definitions come from smbd/sesssetup.c */ NTSTATUS do_map_to_guest(NTSTATUS status, - struct auth3_session_info **session_info, + struct auth_session_info **session_info, const char *user, const char *domain); NTSTATUS parse_spnego_mechanisms(TALLOC_CTX *ctx, @@ -1108,10 +1108,10 @@ void reply_transs2(struct smb_request *req); bool change_to_guest(void); bool change_to_user(connection_struct *conn, uint16 vuid); bool change_to_user_by_session(connection_struct *conn, - const struct auth3_session_info *session_info); + const struct auth_session_info *session_info); bool change_to_root_user(void); bool smbd_change_to_root_user(void); -bool become_authenticated_pipe_user(struct auth3_session_info *session_info); +bool become_authenticated_pipe_user(struct auth_session_info *session_info); bool unbecome_authenticated_pipe_user(void); void become_root(void); void unbecome_root(void); @@ -1119,7 +1119,7 @@ void smbd_become_root(void); void smbd_unbecome_root(void); bool become_user(connection_struct *conn, uint16 vuid); bool become_user_by_session(connection_struct *conn, - const struct auth3_session_info *session_info); + const struct auth_session_info *session_info); bool unbecome_user(void); uid_t get_current_uid(connection_struct *conn); gid_t get_current_gid(connection_struct *conn); diff --git a/source3/smbd/server_reload.c b/source3/smbd/server_reload.c index 1242aae673..db81aadab1 100644 --- a/source3/smbd/server_reload.c +++ b/source3/smbd/server_reload.c @@ -37,7 +37,7 @@ void reload_printers(struct tevent_context *ev, struct messaging_context *msg_ctx) { - struct auth3_session_info *session_info = NULL; + struct auth_session_info *session_info = NULL; struct spoolss_PrinterInfo2 *pinfo2 = NULL; int snum; int n_services = lp_numservices(); diff --git a/source3/smbd/service.c b/source3/smbd/service.c index 2ac462f930..71681aeca2 100644 --- a/source3/smbd/service.c +++ b/source3/smbd/service.c @@ -373,14 +373,14 @@ static NTSTATUS find_forced_group(bool force_user, } /**************************************************************************** - Create an auth3_session_info structure for a connection_struct + Create an auth_session_info structure for a connection_struct ****************************************************************************/ static NTSTATUS create_connection_session_info(struct smbd_server_connection *sconn, TALLOC_CTX *mem_ctx, int snum, - struct auth3_session_info *vuid_serverinfo, + struct auth_session_info *vuid_serverinfo, DATA_BLOB password, - struct auth3_session_info **presult) + struct auth_session_info **presult) { if (lp_guest_only(snum)) { return make_session_info_guest(mem_ctx, presult); @@ -388,7 +388,7 @@ static NTSTATUS create_connection_session_info(struct smbd_server_connection *sc if (vuid_serverinfo != NULL) { - struct auth3_session_info *result; + struct auth_session_info *result; /* * This is the normal security != share case where we have a @@ -466,7 +466,7 @@ NTSTATUS set_conn_force_user_group(connection_struct *conn, int snum) */ char *fuser; - struct auth3_session_info *forced_serverinfo; + struct auth_session_info *forced_serverinfo; fuser = talloc_string_sub(conn, lp_force_user(snum), "%S", lp_const_servicename(snum)); diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 76f96b1e42..b6a3243b85 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -81,7 +81,7 @@ static NTSTATUS do_map_to_guest_server_info(NTSTATUS status, is set approriately */ NTSTATUS do_map_to_guest(NTSTATUS status, - struct auth3_session_info **session_info, + struct auth_session_info **session_info, const char *user, const char *domain) { user = user ? user : ""; @@ -282,7 +282,7 @@ static void reply_spnego_kerberos(struct smb_request *req, int sess_vuid = req->vuid; NTSTATUS ret = NT_STATUS_OK; DATA_BLOB ap_rep, ap_rep_wrapped, response; - struct auth3_session_info *session_info = NULL; + struct auth_session_info *session_info = NULL; DATA_BLOB session_key = data_blob_null; uint8 tok_id[2]; DATA_BLOB nullblob = data_blob_null; @@ -487,7 +487,7 @@ static void reply_spnego_ntlmssp(struct smb_request *req, { bool do_invalidate = true; DATA_BLOB response; - struct auth3_session_info *session_info = NULL; + struct auth_session_info *session_info = NULL; struct smbd_server_connection *sconn = req->sconn; if (NT_STATUS_IS_OK(nt_status)) { @@ -1328,7 +1328,7 @@ void reply_sesssetup_and_X(struct smb_request *req) const char *primary_domain; struct auth_usersupplied_info *user_info = NULL; struct auth_serversupplied_info *server_info = NULL; - struct auth3_session_info *session_info = NULL; + struct auth_session_info *session_info = NULL; uint16 smb_flag2 = req->flags2; NTSTATUS nt_status; diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 7b6b644dcc..3847d393d7 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -87,7 +87,7 @@ static void free_conn_session_info_if_unused(connection_struct *conn) static bool check_user_ok(connection_struct *conn, uint16_t vuid, - const struct auth3_session_info *session_info, + const struct auth_session_info *session_info, int snum) { bool valid_vuid = (vuid != UID_FIELD_INVALID); @@ -190,7 +190,7 @@ static bool check_user_ok(connection_struct *conn, ****************************************************************************/ static bool change_to_user_internal(connection_struct *conn, - const struct auth3_session_info *session_info, + const struct auth_session_info *session_info, uint16_t vuid) { int snum; @@ -277,7 +277,7 @@ static bool change_to_user_internal(connection_struct *conn, bool change_to_user(connection_struct *conn, uint16_t vuid) { - const struct auth3_session_info *session_info = NULL; + const struct auth_session_info *session_info = NULL; user_struct *vuser; int snum = SNUM(conn); @@ -328,7 +328,7 @@ bool change_to_user(connection_struct *conn, uint16_t vuid) } bool change_to_user_by_session(connection_struct *conn, - const struct auth3_session_info *session_info) + const struct auth_session_info *session_info) { SMB_ASSERT(conn != NULL); SMB_ASSERT(session_info != NULL); @@ -367,7 +367,7 @@ bool smbd_change_to_root_user(void) user. Doesn't modify current_user. ****************************************************************************/ -bool become_authenticated_pipe_user(struct auth3_session_info *session_info) +bool become_authenticated_pipe_user(struct auth_session_info *session_info) { if (!push_sec_ctx()) return False; @@ -487,7 +487,7 @@ bool become_user(connection_struct *conn, uint16 vuid) } bool become_user_by_session(connection_struct *conn, - const struct auth3_session_info *session_info) + const struct auth_session_info *session_info) { if (!push_sec_ctx()) return false; |