home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
TELECOM
/
stg_v4.lzh
/
isgrpmem.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-11-11
|
533b
|
42 lines
#include "grp.h"
isgrpmem(pcGroup,pcUser)
char *pcGroup;
char *pcUser;
{
struct group *gr;
char **ppcList;
if (!pcUser)
exit(214);
gr=getgrnam(pcGroup);
if (!gr)
return(0);
ppcList=gr->gr_mem;
if (!ppcList || !*ppcList)
return(0);
if (**ppcList=='*')
{
ppcList++;
while (*ppcList)
{
if (!stricmp(*ppcList,pcUser))
return(0);
ppcList++;
}
return(1);
}
while (*ppcList)
{
if (!stricmp(*ppcList,pcUser))
return(1);
ppcList++;
}
return(0);
}