mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-04-07 08:21:07 -04:00
style
This commit is contained in:
parent
6259c5f5d3
commit
0679c76778
1 changed files with 3 additions and 6 deletions
9
dwl.c
9
dwl.c
|
|
@ -1122,16 +1122,13 @@ drop_permissions(void)
|
|||
{
|
||||
if (getuid() != geteuid() || getgid() != getegid()) {
|
||||
/* Set the gid and uid in the correct order. */
|
||||
if (setgid(getgid()) != 0) {
|
||||
if (setgid(getgid()) != 0)
|
||||
die("Unable to drop root group, refusing to start");
|
||||
}
|
||||
if (setuid(getuid()) != 0) {
|
||||
if (setuid(getuid()) != 0)
|
||||
die("Unable to drop root user, refusing to start");
|
||||
}
|
||||
}
|
||||
if (setgid(0) != -1 || setuid(0) != -1) {
|
||||
if (setgid(0) != -1 || setuid(0) != -1)
|
||||
die("Unable to drop root, refusing to start");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue