summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-07-08 05:37:13 +0000
committerTim Potter <tpot@samba.org>2003-07-08 05:37:13 +0000
commit0d0f89461edf95bc584423cca4de1915afe4ba90 (patch)
tree1fec8629ee69df433ed79b318df03bdaa390c0a7 /source3/auth
parent3912ca09ea26885f88e300e0b662289064516cc7 (diff)
downloadsamba-0d0f89461edf95bc584423cca4de1915afe4ba90.tar.gz
samba-0d0f89461edf95bc584423cca4de1915afe4ba90.tar.bz2
samba-0d0f89461edf95bc584423cca4de1915afe4ba90.zip
Initialise the uid and gid values to a safe default in make_server_info()
(This used to be commit 3a1f4f5ea5379b0deb6dc6b8ed81dedc3a08f70e)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 408b26f514..7d6a5ff8c9 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -703,6 +703,14 @@ static NTSTATUS make_server_info(auth_serversupplied_info **server_info)
return NT_STATUS_NO_MEMORY;
}
ZERO_STRUCTP(*server_info);
+
+ /* 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. */
+
+ (*server_info)->uid = -1;
+ (*server_info)->gid = -1;
+
return NT_STATUS_OK;
}