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/auth/server_info.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source3/auth/server_info.c') diff --git a/source3/auth/server_info.c b/source3/auth/server_info.c index 12026060bd..080bd0b058 100644 --- a/source3/auth/server_info.c +++ b/source3/auth/server_info.c @@ -87,12 +87,11 @@ struct auth3_session_info *make_auth3_session_info(TALLOC_CTX *mem_ctx) talloc_set_destructor(result, auth3_session_info_dtor); - /* Initialise the uid and gid values to something non-zero - which may save us from giving away root access if there - is a bug in allocating these fields. */ + /* Initialise the unix_token to NULL which may save us from + giving away root access if there is a bug in allocating + these fields. */ - result->utok.uid = -1; - result->utok.gid = -1; + result->unix_token = NULL; return result; } -- cgit