X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/042a8da9053c205ea74ec1785c93ca4bcf4ea5e0..469fd1d95b2528212a46b155cb115c078de4228f:/secnet.c?ds=sidebyside diff --git a/secnet.c b/secnet.c index 489e0bf..a3cf153 100644 --- a/secnet.c +++ b/secnet.c @@ -106,7 +106,7 @@ static void parse_options(int argc, char **argv) break; case 'v': - message_level|=M_INFO|M_NOTICE|M_WARNING|M_ERROR|M_SECURITY| + message_level|=M_INFO|M_NOTICE|M_WARNING|M_ERR|M_SECURITY| M_FATAL; break; @@ -141,12 +141,12 @@ static void parse_options(int argc, char **argv) break; default: - Message(M_ERROR,"secnet: Unknown getopt code %c\n",c); + Message(M_ERR,"secnet: Unknown getopt code %c\n",c); } } if (argc-optind != 0) { - Message(M_ERROR,"secnet: You gave extra command line parameters, " + Message(M_ERR,"secnet: You gave extra command line parameters, " "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); + /* Close stdin, stdout and stderr; we don't need them any more */ + close(0); + close(1); + close(2); secnet_is_daemon=True; } else { /* Error */