diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-07-15 14:59:14 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-07-20 09:17:10 +1000 |
commit | 6d741e918f145c6ec62c22358aabc8162db108fd (patch) | |
tree | 4d562524b2ff71892911331d707e23045984b0d3 /source3/smbd/trans2.c | |
parent | f16d8f4eb86ecc4741c25e5ed87b2ea4c6717a31 (diff) | |
download | samba-6d741e918f145c6ec62c22358aabc8162db108fd.tar.gz samba-6d741e918f145c6ec62c22358aabc8162db108fd.tar.xz samba-6d741e918f145c6ec62c22358aabc8162db108fd.zip |
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 <tridge@samba.org>
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r-- | source3/smbd/trans2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index b853722eae..bfde938635 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -3386,7 +3386,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned + 4 /* num_sids */ + 4 /* SID bytes */ + 4 /* pad/reserved */ - + (conn->session_info->utok.ngroups * 8) + + (conn->session_info->unix_token->ngroups * 8) /* groups list */ + (conn->session_info->security_token->num_sids * SID_MAX_SIZE) @@ -3395,9 +3395,9 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned SIVAL(pdata, 0, flags); SIVAL(pdata, 4, SMB_WHOAMI_MASK); SBIG_UINT(pdata, 8, - (uint64_t)conn->session_info->utok.uid); + (uint64_t)conn->session_info->unix_token->uid); SBIG_UINT(pdata, 16, - (uint64_t)conn->session_info->utok.gid); + (uint64_t)conn->session_info->unix_token->gid); if (data_len >= max_data_bytes) { @@ -3412,7 +3412,7 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned break; } - SIVAL(pdata, 24, conn->session_info->utok.ngroups); + SIVAL(pdata, 24, conn->session_info->unix_token->ngroups); SIVAL(pdata, 28, conn->session_info->security_token->num_sids); /* We walk the SID list twice, but this call is fairly @@ -3434,9 +3434,9 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned data_len = 40; /* GID list */ - for (i = 0; i < conn->session_info->utok.ngroups; ++i) { + for (i = 0; i < conn->session_info->unix_token->ngroups; ++i) { SBIG_UINT(pdata, data_len, - (uint64_t)conn->session_info->utok.groups[i]); + (uint64_t)conn->session_info->unix_token->groups[i]); data_len += 8; } @@ -5817,7 +5817,7 @@ static NTSTATUS smb_set_file_disposition_info(connection_struct *conn, /* The set is across all open files on this dev/inode pair. */ if (!set_delete_on_close(fsp, delete_on_close, - &conn->session_info->utok)) { + conn->session_info->unix_token)) { return NT_STATUS_ACCESS_DENIED; } return NT_STATUS_OK; |