From 04f5ef83b9c3f6fbe484ceda8376982904b35065 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 11 Feb 2011 18:49:15 +1100 Subject: s3-auth struct security_unix_token replaces UNIX_USER_TOKEN --- source3/smbd/close.c | 4 ++-- source3/smbd/globals.h | 2 +- source3/smbd/msg_idmap.c | 2 +- source3/smbd/posix_acls.c | 4 ++-- source3/smbd/sec_ctx.c | 2 +- source3/smbd/uid.c | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 4234f32b7f..547705bc57 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -275,7 +275,7 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp, NTSTATUS status = NT_STATUS_OK; NTSTATUS tmp_status; struct file_id id; - const UNIX_USER_TOKEN *del_token = NULL; + const struct security_unix_token *del_token = NULL; /* Ensure any pending write time updates are done. */ if (fsp->update_write_time_event) { @@ -958,7 +958,7 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp, bool delete_dir = False; NTSTATUS status = NT_STATUS_OK; NTSTATUS status1 = NT_STATUS_OK; - const UNIX_USER_TOKEN *del_token = NULL; + const struct security_unix_token *del_token = NULL; /* * NT can set delete_on_close of the last open diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index b10268e6d7..de012483a0 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -78,7 +78,7 @@ extern struct smb_srv_trans_enc_ctx *partial_srv_trans_enc_ctx; extern struct smb_srv_trans_enc_ctx *srv_trans_enc_ctx; struct sec_ctx { - UNIX_USER_TOKEN ut; + struct security_unix_token ut; struct security_token *token; }; /* A stack of security contexts. We include the current context as being diff --git a/source3/smbd/msg_idmap.c b/source3/smbd/msg_idmap.c index 0987e87064..8e4d47586c 100644 --- a/source3/smbd/msg_idmap.c +++ b/source3/smbd/msg_idmap.c @@ -85,7 +85,7 @@ static bool gid_in_use(const struct user_struct* user, gid_t gid) while (user) { if (user->session_info != NULL) { int i; - struct unix_user_token utok = user->session_info->utok; + struct security_unix_token utok = user->session_info->utok; if (utok.gid == gid) { return true; } diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 8707ff799c..5faf26f8b0 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -1306,7 +1306,7 @@ static bool uid_entry_in_group(connection_struct *conn, canon_ace *uid_ace, cano * and don't need to do the complex user_in_group_sid() call */ if (uid_ace->unix_ug.uid == get_current_uid(conn)) { - const UNIX_USER_TOKEN *curr_utok = NULL; + const struct security_unix_token *curr_utok = NULL; size_t i; if (group_ace->unix_ug.gid == get_current_gid(conn)) { @@ -2652,7 +2652,7 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn, static bool current_user_in_group(connection_struct *conn, gid_t gid) { int i; - const UNIX_USER_TOKEN *utok = get_current_utok(conn); + const struct security_unix_token *utok = get_current_utok(conn); for (i = 0; i < utok->ngroups; i++) { if (utok->groups[i] == gid) { diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c index a7479ed67c..9e409dee41 100644 --- a/source3/smbd/sec_ctx.c +++ b/source3/smbd/sec_ctx.c @@ -27,7 +27,7 @@ extern struct current_user current_user; Are two UNIX tokens equal ? ****************************************************************************/ -bool unix_token_equal(const UNIX_USER_TOKEN *t1, const UNIX_USER_TOKEN *t2) +bool unix_token_equal(const struct security_unix_token *t1, const struct security_unix_token *t2) { if (t1->uid != t2->uid || t1->gid != t2->gid || t1->ngroups != t2->ngroups) { diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c index 0890ae698c..9a6b06dd0f 100644 --- a/source3/smbd/uid.c +++ b/source3/smbd/uid.c @@ -536,7 +536,7 @@ gid_t get_current_gid(connection_struct *conn) doesn't alter this value. ****************************************************************************/ -const UNIX_USER_TOKEN *get_current_utok(connection_struct *conn) +const struct security_unix_token *get_current_utok(connection_struct *conn) { return ¤t_user.ut; } -- cgit