fix(feuille.c): ignore SIGPIPE errors
feuille was being killed by SIGPIPE when it tried to send data to an already closed socket (e.g. when someone did a nmap scan on feuille's port.)
This commit is contained in:
parent
aeee552947
commit
42cdd1e16d
1 changed files with 5 additions and 0 deletions
|
@ -270,6 +270,11 @@ int main(int argc, char *argv[])
|
||||||
daemon(1, 0);
|
daemon(1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ignore most signals that could kill feuille */
|
||||||
|
verbose(3, "ignoring signals that could kill feuille...");
|
||||||
|
|
||||||
|
signal(SIGPIPE, SIG_IGN); /* when send(2) or write(2) fails */
|
||||||
|
|
||||||
|
|
||||||
/* chroot and drop root permissions */
|
/* chroot and drop root permissions */
|
||||||
if (getuid() == 0) {
|
if (getuid() == 0) {
|
||||||
|
|
Reference in a new issue