diff options
author | Simo Sorce <ssorce@redhat.com> | 2010-05-31 10:43:19 -0400 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2010-05-31 18:21:29 +0200 |
commit | 7747dd82f79bc503efe6a2d3139413afb8dda864 (patch) | |
tree | 4d0c6acfc4178aac97c04b1c4e5991568b9bd7f4 /source3 | |
parent | b32b59d47f8ec597be9d215e5e260e5d1411d3a4 (diff) | |
download | samba-7747dd82f79bc503efe6a2d3139413afb8dda864.tar.gz samba-7747dd82f79bc503efe6a2d3139413afb8dda864.tar.xz samba-7747dd82f79bc503efe6a2d3139413afb8dda864.zip |
s3:smbd user_in_network() doesn't need sconn anymore
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 3 | ||||
-rw-r--r-- | source3/smbd/password.c | 11 | ||||
-rw-r--r-- | source3/smbd/share_access.c | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index cae51e5ee3d..d52ce69e729 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -5971,8 +5971,7 @@ void add_session_user(struct smbd_server_connection *sconn, const char *user); void add_session_workgroup(struct smbd_server_connection *sconn, const char *workgroup); const char *get_session_workgroup(struct smbd_server_connection *sconn); -bool user_in_netgroup(struct smbd_server_connection *sconn, - const char *user, const char *ngname); +bool user_in_netgroup(const char *user, const char *ngname); bool user_in_list(struct smbd_server_connection *sconn, const char *user,const char **list); bool authorise_login(struct smbd_server_connection *sconn, diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 7101f7c8c47..6919e8bb3a0 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -408,8 +408,7 @@ const char *get_session_workgroup(struct smbd_server_connection *sconn) try lower case. ****************************************************************************/ -bool user_in_netgroup(struct smbd_server_connection *sconn, - const char *user, const char *ngname) +bool user_in_netgroup(const char *user, const char *ngname) { #ifdef HAVE_NETGROUP static char *my_yp_domain = NULL; @@ -489,7 +488,7 @@ bool user_in_list(struct smbd_server_connection *sconn, * Old behaviour. Check netgroup list * followed by UNIX list. */ - if(user_in_netgroup(sconn, user, *list +1)) + if(user_in_netgroup(user, *list +1)) return True; if(user_in_group(user, *list +1)) return True; @@ -501,7 +500,7 @@ bool user_in_list(struct smbd_server_connection *sconn, */ if(user_in_group(user, *list +2)) return True; - if(user_in_netgroup(sconn, user, *list +2)) + if(user_in_netgroup(user, *list +2)) return True; } else { @@ -520,7 +519,7 @@ bool user_in_list(struct smbd_server_connection *sconn, /* * Search netgroup list followed by UNIX list. */ - if(user_in_netgroup(sconn, user, *list +2)) + if(user_in_netgroup(user, *list +2)) return True; if(user_in_group(user, *list +2)) return True; @@ -528,7 +527,7 @@ bool user_in_list(struct smbd_server_connection *sconn, /* * Just search netgroup list. */ - if(user_in_netgroup(sconn, user, *list +1)) + if(user_in_netgroup(user, *list +1)) return True; } } diff --git a/source3/smbd/share_access.c b/source3/smbd/share_access.c index 9800e4f01a2..d41b05d1d8c 100644 --- a/source3/smbd/share_access.c +++ b/source3/smbd/share_access.c @@ -131,7 +131,7 @@ static bool token_contains_name(TALLOC_CTX *mem_ctx, } if (*prefix == '&') { if (username) { - if (user_in_netgroup(sconn, username, name)) { + if (user_in_netgroup(username, name)) { return True; } } |