~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
polypath: Close parent's socket in child
[secnet]
/
secnet.c
diff --git
a/secnet.c
b/secnet.c
index
111a1b0
..
30db8e1
100644
(file)
--- a/
secnet.c
+++ b/
secnet.c
@@
-383,6
+383,12
@@
static void run(void)
free(fds);
}
free(fds);
}
+bool_t will_droppriv(void)
+{
+ assert(current_phase >= PHASE_SETUP);
+ return !!uid;
+}
+
/* Surrender privileges, if necessary */
static void droppriv(void)
{
/* Surrender privileges, if necessary */
static void droppriv(void)
{
@@
-469,6
+475,8
@@
int main(int argc, char **argv)
{
dict_t *config;
{
dict_t *config;
+ phase_hooks_init();
+
enter_phase(PHASE_GETOPTS);
parse_options(argc,argv);
enter_phase(PHASE_GETOPTS);
parse_options(argc,argv);