diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-01-08 12:03:45 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-01-08 12:22:21 +0100 |
commit | 3dde0cbb769b92d922be13677ad076cae9b6a693 (patch) | |
tree | 78594e39465f545c7252eaef7bc469ceb80c4d71 /source3/smbd/password.c | |
parent | defb574c2573a73335a2735e89e4cb5f96c4c069 (diff) | |
download | samba-3dde0cbb769b92d922be13677ad076cae9b6a693.tar.gz samba-3dde0cbb769b92d922be13677ad076cae9b6a693.tar.bz2 samba-3dde0cbb769b92d922be13677ad076cae9b6a693.zip |
s3:smbd: move all globals and static variables in globals.[ch]
The goal is to move all this variables into a big context structure.
metze
Diffstat (limited to 'source3/smbd/password.c')
-rw-r--r-- | source3/smbd/password.c | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 005d92bd88..293ba85852 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -19,16 +19,7 @@ */ #include "includes.h" - -/* users from session setup */ -static char *session_userlist = NULL; -/* workgroup from session setup. */ -static char *session_workgroup = NULL; - -/* this holds info on user ids that are already validated for this VC */ -static user_struct *validated_users; -static uint16_t next_vuid = VUID_OFFSET; -static int num_validated_vuids; +#include "smbd/globals.h" enum server_allocated_state { SERVER_ALLOCATED_REQUIRED_YES, SERVER_ALLOCATED_REQUIRED_NO, @@ -403,21 +394,20 @@ const char *get_session_workgroup(void) bool user_in_netgroup(const char *user, const char *ngname) { #ifdef HAVE_NETGROUP - static char *mydomain = NULL; fstring lowercase_user; - if (mydomain == NULL) - yp_get_default_domain(&mydomain); + if (my_yp_domain == NULL) + yp_get_default_domain(&my_yp_domain); - if(mydomain == NULL) { + if(my_yp_domain == NULL) { DEBUG(5,("Unable to get default yp domain, " "let's try without specifying it\n")); } DEBUG(5,("looking for user %s of domain %s in netgroup %s\n", - user, mydomain?mydomain:"(ANY)", ngname)); + user, my_yp_domain?my_yp_domain:"(ANY)", ngname)); - if (innetgr(ngname, NULL, user, mydomain)) { + if (innetgr(ngname, NULL, user, my_yp_domain)) { DEBUG(5,("user_in_netgroup: Found\n")); return (True); } else { @@ -431,9 +421,9 @@ bool user_in_netgroup(const char *user, const char *ngname) strlower_m(lowercase_user); DEBUG(5,("looking for user %s of domain %s in netgroup %s\n", - lowercase_user, mydomain?mydomain:"(ANY)", ngname)); + lowercase_user, my_yp_domain?my_yp_domain:"(ANY)", ngname)); - if (innetgr(ngname, NULL, lowercase_user, mydomain)) { + if (innetgr(ngname, NULL, lowercase_user, my_yp_domain)) { DEBUG(5,("user_in_netgroup: Found\n")); return (True); } |