diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-08 12:27:52 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-08 12:27:52 +0100 |
commit | 3318204d294f3b3ac3409f192edc3eddeada245b (patch) | |
tree | 442f52cc0c9bae0378c228c85166bcd005e60336 /source3/smbd/sec_ctx.c | |
parent | ba5d6e6d706ebf07640ee24d701255cbb4803525 (diff) | |
parent | 3dde0cbb769b92d922be13677ad076cae9b6a693 (diff) | |
download | samba-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/sec_ctx.c')
-rw-r--r-- | source3/smbd/sec_ctx.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/source3/smbd/sec_ctx.c b/source3/smbd/sec_ctx.c index a618f06e6b..4b9e5d4727 100644 --- a/source3/smbd/sec_ctx.c +++ b/source3/smbd/sec_ctx.c @@ -18,20 +18,10 @@ */ #include "includes.h" +#include "smbd/globals.h" extern struct current_user current_user; -struct sec_ctx { - UNIX_USER_TOKEN ut; - NT_USER_TOKEN *token; -}; - -/* A stack of security contexts. We include the current context as being - the first one, so there is room for another MAX_SEC_CTX_DEPTH more. */ - -static struct sec_ctx sec_ctx_stack[MAX_SEC_CTX_DEPTH + 1]; -static int sec_ctx_stack_ndx; - /**************************************************************************** Are two UNIX tokens equal ? ****************************************************************************/ @@ -59,12 +49,10 @@ static bool become_uid(uid_t uid) if (uid == (uid_t)-1 || ((sizeof(uid_t) == 2) && (uid == (uid_t)65535))) { - static int done; - - if (!done) { + if (!become_uid_done) { DEBUG(1,("WARNING: using uid %d is a security risk\n", (int)uid)); - done = 1; + become_uid_done = true; } } @@ -86,12 +74,10 @@ static bool become_gid(gid_t gid) if (gid == (gid_t)-1 || ((sizeof(gid_t) == 2) && (gid == (gid_t)65535))) { - static int done; - - if (!done) { + if (!become_gid_done) { DEBUG(1,("WARNING: using gid %d is a security risk\n", (int)gid)); - done = 1; + become_gid_done = true; } } |