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.11 by ats, Sun Oct 19 01:25:55 2003 UTC vs.
Revision 1.15 by ats, Mon Jan 5 17:20:30 2004 UTC

# Line 279 | Line 279 | void populate_fs() {
279                                  die("out of memory");
280  
281                          name = buf;
282 +                        if (strlen(name) == 2 && name[1] == ':')
283 +                                name[1] = '\0';
284                          if (strncmp(name, "/dev/", 5) == 0)
285                                  name += 5;
286                          while ((p = strchr(name, '/')) != NULL)
# Line 602 | Line 604 | int main(int argc, char **argv) {
604                  use_diffs = 1;
605  
606          select_interesting(argc - optind, &argv[optind]);
607 +
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 +        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