summaryrefslogtreecommitdiffstats
path: root/login-utils
Commit message (Collapse)AuthorAgeFilesLines
* su: log failed logins to btmpKarel Zak2012-11-221-2/+50
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* su: use get_terminal_name() for compatibility with login(1)Karel Zak2012-11-222-4/+5
| | | | | | login(1) uses tty name (!= path) in the syslog messages. Signed-off-by: Karel Zak <kzak@redhat.com>
* login: use get_terminal_name() from ttyutils.cKarel Zak2012-11-221-14/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* su: rename log_su to log_syslogKarel Zak2012-11-221-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* su: fix "COMMAND not specified" errorKarel Zak2012-11-071-10/+19
| | | | | | | | | | # su su: COMMAND not specified This error message make sense for "runuser -u <user> <command>" only. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=872787 Signed-off-by: Karel Zak <kzak@redhat.com>
* su: fix stupid typoKarel Zak2012-11-012-4/+4
| | | | 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>
* runuser: add -u to not execute shellKarel Zak2012-11-013-54/+105
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login: fix compiler warning [-Wunused-result]Karel Zak2012-10-221-6/+10
| | | | | | | It's probably unnecessary paranoia, but let's check if we're able to restore the original IDs after ~/.hushlogin file check. Signed-off-by: Karel Zak <kzak@redhat.com>
* last: stop usig MAXHOSTNAMELENKarel Zak2012-10-191-3/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login: stop using MAXHOSTNAMELENKarel Zak2012-10-191-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login: reuse DEAD_PROCESS utmp entriesKarel Zak2012-10-051-3/+11
| | | | | Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=858009 Signed-off-by: Karel Zak <kzak@redhat.com>
* su: fixed a typo in pam error messageVitezslav Cizek2012-10-021-1/+1
| | | | Signed-off-by: Vitezslav Cizek <vcizek@suse.cz>
* su: don't modify PATH if -l not specifiedKarel Zak2012-10-021-125/+1Star
| | | | | | | | | | | This patch reverts a6fdd3f8125be23930d955c2bc6b7a46cdaf8a12. su(1) modifies PATH if: - option -l specified - ALWAYS_SET_PATH login.defs variable set Reported-by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* su: fix compiler warning [-Wstrict-prototypes]Karel Zak2012-09-211-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* su: add segmentation fault reporting of the child processOndrej Oprala2012-09-211-1/+6
| | | | | | | | | Child processes that ended with segmentation fault previously indicated this with return status only. The report is now more verbose if core dump is allowed. Improved-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* sulogin: cleanup file descriptors usageKarel Zak2012-09-071-13/+16
| | | | | | | - use _FILENO macros rather than magic numbers - check for dup() result Signed-off-by: Karel Zak <kzak@redhat.com>
* su: move long options to main()Karel Zak2012-09-051-15/+14Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* su: verify writing to streams was successfulKarel Zak2012-09-051-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* su: more robust getpwuid() for GNU Hurt [coreutils 71b7ddc]Karel Zak2012-09-051-3/+23
| | | | | | | Let's support GNU Hurd over-engineering where a process can exist without UID and getuid() returns -1 and sets errno. 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: add note about PAM to man pageKarel Zak2012-09-041-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* runuser: new command (derived from su(1))Karel Zak2012-09-044-8/+293
| | | | | | | | | | | | | | | | | | | | | | | 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-044-873/+899
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* su: add --group and --supp-group optionsKarel Zak2012-09-042-4/+75
| | | | | | | | | | | | | | | | | | | These options allow to specify alternative groups. The command su(1) has to be executed by root. The implementation is based on Fedora runuser(1) command. For example: # su --group=kzak --supp-group=uuidd - # id uid=0(root) gid=1000(kzak) groups=0(root),985(uuidd),1000(kzak) non-root user: $ su --group=kzak - su: only root can specify alternative groups Signed-off-by: Karel Zak <kzak@redhat.com>
* su: cleanup man pageKarel Zak2012-08-291-4/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* vipw: make vim writebackup mode workSami Kerola2012-08-061-0/+12
| | | | | | | | | | | | Some editors, such as Vim with 'writebackup' mode enabled, use "atomic save" in which the old file is deleted and a new one with the same name created in its place. The vipw tries to detect if such happen by looking hard temporary file link count, when it is zero reopen temporary file by using it's path. Reported-by: Mantas Mikulėnas <grawity@gmail.com> References: http://www.spinics.net/lists/util-linux-ng/msg06666.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: move tests to check_PROGRAMSKarel Zak2012-07-301-1/+1
| | | | | | Thanks to Mike Frysinger. Signed-off-by: Karel Zak <kzak@redhat.com>
* su: use xstrdup()Karel Zak2012-07-261-3/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: clean up sulogin.8 manualSami Kerola2012-07-261-26/+44
| | | | | | Align with Documentation/howto-man-page.txt Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* vipw: add noreturn function attributeSami Kerola2012-07-261-1/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* sulogin: fix shadow declarationSami Kerola2012-07-261-10/+10
| | | | | | | login-utils/sulogin.c:337:8: warning: declaration of 'sushell' shadows a global declaration [-Wshadow] login-utils/sulogin.c:332:13: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* utmpdump: fix compiler warning [-Wunused-result]Karel Zak2012-07-261-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* su: fix compiler warning [-Wmissing-prototypes]Karel Zak2012-07-161-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch '2012wk28'Karel Zak2012-07-166-40/+38Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2012wk28: translation: unify file open error messages translation: unify stat error messages utmpdump: use help and version output macros su: align with howto-usage-function fdisk: make if clause easier to read look: remove extra semicolon utmpdump: remove unused variable swapon: remove unused variables lib/loopdev: minor bug fix: add missing semicolon lib/pager: minor compiler warning fixes libblkid: remove duplicate entries in symbols
| * translation: unify file open error messagesSami Kerola2012-07-165-10/+9Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * utmpdump: use help and version output macrosSami Kerola2012-07-161-4/+4
| | | | | | | | | | | | Done to reduce translation project work. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * su: align with howto-usage-functionSami Kerola2012-07-161-26/+25Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * utmpdump: remove unused variableSami Kerola2012-07-161-1/+0Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | utmpdump: kill unused variable in follow_by_inotify()Petr Uzel2012-07-161-1/+0Star
| | | | | | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* | docs: man page syntax fixesVille Skyttä2012-07-161-1/+1
|/ | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
* login: close tty before vhangup()Karel Zak2012-07-121-0/+8
| | | | | | | Let's close all tty file descriptors before vhangup() call. References: https://lkml.org/lkml/2012/6/5/145 Signed-off-by: Karel Zak <kzak@redhat.com>
* utmpdump: cleanup file descriptor usageKarel Zak2012-07-101-14/+18
| | | | | | | | - don't support --follow for stdin at all - inotify based implementation closes the file, so don't close it in main() again Signed-off-by: Karel Zak <kzak@redhat.com>
* utmpdump: encourage users not to follow stdinSami Kerola2012-07-101-1/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* utmpdump: use inotify to when following fileSami Kerola2012-07-101-7/+107
| | | | | | Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* utmpdump: fixes based on static analysis [cppcheck]Sami Kerola2012-07-101-10/+1Star
| | | | | | | | | | | [utmpdump.c:82]: (style) The function 'unspace' is never used [utmpdump.c:131]: (style) The scope of the variable 't' can be reduced [utmpdump.c:167]: (warning) scanf without field width limits can crash with huge input data [kzak@redhat.com: - don't use scanf field width limits for integers] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* utmpdump: white space fixSami Kerola2012-07-091-20/+19Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: clean up utmpdump.1 manualSami Kerola2012-07-091-26/+31
| | | | | | | | | | Align with Documentation/howto-man-page.txt Signed-off-by: Sami Kerola <kerolasa@iki.fi> Conflicts: login-utils/utmpdump.1
* utmpdump: document optional filename argumentBernhard Voelker2012-07-092-2/+5
| | | | Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* docs: fix typos found by misspellingsBernhard Voelker2012-07-092-3/+3
| | | | | | | | | | | | | | | | | | The tool misspellings (https://github.com/lyda/misspell-check) detected several typos. Command used: $ git ls-files | grep -v ^po/ | misspellings -f - * Documentation/releases/v2.18-ReleaseNotes: Fix typo in news entry. * NEWS: Likewise. * config/texinfo.tex: Fix typo in comments. * libmount/src/context.c: Fix typo in comment. * libmount/src/fs.c: Likewise. * login-utils/login.c: Likewise. * login-utils.su.1: Fix typo in man page. * sys-utils/chcpu.c: Fix typo in error message. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>