# | Line 25 | Line 25 | |
---|---|---|
25 | #include <stdio.h> | |
26 | #include <string.h> | |
27 | #include <stdlib.h> | |
28 | + | #include <unistd.h> |
29 | #include <sys/types.h> | |
30 | #include <regex.h> | |
31 | #ifdef ALLBSD | |
# | Line 337 | Line 338 | int statgrab_init(){ | |
338 | #endif | |
339 | return 0; | |
340 | } | |
341 | + | |
342 | + | int statgrab_drop_privileges() { |
343 | + | if (setegid(getgid()) != 0) return -1; |
344 | + | if (seteuid(getuid()) != 0) return -1; |
345 | + | return 0; |
346 | + | } |
347 | + |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |