version 1.2, 1999/12/10 06:45:12 |
version 1.3, 2000/01/24 04:22:53 |
|
|
/* |
/* |
* Copyright (c) 1996, 1998, 1999 Todd C. Miller <Todd.Miller@courtesan.com> |
* Copyright (c) 1996, 1998-2000 Todd C. Miller <Todd.Miller@courtesan.com> |
* All rights reserved. |
* All rights reserved. |
* |
* |
* This code is derived from software contributed by Chris Jepeway |
* This code is derived from software contributed by Chris Jepeway |
|
|
#endif /* HAVE_FNMATCH */ |
#endif /* HAVE_FNMATCH */ |
|
|
#ifndef lint |
#ifndef lint |
static const char rcsid[] = "$Sudo: testsudoers.c,v 1.66 1999/12/09 03:54:57 millert Exp $"; |
static const char rcsid[] = "$Sudo: testsudoers.c,v 1.68 2000/01/17 23:46:26 millert Exp $"; |
#endif /* lint */ |
#endif /* lint */ |
|
|
/* |
/* |
|
|
} |
} |
|
|
int |
int |
netgr_matches(netgr, host, user) |
netgr_matches(netgr, host, shost, user) |
char *netgr; |
char *netgr; |
char *host; |
char *host; |
|
char *shost; |
char *user; |
char *user; |
{ |
{ |
#ifdef HAVE_GETDOMAINNAME |
#ifdef HAVE_GETDOMAINNAME |
|
|
#endif /* HAVE_GETDOMAINNAME */ |
#endif /* HAVE_GETDOMAINNAME */ |
|
|
#ifdef HAVE_INNETGR |
#ifdef HAVE_INNETGR |
return(innetgr(netgr, host, user, domain)); |
if (innetgr(netgr, host, user, domain)) |
#else |
return(TRUE); |
return(FALSE); |
else if (host != shost && innetgr(netgr, shost, user, domain)) |
|
return(TRUE); |
#endif /* HAVE_INNETGR */ |
#endif /* HAVE_INNETGR */ |
|
|
|
return(FALSE); |
} |
} |
|
|
void |
void |