summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-01-19 16:22:28 +0100
committerAndreas Schneider <asn@samba.org>2011-01-19 22:27:48 +0100
commit7a97518e12054e1f84236501322b756c5c09d7dd (patch)
tree2ca939cdaecdbca5c6adadd2ed4c9baee44ee1cd /source3/smbd
parentdd141cf5f735e3c0ecf7517cdc83cbacd678e644 (diff)
downloadsamba-7a97518e12054e1f84236501322b756c5c09d7dd.tar.gz
samba-7a97518e12054e1f84236501322b756c5c09d7dd.tar.bz2
samba-7a97518e12054e1f84236501322b756c5c09d7dd.zip
s3-smbd: Fixed a possible null pointer dereference.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/uid.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index dd6af6d9c0..b573a6c920 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -229,7 +229,7 @@ void conn_clear_vuid_cache(connection_struct *conn, uint16_t vuid)
bool change_to_user(connection_struct *conn, uint16 vuid)
{
const struct auth_serversupplied_info *server_info = NULL;
- user_struct *vuser = get_valid_user_struct(conn->sconn, vuid);
+ user_struct *vuser;
int snum;
gid_t gid;
uid_t uid;
@@ -242,6 +242,8 @@ bool change_to_user(connection_struct *conn, uint16 vuid)
return(False);
}
+ vuser = get_valid_user_struct(conn->sconn, vuid);
+
/*
* We need a separate check in security=share mode due to vuid
* always being UID_FIELD_INVALID. If we don't do this then