75046.606@CompuServe.COM (Larry W. Virden) (10/06/89)
I am looking for a program to provide additional / optional protection mechanism over/beside Unix permission modes. I believe that I have seen something out there on the net in the past. What I have in mind is a program which would read a user-provided database of 'groups' and determine whether the user in question was permitted to access a particular file. There would have to be various security features built into the software, but this would allow a project or individual maintain some level of control wihtout having to go thru adding groups to a system group file. Perhaps someone remembers seeing something like this?
jfh@rpp386.cactus.org (John F. Haugh II) (10/07/89)
In article <"891006132638.75046.606.CHD50-2"@CompuServe.COM> 75046.606@CompuServe.COM (Larry W. Virden) writes: >What I have in mind is a program which would read a user-provided >database of 'groups' and determine whether the user in question was >permitted to access a particular file. There would have to be >various security features built into the software, but this would >allow a project or individual maintain some level of control wihtout >having to go thru adding groups to a system group file. Perhaps >someone remembers seeing something like this? What about ... groupaccess (file) char *file; { struct stat sb; struct group *gp; char *user = logname(); char *cp; stat (file, &sb); gp = getgrgid (sb.st_gid); for (cp = gp->gr_mem;cp;cp++) if (strcmp (cp, logname) == 0) break; return (cp != 0); } -- John F. Haugh II +-Things you didn't want to know:------ VoiceNet: (512) 832-8832 Data: -8835 | The real meaning of MACH is ... InterNet: jfh@rpp386.cactus.org | ... Messages Are Crufty Hacks. UUCPNet: {texbell|bigtex}!rpp386!jfh +--------------------------------------