mirror of
https://github.com/clearml/dropbear
synced 2025-02-12 07:25:30 +00:00
- Initialise sa_mask properly
This commit is contained in:
parent
6c4390c848
commit
a15fc009da
6
debug.h
6
debug.h
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
/* Work well for valgrind - don't clear environment, be nicer with signals
|
/* Work well for valgrind - don't clear environment, be nicer with signals
|
||||||
* etc. Don't use this normally, it might cause problems */
|
* etc. Don't use this normally, it might cause problems */
|
||||||
/* #define DEBUG_VALGRIND */
|
#define DEBUG_VALGRIND
|
||||||
|
|
||||||
/* Define this to compile in trace debugging printf()s.
|
/* Define this to compile in trace debugging printf()s.
|
||||||
* You'll need to run programs with "-v" to turn this on.
|
* You'll need to run programs with "-v" to turn this on.
|
||||||
@ -39,7 +39,7 @@
|
|||||||
* Caution: Don't use this in an unfriendly environment (ie unfirewalled),
|
* Caution: Don't use this in an unfriendly environment (ie unfirewalled),
|
||||||
* since the printing may not sanitise strings etc. This will add a reasonable
|
* since the printing may not sanitise strings etc. This will add a reasonable
|
||||||
* amount to your executable size. */
|
* amount to your executable size. */
|
||||||
/*#define DEBUG_TRACE */
|
#define DEBUG_TRACE
|
||||||
|
|
||||||
/* All functions writing to the cleartext payload buffer call
|
/* All functions writing to the cleartext payload buffer call
|
||||||
* CHECKCLEARTOWRITE() before writing. This is only really useful if you're
|
* CHECKCLEARTOWRITE() before writing. This is only really useful if you're
|
||||||
@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
/* To debug with GDB it is easier to run with no forking of child processes.
|
/* To debug with GDB it is easier to run with no forking of child processes.
|
||||||
You will need to pass "-F" as well. */
|
You will need to pass "-F" as well. */
|
||||||
/* #define DEBUG_NOFORK */
|
#define DEBUG_NOFORK
|
||||||
|
|
||||||
|
|
||||||
/* For testing as non-root on shadowed systems, include the crypt of a password
|
/* For testing as non-root on shadowed systems, include the crypt of a password
|
||||||
|
@ -137,7 +137,7 @@ static void sesssigchild_handler(int UNUSED(dummy)) {
|
|||||||
|
|
||||||
sa_chld.sa_handler = sesssigchild_handler;
|
sa_chld.sa_handler = sesssigchild_handler;
|
||||||
sa_chld.sa_flags = SA_NOCLDSTOP;
|
sa_chld.sa_flags = SA_NOCLDSTOP;
|
||||||
sa_chld.sa_mask = 0;
|
sigemptyset(&sa_chld.sa_mask);
|
||||||
sigaction(SIGCHLD, &sa_chld, NULL);
|
sigaction(SIGCHLD, &sa_chld, NULL);
|
||||||
TRACE(("leave sigchld handler"))
|
TRACE(("leave sigchld handler"))
|
||||||
}
|
}
|
||||||
@ -981,6 +981,7 @@ void svr_chansessinitialise() {
|
|||||||
svr_ses.lastexit.exitpid = -1; /* Nothing has exited yet */
|
svr_ses.lastexit.exitpid = -1; /* Nothing has exited yet */
|
||||||
sa_chld.sa_handler = sesssigchild_handler;
|
sa_chld.sa_handler = sesssigchild_handler;
|
||||||
sa_chld.sa_flags = SA_NOCLDSTOP;
|
sa_chld.sa_flags = SA_NOCLDSTOP;
|
||||||
|
sigemptyset(&sa_chld.sa_mask);
|
||||||
if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
|
if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
|
||||||
dropbear_exit("signal() error");
|
dropbear_exit("signal() error");
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ static void commonsetup() {
|
|||||||
/* catch and reap zombie children */
|
/* catch and reap zombie children */
|
||||||
sa_chld.sa_handler = sigchld_handler;
|
sa_chld.sa_handler = sigchld_handler;
|
||||||
sa_chld.sa_flags = SA_NOCLDSTOP;
|
sa_chld.sa_flags = SA_NOCLDSTOP;
|
||||||
sa_chld.sa_mask = 0;
|
sigemptyset(&sa_chld.sa_mask);
|
||||||
if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
|
if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
|
||||||
dropbear_exit("signal() error");
|
dropbear_exit("signal() error");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user