Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* 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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Those became unused with the switch to the blkdev functions.
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
|
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>
|
|
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
|
|
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>
|
|
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>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
For more details see the BUGS section in the man page.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
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>
|
|
Reported-by: Robert Millan <rmh@aybabtu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
This reverts commit 64fefaf5bffdd4041190f1e5ed4b5d0100638c0d.
It does not make sense to localize config options (wdays in
checktty.c) and debug messages (main() in checktty.c.
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
We have all tests in the tests/ directory.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
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>
|
|
selinux_utils.c:16: warning: assignment discards qualifiers from pointer target type
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
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>
|
|
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>
|