summaryrefslogtreecommitdiff
path: root/source3/smbd/uid.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-08 12:27:52 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-08 12:27:52 +0100
commit3318204d294f3b3ac3409f192edc3eddeada245b (patch)
tree442f52cc0c9bae0378c228c85166bcd005e60336 /source3/smbd/uid.c
parentba5d6e6d706ebf07640ee24d701255cbb4803525 (diff)
parent3dde0cbb769b92d922be13677ad076cae9b6a693 (diff)
downloadsamba-3318204d294f3b3ac3409f192edc3eddeada245b.tar.gz
samba-3318204d294f3b3ac3409f192edc3eddeada245b.tar.bz2
samba-3318204d294f3b3ac3409f192edc3eddeada245b.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/smbd/uid.c')
-rw-r--r--source3/smbd/uid.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 5a4b8a52e7..4f059bdb59 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -18,6 +18,7 @@
*/
#include "includes.h"
+#include "smbd/globals.h"
/* what user is current? */
extern struct current_user current_user;
@@ -28,13 +29,11 @@ extern struct current_user current_user;
bool change_to_guest(void)
{
- static struct passwd *pass=NULL;
+ struct passwd *pass;
+ pass = getpwnam_alloc(talloc_autofree_context(), lp_guestaccount());
if (!pass) {
- /* Don't need to free() this as its stored in a static */
- pass = getpwnam_alloc(talloc_autofree_context(), lp_guestaccount());
- if (!pass)
- return(False);
+ return false;
}
#ifdef AIX
@@ -49,9 +48,8 @@ bool change_to_guest(void)
current_user.vuid = UID_FIELD_INVALID;
TALLOC_FREE(pass);
- pass = NULL;
- return True;
+ return true;
}
/*******************************************************************
@@ -352,16 +350,6 @@ bool unbecome_authenticated_pipe_user(void)
Utility functions used by become_xxx/unbecome_xxx.
****************************************************************************/
-struct conn_ctx {
- connection_struct *conn;
- uint16 vuid;
-};
-
-/* A stack of current_user connection contexts. */
-
-static struct conn_ctx conn_ctx_stack[MAX_SEC_CTX_DEPTH];
-static int conn_ctx_stack_ndx;
-
static void push_conn_ctx(void)
{
struct conn_ctx *ctx_p;