| 437 |
|
int delay=2; |
| 438 |
|
|
| 439 |
|
statgrab_init(); |
| 440 |
< |
#ifdef ALLBSD |
| 441 |
< |
if((setegid(getgid())) != 0){ |
| 442 |
< |
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 |
|
} |
| 445 |
– |
#endif |
| 446 |
– |
#ifdef SOLARIS |
| 447 |
– |
if((seteuid(getuid())) != 0){ |
| 448 |
– |
fprintf(stderr, "Failed to lose setuid'ness\n"); |
| 449 |
– |
return 1; |
| 450 |
– |
} |
| 451 |
– |
#endif |
| 444 |
|
|
| 445 |
|
while ((c = getopt(argc, argv, "vhd:")) != -1){ |
| 446 |
|
switch (c){ |