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

Comparing projects/libstatgrab/src/statgrab/statgrab.c (file contents):
Revision 1.14 by ats, Mon Jan 5 16:39:15 2004 UTC vs.
Revision 1.15 by ats, Mon Jan 5 17:20:30 2004 UTC

# Line 608 | Line 608 | int main(int argc, char **argv) {
608          /* We don't care if statgrab_init fails, because we can just display
609             the statistics that can be read as non-root. */
610          statgrab_init();
611 < #ifdef ALLBSD
612 <        if (setegid(getgid()) != 0)
613 <                die("Failed to lose effective group");
614 < #endif
615 < #ifdef SOLARIS
616 <        if (seteuid(getuid()) != 0)
617 <                die("Failed to lose effective user");
618 < #endif
611 >        if (statgrab_drop_privileges() != 0)
612 >                die("Failed to drop setuid/setgid privileges");
613  
614          switch (repeat_mode) {
615          case REPEAT_NONE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines