summaryrefslogtreecommitdiffstats
path: root/login-utils
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* login: rewrite is_local() to remove limits on line lengthJames Youngman2008-04-143-23/+91
| | | | | Signed-off-by: James Youngman <jay@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* login-utils: cleanup strlen() and fgets() usageJames Youngman2008-04-081-2/+2
| | | | | | | | The strlen() returns size_t, not int. The fgets() returns pointer, not int. Signed-off-by: James Youngman <jay@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn: fix compiler warnings in selinux stuffKarel Zak2008-03-201-1/+1
| | | | | | selinux_utils.c:16: warning: assignment discards qualifiers from pointer target type Signed-off-by: Karel Zak <kzak@redhat.com>
* remove useless if-before-free tests.Jim Meyering2008-03-122-3/+3
| | | | | | | | | | | | | | | | E.g., in this example, the "if (p)" test is useless. if (p) free (p); I've been removing such tests systematically. Here's where I proposed it to the git folks, along with justification for why it's ok to perform this transformation, these days (no one uses SunOS4 anymore): http://thread.gmane.org/gmane.comp.version-control.git/74187 Signed-off-by: Jim Meyering <meyering@redhat.com>
* agetty: make username-in-uppercase feature optional (off by default.)Hamish Coleman2008-03-062-5/+14
| | | | | | | | | | | | | | The following patch makes the username-in-upper-case feature optional. I have chosen to make it default to off since this feature was designed to cater for serial terminals that were last sold almost 30 years ago, thus the likelyhood that anyone will need this feature turned on is vanishingly small. Addresses-Debian-Bug: 156242 Signed-off-by: Hamish Coleman <hamish@zot.org> Signed-off-by: LaMont Jones <lamont@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* login: fix a small memory leak and remove unnecessary zeroingKarel Zak2008-01-281-2/+6
| | | | | | | | | This patch fix a small memory leak (rh#251539) and also remove unnecessary pam_set_item(). We needn't to zeroing PAM_USER when the value is already NULL, it doesn't make sense. Addresses-Red-Hat-Bugzilla: #251539 Signed-off-by: Karel Zak <kzak@redhat.com>
* login: replace termio with termios interfaceSamuel Thibault2008-01-031-3/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: replace termio with termios interfaceSamuel Thibault2008-01-031-77/+54Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use dist_man_MANS instead of man_MANSStepan Kasal2007-12-171-7/+7
| | | | Signed-off-by: Stepan Kasal <skasal@redhat.com>
* shutdown: use _PATH_MOUNTED instead of _PATH_MTABStepan Kasal2007-12-171-2/+2
| | | | Signed-off-by: Stepan Kasal <skasal@redhat.com>
* agetty: non-linux support (use pathnames.h)Karel Zak2007-11-281-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: cleanup pathnames.hKarel Zak2007-11-282-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup usage of linux/major.hSamuel Thibault2007-11-281-0/+8
| | | | | | | | The utils like fdisk or login are usable on non-linux systems. This patch allows to compile on systems without linux/major.h. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
* wall: cleanup MAXHOSTNAMELENKarel Zak2007-11-261-0/+8
| | | | | Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: cleanup MAXHOSTNAMELENKarel Zak2007-11-261-19/+9Star
| | | | | Cc: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: ungettextize several debugging messages.Benno Schulenberg2007-10-262-15/+15
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: tweak a few messages for clarityBenno Schulenberg2007-10-261-2/+2
| | | | | | | | Add a missing period, a missing space, a comma and a word for clarity, plus a period and an uppercase letter to match surrounding messages. Further add a missing call to gettext, and undo an unneeded linewrap. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* mesg: replace errs.h with libc err.hKarel Zak2007-10-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chfn: add pam_end() call and cleanup PAM codeKarel Zak2007-10-041-23/+32
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chsh: should use pam_end function to terminate the PAM transactionYu Zhiguo2007-10-041-24/+33
| | | | | | | | | | | | chsh will use PAM transaction if macros 'REQUIRE_PASSWORD' and 'HAVE_SECURITY_PAM_MISC_H' are defined, but there is no pam_end function be used when the PAM transaction be terminated. This patch also cleanup PAM code in chsh(1). Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com> Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* login: login segfaults on EOF (rh#298461)Karel Zak2007-09-211-2/+2
| | | | | | | | | | | Stupid bug in audit code: $ login login: ^D login: ^D Segmentation fault Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: add --disable-makeinstall-chownKarel Zak2007-08-141-3/+3
| | | | | | | | A chown-like operations are unexpected when you execute "make install" as non-root user. For example RPM defines owner+permissions in .spec file -- you needn't to use root account to create useful RPM package. Signed-off-by: Karel Zak <kzak@redhat.com>
* chsh: don't use empty shell field in /etc/passwdKarel Zak2007-08-141-2/+5
| | | | | | | | | chsh(1) uses empty shell setting (pw->pw_shell="") as a synonym for /bin/sh. This convention is silly and unnecessary. (The vsftpd server will not run if the shell assigned to user "ftp" is a null string -- according to bug rh#103004). Signed-off-by: Karel Zak <kzak@redhat.com>
* login: replace /usr/spool/mail with /var/spool/main in man pageKarel Zak2007-08-141-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: fix short malloc in initstring handlingLaMont Jones2007-07-251-1/+1
| | | | Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
* agetty: 8 bit characters on the Linux console lead to input corruptionMoritz Muehlenhoff2007-07-252-6/+14
| | | | | | | | | | | | | | | | | | 8 bit characters on the Linux console lead to input corruption (e.g. German umlauts). This is easily reproducable by inserting a login name with umlaut and typing backspace afterwards. agetty supports tty parity, which leads to getty treating these characters as a 7bit char with set parity. This patch by Samuel Thibault adds a new option -8 which disables parity detection for ttys not used for serial logins. | Note: With this patch, 8bit characters are just silently dropped (that's | the expected getty behavior), this is quite neat since you then don't | even need to backspace your 8bit characters :) Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
* login-utils: remove deprecated sigsetmask() from wallKarel Zak2007-07-171-1/+3
| | | | | | The sigsetmask() is deprecated in favor of sigprocmask(). Signed-off-by: Karel Zak <kzak@redhat.com>
* login-utils: remove unwanted newlines from wallKarel Zak2007-07-161-1/+2
| | | | | | Prevent wall from adding an empty newline to every new line. Signed-off-by: Karel Zak <kzak@redhat.com>
* man pages: add "AVAILABILITY" sectionKarel Zak2007-07-0311-10/+37
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wall: fix O_NONBLOCK usageKarel Zak2007-07-021-2/+3
| | | | | From: Alan Curry <pacman@TheWorld.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: check gethostname() return valueKarel Zak2007-06-291-12/+8Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: add 'O' escape code to display domain nameKarel Zak2007-06-292-1/+41
| | | | | | | | | This patch add a new 'O' escape code to display domain name by issue-file (/etc/issue) output. (Based on an Gentoo patch.) Signed-off-by: Karel Zak <kzak@redhat.com>