projects
/
darkstat-debian
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use the host compiler for build tool c-ify.
[darkstat-debian]
/
conv.c
diff --git
a/conv.c
b/conv.c
index
265f864
..
e1ff414
100644
(file)
--- a/
conv.c
+++ b/
conv.c
@@
-24,13
+24,14
@@
#include "err.h"
#include <errno.h>
#include <fcntl.h>
#include "err.h"
#include <errno.h>
#include <fcntl.h>
+#include <grp.h>
+#include <limits.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <pwd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
-#include <limits.h>
#define PATH_DEVNULL "/dev/null"
#define PATH_DEVNULL "/dev/null"
@@
-310,6
+311,12
@@
void privdrop(const char *chroot_dir, const char *privdrop_user) {
err(1, "chroot(\"%s\") failed", chroot_dir);
verbosef("chrooted into: %s", chroot_dir);
}
err(1, "chroot(\"%s\") failed", chroot_dir);
verbosef("chrooted into: %s", chroot_dir);
}
+ {
+ gid_t list[1];
+ list[0] = pw->pw_gid;
+ if (setgroups(1, list) == -1)
+ err(1, "setgroups");
+ }
if (setgid(pw->pw_gid) == -1)
err(1, "setgid");
if (setuid(pw->pw_uid) == -1)
if (setgid(pw->pw_gid) == -1)
err(1, "setgid");
if (setuid(pw->pw_uid) == -1)