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/connection.c | |
parent | f16d8f4eb86ecc4741c25e5ed87b2ea4c6717a31 (diff) | |
download | samba-6d741e918f145c6ec62c22358aabc8162db108fd.tar.gz samba-6d741e918f145c6ec62c22358aabc8162db108fd.tar.bz2 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/connection.c')
-rw-r--r-- | source3/smbd/connection.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c index 048604c5c9..7e49664162 100644 --- a/source3/smbd/connection.c +++ b/source3/smbd/connection.c @@ -149,13 +149,16 @@ bool claim_connection(connection_struct *conn, const char *name) return False; } + /* Make clear that we require the optional unix_token in the source3 code */ + SMB_ASSERT(conn->session_info->unix_token); + /* fill in the crec */ ZERO_STRUCT(crec); crec.magic = 0x280267; crec.pid = sconn_server_id(conn->sconn); crec.cnum = conn->cnum; - crec.uid = conn->session_info->utok.uid; - crec.gid = conn->session_info->utok.gid; + crec.uid = conn->session_info->unix_token->uid; + crec.gid = conn->session_info->unix_token->gid; strlcpy(crec.servicename, lp_servicename(SNUM(conn)), sizeof(crec.servicename)); crec.start = time(NULL); |