mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-12-17 02:13:18 +00:00
style
This commit is contained in:
parent
6259c5f5d3
commit
0679c76778
9
dwl.c
9
dwl.c
@ -1122,16 +1122,13 @@ drop_permissions(void)
|
|||||||
{
|
{
|
||||||
if (getuid() != geteuid() || getgid() != getegid()) {
|
if (getuid() != geteuid() || getgid() != getegid()) {
|
||||||
/* Set the gid and uid in the correct order. */
|
/* 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");
|
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");
|
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");
|
die("Unable to drop root, refusing to start");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user