summaryrefslogtreecommitdiffstats
path: root/login-utils
Commit message (Collapse)AuthorAgeFilesLines
...
* agetty: add -c to reuse cflagsKarel Zak2010-08-182-3/+12
| | | | | | | The agetty command resets terminal cflags setting. The -c option disables this behavior and serial setting from kernel is used. Signed-off-by: Karel Zak <kzak@redhat.com>
* aggety: don't wipe CLOCAL flagKarel Zak2010-08-181-1/+1
| | | | | | | | gettey should not clear the flag. It seems that the flag is automatically enabled for serial consoles tht don't use CD signal. Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=598631 Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: add -s to reuse existing baud rateKarel Zak2010-08-182-19/+19
| | | | | | | | | | | | | For example: /sbin/agetty -s /dev/ttyS0 9600 will reuse the speed the kernel configured on the port. If the setting from kernel is useless (tty returns BREAK character) then the baud rate from command line (9600) is used. Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=623685 Signed-off-by: Karel Zak <kzak@redhat.com>
* chsh: don't suggest ypchshKarel Zak2010-07-294-4/+10
| | | | | | | | | | $ chsh chsh: can only change local entries; use ypchsh instead. The 'ypchsh' is an external util that does not have to be installed. Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=497329 Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: fix typos, and rephrase some things for clarityBenno Schulenberg2010-06-141-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* build-sys: replace ../ with $top_srcdirKarel Zak2010-05-241-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login: check that after tty reopen we still work with a terminalKarel Zak2010-01-281-9/+13
| | | | | | | | | | | | | | * the login code assumes that stdin is a terminal, it's better to check (by isatty()) that after tty reopen we still have a terminal * this patch also removes very old obscure fallback for situations where ttyname() returns nothing (then ttyn = "/dev/tty??"). I guess that the fake string was originally for utmp records or so. Currently (in last 10 years...) code requires that the tty name is a real open-able file. It means the fake tty name is completely useless. Reported-by: Yann Droneaud <yann@droneaud.fr> Signed-off-by: Karel Zak <kzak@redhat.com>
* login: use fd instead of pathname for update tty's owner and permissionsYann Droneaud2010-01-281-4/+4
| | | | | | | To avoid some nasty races, use the only true tty: the one already opened, don't use the path. Signed-off-by: Yann Droneaud <yann@droneaud.fr>
* login: don't link PAMed version with libcryptKarel Zak2010-01-271-16/+16
| | | | | | | | | The login, chsh and chfn utils don't need to be linked against libcrypt. The libcrypt library is necessary only when login utils are not liked with PAM. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=559196 Signed-off-by: Karel Zak <kzak@redhat.com>
* last: fix utmp.ut_time usageKarel Zak2009-11-201-6/+24
| | | | | | | The utmp.ut_time is timeval.tv_sec (time_t) or int32_t. It's more robust not to use ctime() or time() directly. Signed-off-by: Karel Zak <kzak@redhat.com>
* initctl: fix strict-aliasing bugsKarel Zak2009-10-171-2/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* newgrp: use c.h, remove tailing whitespaceKarel Zak2009-10-161-11/+5Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Remove now unused <sys/ioctl.h> includesGuillem Jover2009-10-091-1/+0Star
| | | | | | Those became unused with the switch to the blkdev functions. Signed-off-by: Guillem Jover <guillem@hadrons.org>
* replace usleep() for systems that don't have themDaniel Mierswa2009-08-211-0/+1
| | | | | | | | | This function is marked obsolete in POSIX.1-2001 and removed in POSIX.1-2008. Conditionally replaced with nanosleep(). Signed-off-by: Daniel Mierswa <impulze@impulze.org>
* simpleinit.8: formattingPeter Breitenlohner2009-08-171-2/+4
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* shutdown.8: formattingPeter Breitenlohner2009-08-171-10/+32
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* newgrp.1: formattingPeter Breitenlohner2009-08-171-3/+5
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* mesg.1: formattingPeter Breitenlohner2009-08-171-1/+2
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* last.1: formattingPeter Breitenlohner2009-08-171-1/+1
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* initctl.8: formattingPeter Breitenlohner2009-08-171-5/+8
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* chsh.1: formattingPeter Breitenlohner2009-08-171-5/+10
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* chfn.1: formattingPeter Breitenlohner2009-08-171-10/+19
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* vipw.8: remove erroneous empty line, formattingPeter Breitenlohner2009-08-171-6/+5Star
| | | | Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
* replace bcopy,bzero,index and rindexDaniel Mierswa2009-08-175-8/+8
| | | | | | | | | Those 4 functions are marked as LEGACY in POSIX.1-2001 and removed in POSIX.1-2008. Replaced with memmove,memset,strchr and strrchr. Signed-off-by: Daniel Mierswa <impulze@impulze.org>
* build-sys: rename to _execdirKarel Zak2009-07-041-10/+10
| | | | | | | | | | | | The variable name "usrlibexecdir" is very confusing (because we have /usr/libexec). The "exec" prefix is required for user-defined directories, see http://www.gnu.org/software/hello/manual/automake/The-Two-Parts-of-Install.html#The-Two-Parts-of-Install This patch renames all usr*execdir variables to usr*_execdir. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix exec/data install hooksKarel Zak2009-07-041-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: clean up _PATH_DEV_* macrosKarel Zak2009-06-301-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: IUCLC and OLCUC are Linux extensionsAurelien Jarno2009-04-231-0/+4
| | | | | | | IUCLC and OLCUC are Linux extensions to termios. The same way it is already done for XCASE, they can be ignored if not supported. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* login: use open(2) rather then access(2) for $HOME/.hushloginKarel Zak2009-04-101-1/+16
| | | | | | | | | | As an NFS client with home directories on mounted NFS share - If the NFS server exports the share with default root squashed, login cannot access the filesystem to check for the existence of .hushlogin file. It seems better to use open(2) rather than access(2). Signed-off-by: Karel Zak <kzak@redhat.com>
* login: use "remote" as a PAM service name for "login -h"Karel Zak2009-03-172-1/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login: remove "switching users" nonsense from man pageKarel Zak2009-03-091-3/+1Star
| | | | | | For more details see the BUGS section in the man page. Signed-off-by: Karel Zak <kzak@redhat.com>
* simmpleinit: fix gcc warning (buffer size in read())Karel Zak2009-03-031-1/+1
| | | | | | | | | simpleinit.c:846: /usr/include/bits/unistd.h:43 warning: call to ‘__read_chk_warn’ declared with attribute warning: read called with bigger length than size of the destination buffer Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: check for termios.c_line struct member by autoconfKarel Zak2009-02-051-1/+1
| | | | | Reported-by: Robert Millan <rmh@aybabtu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* refresh gitignoreKarel Zak2008-12-121-0/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* simpleinit: cleanup gettext calls, use snprintf()Karel Zak2008-12-121-16/+20
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn: several strings without gettext callsKarel Zak2008-12-121-4/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* TODO: add request to use nl_langinfo()Karel Zak2008-12-121-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Revert "login-utils: several strings without gettext calls"Karel Zak2008-12-124-19/+16Star
| | | | | | | This reverts commit 64fefaf5bffdd4041190f1e5ed4b5d0100638c0d. It does not make sense to localize config options (wdays in checktty.c) and debug messages (main() in checktty.c.
* login: cleanup includesKarel Zak2008-11-261-5/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: sys/types.h and time.h are included more than onceKarel Zak2008-11-261-2/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* login-utils: several strings without gettext callsPedro Ribeiro2008-10-034-16/+19
| | | | | Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* login: fix compiler warning (int32 time() arg)Karel Zak2008-09-291-1/+7
| | | | | | | | | | | | | | | | | login.c: In function ‘dolastlog’: login.c:1438 warning: passing argument 1 of ‘time’ from incompatible pointer type Unfortunately, on-disk lastlog format is always 32bit, bits/utmp.h: struct lastlog { #if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32 int32_t ll_time; #else __time_t ll_time; #endif Signed-off-by: Karel Zak <kzak@redhat.com>
* login: fix warning "dereferencing type-punned pointer will break ↵Karel Zak2008-09-011-4/+17
| | | | | | | | | strict-aliasing rules" This patch fix problems with odd pam_get_iten( ..., void **) API. (tested by gcc-4.1.2-42.el5.i386) Signed-off-by: Karel Zak <kzak@redhat.com>
* remove CVS keywordsmaximilian attems2008-07-281-1/+0Star
| | | | | | | | this patch removes old CVS keywords from comments. mount(8) works for newer Linux then 0.99 ;) Signed-off-by: maximilian attems <max@stro.at>
* selinux: is_selinux_enabled() returns 0, 1 and -1Karel Zak2008-07-014-4/+4
| | | | | | | | | | Unfortunately, the current libselinux implementation of is_selinux_enabled() returns -1 on error. This behavior is undocumented. The proper solution is to use "if (is_selinux_enabled() > 0)". Signed-off-by: Karel Zak <kzak@redhat.com>
* login: audit log injection attack via loginSteve Grubb2008-04-211-7/+3Star
| | | | | | | | | | | | | A while back I found a couple audit log injection attacks which became CVE-2007-3102. I forgot to look at login to see if its vulnerable and Mirek found that it is. To verify the problem, type: root addr=xyz.com for the account name while logging in. It will look like root logged in with an address of xyz.com. Signed-off-by: Steve Grubb <sgrubb@redhat.com>
* build-sys: remove unnecessary check-local target from login-utils/Karel Zak2008-04-161-3/+0Star
| | | | | | We have all tests in the tests/ directory. Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn, chsh, login: collapsing three similar messages into a single oneBenno Schulenberg2008-04-163-6/+6
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* build-sys: update .gitignore filesKarel Zak2008-04-141-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: ignore a bunch of generated files, mostly binariesJames Youngman2008-04-141-0/+4
| | | | | Signed-off-by: James Youngman <jay@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>