From 64cdbddbc1e0f63302aee4f02213d7a771feb315 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 18 Feb 2004 15:31:25 +0000 Subject: don't inlcude rpc/rpc.h and rpcsvc/*.h anymore and remove NET_GROUP stuff, this needs to be implemented in a better way if we ever readd this metze (This used to be commit da5f22976fb40ec96160439c7a926a15805fc7f0) --- source4/lib/username.c | 42 ------------------------------------------ 1 file changed, 42 deletions(-) (limited to 'source4/lib') diff --git a/source4/lib/username.c b/source4/lib/username.c index 084d7e0bdb..2d6cd651c5 100644 --- a/source4/lib/username.c +++ b/source4/lib/username.c @@ -178,35 +178,6 @@ struct passwd *Get_Pwnam(const char *user) return ret; } -/**************************************************************************** - Check if a user is in a netgroup user list. -****************************************************************************/ - -static BOOL user_in_netgroup_list(const char *user, const char *ngname) -{ -#ifdef HAVE_NETGROUP - /* static char *mydomain = NULL; */ - /* REWRITE: make thread safe if caching */ - char *mydomain = NULL; - /*if (mydomain == NULL) */ - yp_get_default_domain(&mydomain); - - if(mydomain == NULL) { - DEBUG(5,("Unable to get default yp domain\n")); - return False; - } - - DEBUG(5,("looking for user %s of domain %s in netgroup %s\n", - user, mydomain, ngname)); - DEBUG(5,("innetgr is %s\n", innetgr(ngname, NULL, user, mydomain) - ? "TRUE" : "FALSE")); - - if (innetgr(ngname, NULL, user, mydomain)) - return (True); -#endif /* HAVE_NETGROUP */ - return False; -} - /**************************************************************************** Check if a user is in a winbind group. ****************************************************************************/ @@ -398,8 +369,6 @@ BOOL user_in_list(const char *user,const char **list, gid_t *groups, size_t n_gr * Old behaviour. Check netgroup list * followed by UNIX list. */ - if(user_in_netgroup_list(user, *list +1)) - return True; if(user_in_group_list(user, *list +1, groups, n_groups)) return True; } else if (**list == '+') { @@ -410,9 +379,6 @@ BOOL user_in_list(const char *user,const char **list, gid_t *groups, size_t n_gr */ if(user_in_group_list(user, *list +2, groups, n_groups)) return True; - if(user_in_netgroup_list(user, *list +2)) - return True; - } else { /* @@ -429,16 +395,8 @@ BOOL user_in_list(const char *user,const char **list, gid_t *groups, size_t n_gr /* * Search netgroup list followed by UNIX list. */ - if(user_in_netgroup_list(user, *list +2)) - return True; if(user_in_group_list(user, *list +2, groups, n_groups)) return True; - } else { - /* - * Just search netgroup list. - */ - if(user_in_netgroup_list(user, *list +1)) - return True; } } else if (!name_is_local(*list)) { /* -- cgit