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.9 by tdb, Sat Oct 18 15:05:17 2003 UTC vs.
Revision 1.10 by pajs, Mon Oct 20 15:25:48 2003 UTC

# Line 397 | Line 397 | int main(int argc, char **argv){
397          char ch;
398  
399          int delay=2;
400 <
400 > #ifdef ALLBSD
401 >        gid_t gid;
402 > #endif
403 >        if(statgrab_init() != 0){
404 >                fprintf(stderr, "statgrab_init failed. Please check the permissions\n");
405 >                return 1;
406 >        }
407 > #ifdef ALLBSD
408 >        if((setegid(getgid())) != 0){
409 >                fprintf(stderr, "Failed to lose setgid'ness\n");
410 >                return 1;
411 >        }
412 > #endif
413 >                
414          while ((c = getopt(argc, argv, "vhd:")) != EOF){
415                  switch (c){
416                          case 'd':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines