From 0d0f89461edf95bc584423cca4de1915afe4ba90 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 8 Jul 2003 05:37:13 +0000 Subject: Initialise the uid and gid values to a safe default in make_server_info() (This used to be commit 3a1f4f5ea5379b0deb6dc6b8ed81dedc3a08f70e) --- source3/auth/auth_util.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3') 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; } -- cgit