summaryrefslogtreecommitdiffstats
path: root/login-utils/Makemodule.am
Commit message (Collapse)AuthorAgeFilesLines
* runuser: fix linkingSami Kerola2017-09-181-0/+3
| | | | | | | | | | Add conditional -lutil to runuser when needed to avoid linking error. login-utils/su-common.o: In function `pty_create': login-utils/su-common.c:269: undefined reference to `openpty' login-utils/su-common.c:273: undefined reference to `openpty' Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* su: add PTY supportKarel Zak2017-09-181-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: make chown usage more robustKarel Zak2017-06-211-1/+3
| | | | | | | | * add --disable-makeinstall-chown to travis non-root mode * use "if MAKEINSTALL_DO_SETUID" for chown root:root Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: chown before chmod for SUIDsKarel Zak2017-06-201-0/+1
| | | | | | | Make sure SUIDs are really owned by root. Reported-by: L A Walsh <lkml@tlinx.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn, chsh: use readline(3) to receive user inputSami Kerola2017-05-031-1/+1
| | | | | | | The readline offers editing capabilities while the user is entering the line, unlike fgets(3) and getline(3) that were used earlier. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Revert "su,runuser: add libseccomp based workaround for TIOCSTI ioctl"Karel Zak2016-10-031-4/+3Star
| | | | | | This reverts commit 8e4925016875c6a4f2ab4f833ba66f0fc57396a2. Stupid hack...
* su,runuser: add libseccomp based workaround for TIOCSTI ioctlKarel Zak2016-09-291-3/+4
| | | | | | | | | | | This patch add libseccomp based syscalls filter to disable TIOCSTI ioctl in su/runuser children. IMHO it is not elegant solution due to dependence on libseccomp (--without-seccomp if hate it)... but there is nothing better for now. Addresses: CVE-2016-2779 Signed-off-by: Karel Zak <kzak@redhat.com>
* utmpdump: use iso-8601 timestamp format with subsecond accuracySami Kerola2016-06-261-0/+1
| | | | | | | | | | Newer 'struct utmp' is using 'struct timeval' to represent login and logout times, so include the maximum accuracy to textual utmp format. Notice that this change does not remove support of converting earlier textual formats back to binary. But conversions from binary to former format will no longer be available. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: always add AM_CFLAGSRuediger Meier2016-02-231-1/+1
| | | | | | | | We were missing our nice compliler warnings for many programs and libs. See next commits how many trivial and non-trival warnings have to be fixed. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* build-sys: always use global LDADDRuediger Meier2016-02-231-1/+1
| | | | | | | | This was a major showstopper when building on a system where LTLIBINTL libs are needed (e.g. OSX). Maybe there are a few test programs which wouldn't need LDADD ... never mind. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* last-deprecated: remove from source treeSami Kerola2015-06-291-7/+0Star
| | | | | | | | | The last/lastb(1) from sysvinit has been around for about two years, and the better implementation is already part of releases 2.24 to 2.26. It should be safe to remove the unused last code from the source tree. Reference: ce60272039ea11952b15fefb653892dd0da02217 Signed-off-by: Sami Kerola <sami.kerola@lastminute.com>
* build-sys: cleanup realtime lib usageKarel Zak2015-03-061-1/+1
| | | | | | | | * check for timer_create() * define dependence on timer_create() for flock * rename CLOCKGETTIME_LIBS to REALTIME_LIBS Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn, chsh: share illegal_passwd_chars() functionSami Kerola2015-01-051-1/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* chfn: make command to obey login.defs CHFN_RESTRICT instructionsSami Kerola2014-12-191-1/+5
| | | | | | Reference: http://man7.org/linux/man-pages/man5/login.defs.5.html Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=138519 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* login-utils: Enable building util-linux against OpenPAMWill Johansson2014-12-151-5/+17
| | | | | | | | | | OpenPAM is compatible with util-linux, with a few changes, namely using OpenPAM's conversation function, openpam_ttyconv. We check for Linux-PAM by querying for security/pam_misc.h, and OpenPAM by querying for security/openpam.h. Signed-off-by: Will Johansson <will.johansson@gmail.com>
* build-sys: move all around clock_gettime() to monotonic.cKarel Zak2014-11-191-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: properly check for -lrtKarel Zak2014-10-271-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslogins: print systemd journal logsKarel Zak2014-05-271-0/+4
| | | | | Co-Author: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* lslogins: add functionalityOndrej Oprala2014-05-151-13/+13
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* lslogins: move to login-utilsOndrej Oprala2014-05-151-0/+13
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* lib/timeutils: remove get_boot_time from libcommonKarel Zak2014-05-061-2/+2
| | | | | | | | clock_gettime() needs -lrt, so let's keep this stuff outside libcommon.la Reported-by: Ruediger Meier <sweet_f_a@gmx.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* nologin: add new commandKarel Zak2013-09-301-0/+7
| | | | | | | Currently it's maintained as distro specific (or people use impolite /bin/false way). Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix lastb symlinkKarel Zak2013-09-271-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* last: parse easy to use time formatsSami Kerola2013-08-291-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* last: check expected numeric user input is numberSami Kerola2013-08-231-1/+1
| | | | | | | This commit also changes the line count to use unsigned integers, as negative numbers in this context does not make sense. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: fix last stuffKarel Zak2013-08-121-3/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* last: merge sysvinit last/lastbOndrej Oprala2013-08-121-1/+15
| | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* chsh-chfn: fix bugs, improve compilationKarel Zak2013-02-131-8/+15
| | | | | | | | | | | | | | * rename --disable-require-password to --disable-chsh-chfn-password * is_local() is really unnecessary when linked with libuser * fix set_value_libuser() returns codes * fix chfn.c, there is no 'pw', but oldf.pw * don't link with PAM when--disable-chsh-chfn-password Signed-off-by: Karel Zak <kzak@redhat.com>
* chsh: Add libuser supportCody Maloney2013-02-131-0/+3
| | | | | | | | | | This is based directly on lchsh which is a part of libuser. libuser.{c,h} exist because exactly the same code is needed for both chsh and chfn. [kzak@redhat.com: cleanup err() usage] Signed-off-by: Cody Maloney <cmaloney@theoreticalchaos.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* chsh-chfn: Move pam auth to its own function, factoring out common codeCody Maloney2013-02-131-0/+2
| | | | | | | This makes it easier to add support for libuser, which needs the same PAM authentication. Also removes duplicate code between chsh and chfn. Signed-off-by: Cody Maloney <cmaloney@theoreticalchaos.com>
* build-sys: Add flag for enabling/disabling libuser support.Cody Maloney2013-02-131-0/+5
| | | | Signed-off-by: Cody Maloney <cmaloney@theoreticalchaos.com>
* sulogin: remove consoles.c from libcommonKarel Zak2012-12-231-1/+10
| | | | | | | | - move struct chardata to include/ttyutils.h - move console.{h,c} to login-utils/sulogin-* (it's sulogin specific) - fix sulogin and agetty includes Signed-off-by: Karel Zak <kzak@redhat.com>
* su: use get_terminal_name() for compatibility with login(1)Karel Zak2012-11-221-2/+2
| | | | | | login(1) uses tty name (!= path) in the syslog messages. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move runuser(1) to sbin dirKarel Zak2012-11-011-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: install su.1 if building suDave Reisner2012-09-051-0/+1
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* runuser: new command (derived from su(1))Karel Zak2012-09-041-0/+13
| | | | | | | | | | | | | | | | | | | | | | | This command is based on su(1), the differences: - based on Fedora runuser su(1) patch - not installed with suid rights - allowed for root users only - don't ask for password - uses PAM session, for example: $ cat /etc/pam.d/runuser auth sufficient pam_rootok.so session optional pam_keyinit.so revoke session required pam_limits.so session required pam_unix.so $ cat /etc/pam.d/runuser-l auth include runuser session optional pam_keyinit.so force revoke session include runuser Signed-off-by: Karel Zak <kzak@redhat.com>
* su: move generic su code to su-common.cKarel Zak2012-09-041-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move tests to check_PROGRAMSKarel Zak2012-07-301-1/+1
| | | | | | Thanks to Mike Frysinger. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: always use default $(LDADD)Karel Zak2012-07-091-7/+7
| | | | | | | | The global variable $(LDADD) is always used if program_LDADD is not specified. Let's use $LDADD everywhere to avoid exceptions for people who need to specify global $LDADD. Signed-off-by: Karel Zak <kzak@redhat.com>
* utmpdump: new command, merge from sysvinitKarel Zak2012-06-291-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert lib/ to libcommon.laKarel Zak2012-06-261-15/+8Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert login-utils/ to moduleKarel Zak2012-06-261-0/+146
Signed-off-by: Karel Zak <kzak@redhat.com>