~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import release 0.1.10
[secnet]
/
secnet.c
diff --git
a/secnet.c
b/secnet.c
index
489e0bf
..
a3cf153
100644
(file)
--- a/
secnet.c
+++ b/
secnet.c
@@
-106,7
+106,7
@@
static void parse_options(int argc, char **argv)
break;
case 'v':
break;
case 'v':
- message_level|=M_INFO|M_NOTICE|M_WARNING|M_ERR
OR
|M_SECURITY|
+ message_level|=M_INFO|M_NOTICE|M_WARNING|M_ERR|M_SECURITY|
M_FATAL;
break;
M_FATAL;
break;
@@
-141,12
+141,12
@@
static void parse_options(int argc, char **argv)
break;
default:
break;
default:
- Message(M_ERR
OR
,"secnet: Unknown getopt code %c\n",c);
+ Message(M_ERR,"secnet: Unknown getopt code %c\n",c);
}
}
if (argc-optind != 0) {
}
}
if (argc-optind != 0) {
- Message(M_ERR
OR
,"secnet: You gave extra command line parameters, "
+ Message(M_ERR,"secnet: You gave extra command line parameters, "
"which were ignored.\n");
}
}
"which were ignored.\n");
}
}
@@
-342,6
+342,10
@@
static void droppriv(void)
} else if (p==0) {
/* Child process - all done, just carry on */
if (pf) fclose(pf);
} else if (p==0) {
/* Child process - all done, just carry on */
if (pf) fclose(pf);
+ /* Close stdin, stdout and stderr; we don't need them any more */
+ close(0);
+ close(1);
+ close(2);
secnet_is_daemon=True;
} else {
/* Error */
secnet_is_daemon=True;
} else {
/* Error */