From 6d741e918f145c6ec62c22358aabc8162db108fd Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 15 Jul 2011 14:59:14 +1000 Subject: s3-auth Use *unix_token rather than utok in struct auth3_session_info This brings this structure one step closer to the struct auth_session_info. A few SMB_ASSERT calls are added in some key places to ensure that this pointer is initialised, to make tracing any bugs here easier in future. NOTE: Many of the users of this structure should be reviewed, as unix and NT access checks are mixed in a way that should just be done using the NT ACL. This patch has not changed this behaviour however. Andrew Bartlett Signed-off-by: Andrew Tridgell --- source3/smbd/msg_idmap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/smbd/msg_idmap.c') diff --git a/source3/smbd/msg_idmap.c b/source3/smbd/msg_idmap.c index 2a00f1bbb9..b534ac3846 100644 --- a/source3/smbd/msg_idmap.c +++ b/source3/smbd/msg_idmap.c @@ -73,7 +73,7 @@ static bool parse_id(const char* str, struct id* id) static bool uid_in_use(const struct user_struct* user, uid_t uid) { while (user) { - if (user->session_info && (user->session_info->utok.uid == uid)) { + if (user->session_info && (user->session_info->unix_token->uid == uid)) { return true; } user = user->next; @@ -86,12 +86,12 @@ static bool gid_in_use(const struct user_struct* user, gid_t gid) while (user) { if (user->session_info != NULL) { int i; - struct security_unix_token utok = user->session_info->utok; - if (utok.gid == gid) { + struct security_unix_token *utok = user->session_info->unix_token; + if (utok->gid == gid) { return true; } - for(i=0; ingroups; i++) { + if (utok->groups[i] == gid) { return true; } } -- cgit