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.18 by ats, Fri Nov 7 18:39:39 2003 UTC vs.
Revision 1.23 by tdb, Fri Jan 16 15:54:56 2004 UTC

# Line 1 | Line 1
1   /*
2   * i-scream central monitoring system
3   * http://www.i-scream.org
4 < * Copyright (C) 2000-2002 i-scream
4 > * Copyright (C) 2000-2004 i-scream
5   *
6   * This program is free software; you can redistribute it and/or
7   * modify it under the terms of the GNU General Public License
# 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
444                  
445          while ((c = getopt(argc, argv, "vhd:")) != -1){
446                  switch (c){
# Line 454 | Line 450 | int main(int argc, char **argv){
450                                          fprintf(stderr, "Time must be 1 second or greater\n");
451                                          exit(1);
452                                  }
457                                delay--;
453                                  break;
454                          case 'v':
455                                  version_num(argv[0]);  
# Line 464 | Line 459 | int main(int argc, char **argv){
459                                  usage(argv[0]);
460                                  return 1;
461                                  break;
467                                
462                  }
463          }
464  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines