source: packages/utils/shadow/patches/002-disable-nis-lookup.patch @ 23893

Last change on this file since 23893 was 23893, checked in by jow, 6 years ago

[packages] add the shadow suite, provides useradd, usermod, userdel, groupadd, groupmod, groupdel utilities

File size: 1.0 KB
  • libmisc/login_access.c

    a b RCSID("$Id: login_access.c,v 1.6 1998/01 
    5353#include <arpa/inet.h>  /* for inet_ntoa() */ 
    5454 
    5555extern struct group *getgrnam(); 
    56 extern int innetgr(); 
    5756#if 0  /* should be defined by <errno.h> */ 
    5857extern int errno; 
    5958#endif 
    myhostname(void) 
    193192static int 
    194193netgroup_match(const char *group, const char *machine, const char *user) 
    195194{ 
    196 #if 0  /* original code */ 
    197 #ifdef NIS 
    198     static char *mydomain = 0; 
    199  
    200     if (mydomain == 0) 
    201         yp_get_default_domain(&mydomain); 
    202     return (innetgr(group, machine, user, mydomain)); 
    203 #else 
    204     syslog(LOG_ERR, "NIS netgroup support not configured"); 
    205     return (NO); 
    206 #endif 
    207 #else  /* works better with glibc? */ 
    208         static char *mydomain = 0; 
    209  
    210         if (mydomain == 0) { 
    211                 static char domain[MAXHOSTNAMELEN+1]; 
    212  
    213                 getdomainname(domain, MAXHOSTNAMELEN); 
    214                 mydomain = domain; 
    215         } 
    216  
    217         return innetgr(group, machine, user, mydomain); 
    218 #endif 
     195        return (NO); 
    219196} 
    220197 
    221198/* user_match - match a username against one token */ 
Note: See TracBrowser for help on using the repository browser.