ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/libstatgrab/src/saidar/saidar.c
(Generate patch)

Comparing projects/libstatgrab/src/saidar/saidar.c (file contents):
Revision 1.20 by pajs, Mon Jan 5 14:25:03 2004 UTC vs.
Revision 1.22 by ats, Mon Jan 5 17:20:30 2004 UTC

# Line 435 | Line 435 | int main(int argc, char **argv){
435          extern int errno;
436  
437          int delay=2;
438 < #ifdef ALLBSD
439 <        gid_t gid;
440 < #endif
438 >
439          statgrab_init();
440 < #ifdef ALLBSD
441 <        if((setegid(getgid())) != 0){
444 <                fprintf(stderr, "Failed to lose setgid'ness\n");
440 >        if(statgrab_drop_privileges() != 0){
441 >                fprintf(stderr, "Failed to drop setuid/setgid privileges\n");
442                  return 1;
443          }
447 #endif
448 #ifdef SOLARIS
449        if((seteuid(getuid())) != 0){
450                fprintf(stderr, "Failed to lose setuid'ness\n");
451                return 1;
452        }      
453 #endif
444                  
445          while ((c = getopt(argc, argv, "vhd:")) != -1){
446                  switch (c){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines