Commit Graph

198 Commits

Author SHA1 Message Date
Werner Fink
27821f3c1b * Include limits.h in killall.c to enforce definition of PATH_MAX 2010-04-28 08:31:17 +00:00
Petter Reinholdtsen
cdb70c3a56 Only set the VSWTC field for termios in init if it is available, to get the source building on FreeBSD. 2010-04-27 19:51:01 +00:00
Petter Reinholdtsen
608673d2e3 Add #ifdef in bootlogd.c to avoid gcc warnings about unused variable on non-linux platforms. 2010-04-27 19:43:17 +00:00
Petter Reinholdtsen
9abf8cc828 The next release will be 2.89. 2010-04-27 14:33:32 +00:00
Werner Fink
d886c94c9f * Correct fix for Debian bug #547073: use IUTF8 flag if defined
and if already set to make sure the utf-8 flag is not cleared
  from the tty. Patch from Samuel Thibault.
2010-04-27 12:32:52 +00:00
Werner Fink
080abb9f99 * Set version in init.c : 2.88 2010-04-12 08:34:38 +00:00
Petter Reinholdtsen
d32b28e44e Do not strip binaries before installing them, to make it easier to get binaries with debug information installed. 2010-04-11 08:50:10 +00:00
Petter Reinholdtsen
b6ecd1eadc Incude definition for MNT_DETACH which is missing in older GNU libc headers. 2010-04-11 07:42:27 +00:00
Petter Reinholdtsen
66299c783d Add compatibility code to handle old path /etc/powerstatus for a while. 2010-04-11 07:41:25 +00:00
Werner Fink
1ef67cb310 * sulogin picking the SELinux context was broken. Patch by Daniel Walsh 2010-04-08 09:07:36 +00:00
Werner Fink
5e919cc4ca * ditto 2010-04-01 09:06:35 +00:00
Werner Fink
a6140d9d92 * ditto 2010-04-01 08:42:05 +00:00
Werner Fink
8d4557c16b * Remove PAM session start part from init as sulogin do not use
and will not use a PAM conv() function.  The current sulogin
   is able to handle DES as well as MD5, SHA, and Blowfish encrypted
   passwords due using getpwnam(3).
 * Enable the sulogin fallback password check to handle  MD5, SHA, and
   Blowfish encrypted passwords in case of getpwnam(3) fails.
2010-04-01 08:34:05 +00:00
Werner Fink
c49baa492c * ditto 2010-03-30 17:39:19 +00:00
Werner Fink
f8887767cb * Avoid SUSE specific sulogin prompt 2010-03-30 17:38:27 +00:00
Werner Fink
0c8868b54f * Extend sulogin to support additional encryption algorithms 2010-03-30 15:22:00 +00:00
Werner Fink
b2fec03199 * Test out PAM support, extend PAM support by providing environment
is specified by /etc/pam.d/init
 * Move utmp/wtmp before the execvp() in spawn() to be sure to
   use the correct pid even on a controlling tty
 * Remaining problem is that the pid of the second fork() for
   getting a controlling tty isn't that reported by spawn()
 * Re-enable writting utmp/wtmp for boot scripts
 * Provide a simply /etc/pam.d/init as without it will not work (sigh!)
2010-03-26 16:31:05 +00:00
Werner Fink
f69ea1f550 * Add fix for Debian bug #536574 -- Can be enabled by -DACCTON_OFF
* Add helper program fstab-decode to make it easier to handle
   /etc/mtab content. Patch by Miloslav Trmac and Fedora.
 * Add fix for Debian bug #335023 - Make sure TERM is set on FreeBSD.
 * Add fix for Debian bug #374038 - Make it clear that shutdown -c can
   only cancel a waiting shutdown, not an active one.
 * Add not to pidof manual page about the use of readlink(2). Patch by
   Bill Nottingham and Fedora.
 * Add changes for Debian bug #68621 - Add PAM support for programs spawned
   by init on the console like sulogin. Based on patch by Topi Miettinen.
2010-03-23 14:37:01 +00:00
Werner Fink
210e6a26a6 * Fix some minor problems
* init - enable is_selinux_enabled() to detect selinuxfs
2010-03-19 16:53:57 +00:00
Werner Fink
2950c304a1 * Increase buffer size for path checking to normal limit PATH_MAX+1 2010-03-19 14:10:55 +00:00
Werner Fink
94a203f9e1 remove empty blanks from empty lines 2010-03-19 14:09:15 +00:00
Werner Fink
b98dd2505c * sulogin - add the possibility to reset the terminal io 2010-03-12 18:18:28 +00:00
Werner Fink
d80bb06fec * init - avoid compiler warnings
* init - initialize console by using the macros from ttydefaults.h
  * init - add the possiblity to ignore further interrupts from keyboard
  * init - add the possiblity to set sane terminal line settings
