From 7747dd82f79bc503efe6a2d3139413afb8dda864 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 31 May 2010 10:43:19 -0400 Subject: s3:smbd user_in_network() doesn't need sconn anymore Signed-off-by: Andreas Schneider --- source3/include/proto.h | 3 +-- source3/smbd/password.c | 11 +++++------ source3/smbd/share_access.c | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) (limited to 'source3') 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; } } -- cgit