← Commit list

8c76487f0

Denis Vlasenko
Denis Vlasenko
2006-10-31
FAILED Duration: 4s

Subject

login: add big fat comment about SIGINT - prevent adding/deleting that code again and again

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

loginutils/login.c+8 -1
@@ -386,7 +386,14 @@ auth_failed:
// /* TIOCSCTTY: steal tty from other process group */
// if (ioctl(0, TIOCSCTTY, 1)) error_msg...
- signal(SIGALRM, SIG_DFL); /* set signals to defaults */
+ /* set signals to defaults */
+ signal(SIGALRM, SIG_DFL);
+ /* Is this correct? This way user can ctrl-c out of /etc/profile,
+ * potentially creating security breach (tested with bash 3.0).
+ * But without this, bash 3.0 will not enable ctrl-c either.
+ * Maybe bash is buggy?
+ * Need to find out what standards say about /bin/login -
+ * should it leave SIGINT etc enabled or disabled? */
signal(SIGINT, SIG_DFL);
run_shell(tmp, 1, 0, 0); /* exec the shell finally */