2010-02-26 13:45:49 +00:00
Werner Fink
1107f3ba7d * pidof - shorten list check a bit for network based processes 2010-02-23 17:12:12 +00:00
Werner Fink
9e449b3f6d * pidof/killall5 - make omit pid list a dynamic one.
* pidof - provide '-n' to skip stat(2) syscall on network based FS.
2010-02-23 16:51:18 +00:00
Werner Fink
746d8c46a1 * remove left over 2010-02-23 13:23:08 +00:00
Werner Fink
009d7247e4 * Set SHELL to /bin/sh in the environmant of shutdown.
* Retry to write out shutdown messages if interrupted.
2010-02-23 12:26:26 +00:00
Werner Fink
2c2d31cb4c * Detected also removable block devices at halt/reboot to be able
to flush data and send them the ATA standby command.  This should
    avoid data loss on USB sticks and other removable block devices.
  * Flush block devices on halt/reboot if not done by the kernel.
2010-02-22 14:59:58 +00:00
Werner Fink
1874af5c9c * Add option -w to the last command to display the full user and
domain names in the output.  Patch from Petr Lautrbach.
  * Add a manual page for utmpdump as this tool is sometimes
    very useful even if not intended for normal use.
  * Use paths.h macros for wall
  * Change path "/etc/powerstatus" to "/var/run/powerstatus"
2010-02-19 15:51:36 +00:00
Werner Fink
13de2e9e05 Add the comment from Andrea Arcangeli about the correct
place of setting the default childhandler within spawn().
Make sure that newline is printed out for last(1) even
if an utmp record entry is truncated.
Check if utmp not only exists but is writable and delay
writing out of the utmp runlevel record if utmp is not writable.
Be able to find libcrypt also on 64 bit based architectures.
2009-11-24 10:03:19 +00:00
Petter Reinholdtsen
10a85c1427 Get rid of signed/unsigned warning. 2009-11-22 22:36:29 +00:00
Petter Reinholdtsen
ecb32a254f Leftover. 2009-11-22 22:32:54 +00:00
Petter Reinholdtsen
5da772c28f Make sure bootlogd fflush() every line, even if asked not to flush
to disk using fdatasync().  Patch from Scott Gifford via Debian.
2009-11-22 22:23:14 +00:00
Petter Reinholdtsen
8debc401f8 Make sure bootlogd findpty() returns an error value when it fails to
find a usable pty.  Patch from Rob Leslie via Debian.
2009-11-22 22:22:09 +00:00
Petter Reinholdtsen
5b95f110af Rewrite findtty() in bootlogd to recursively search /dev/ for the
correct device, to handle terminal devices for example in /dev/pty/.
Patch from Debian.
2009-11-22 22:21:02 +00:00
Petter Reinholdtsen
f8801cbcf1 Get rid of warning about unused argument fromshutdown, and make sure the wall string isn't changed by the wall() function. 2009-11-22 22:05:53 +00:00
Petter Reinholdtsen
093ad0026b Hide unused variable when not building with WITH_SELINUX. 2009-11-22 21:53:37 +00:00
Petter Reinholdtsen
de91f43eb8 Fix race condition in utmp writing. Patch from Gil Kloepfer via
Mike Frysinger and Gentoo.
2009-11-22 21:03:03 +00:00
Petter Reinholdtsen
b80d3844c1 Simplify build rules, based on patch from Mike Frysinger and Gentoo. 2009-11-20 22:55:47 +00:00
Petter Reinholdtsen
d56e3c239e Sync shutdown manual page and usage information. Patch from Mike
Frysinger and Gentoo.
2009-11-20 22:33:35 +00:00
Petter Reinholdtsen
6bf849d01d Print usage information when shutdown is used by non-root user. Patch from Mike Frysinger and Gentoo. 2009-11-14 21:35:42 +00:00
Petter Reinholdtsen
0088601eef Change tty handling in init to make sure the UTF-8 flag is not cleared on boot. Patch from Samuel Thibault. 2009-11-14 21:28:32 +00:00
Petter Reinholdtsen
6d894fd45b Add casts to get rid of compiler warning about signed/unsigned issues. 2009-11-14 21:27:13 +00:00
Petter Reinholdtsen
8caa4e87f5 Fix minor bug in optimizing of argument parsing. Based on report from jakemus on freshmeat. 2009-11-14 21:12:00 +00:00
Petter Reinholdtsen
483db5bc72 Adjust makefile to make sure the install directories are created before files are copied into them. 2009-11-14 21:09:19 +00:00
Petter Reinholdtsen
cd2937d3b7 Revert change from Fedora/RedHat where the now obsolete command
INIT_CMD_CHANGECONS was introduced.  Based on feedback and patch
from Bill Nottingham.
2009-11-14 21:00:43 +00:00
Petter Reinholdtsen
7d5009103e Next version will be 2.88. 2009-11-14 20:52:17 +00:00
Petter Reinholdtsen
2fe47a3c9f Drop hurd specific dependency on libc0.3 (>= 2.3.2.ds1-12). It is
no longer needed according to Michael Bunk.  Patch from Michael
Biebl.
2009-09-10 08:28:49 +00:00