Age | Commit message (Collapse) | Author | Files | Lines |
|
Solaris doesn't have u_int32_t, use standards uint32_t instead
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
|
|
Check for crypt.h existence, and use it if available over using unistd.h
for which a certain feature level has to be set to export a definition
for crypt. On Solaris this set causes a standards conflict in the
headers, because at the time of this check C99 mode is already enabled,
which implies certain standards non-compatible with _XOPEN_SOURCE.
92 #define _XOPEN_SOURCE
93 #include <unistd.h>
configure:16259: gcc -std=gnu99 -c -g -O2 conftest.c >&5
In file included from /usr/include/unistd.h:18,
from conftest.c:93:
/prefix/gentoo/usr/lib/gcc/i386-pc-solaris2.10/4.4.5/include-fixed/sys/feature_tests.h:341:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications"
configure.ac: improve crypt check
login-utils/my_crypt.h: replace old GNU_LIBRARY check with autoconf
define for crypt.h
[kzak@redhat.com: - remove my_crypt.h]
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Instead of using an ugly goto statement, we can add a proper usage function.
This also adds the undocumented '-n' option to the output string.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
According to POSIX and mesg(1) error exit code should be >1.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
vipw.c:194:6: warning: ignoring return value of ‘link’, declared with
attribute warn_unused_result
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
[kzak@redhat.com: - clean usage() calls and some error messages]
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
|
|
[kzak@redhat.com: - fix one error message]
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
[kzak@redhat.com: use the main() part of the patch]
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
login.c:542:8: warning: ignoring return value of ‘fchown’, declared
with attribute warn_unused_result
login.c:1013:11: warning: ignoring return value of ‘fchown’, declared
with attribute warn_unused_result
login.c: In function ‘dolastlog’:
login.c:1452:7: warning: ignoring return value of ‘write’, declared
with attribute warn_unused_result
login.c: In function ‘motd’:
login.c:1391:7: warning: ignoring return value of ‘write’, declared
with attribute warn_unused_result
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
[kzak@redhat.com: - cleanup return codes
- use warn()]
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Marek Polacek <mmpolacek@gmail.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: Marek Polacek <mmpolacek@gmail.com>
|
|
[kzak@redhat.com: - use return rather than exit() in main()
- more verbose error messages]
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Use err() or errx() where appropriate. Also use EXIT_* macros instead
of 0/1. All error messages shall start with lowercase.
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
This patch replaces a few functions used throughout the source:
* Renames getnum (from schedutils) to strtol_or_err
* Moves strtosize (from lib/strtosize.c)
* Moves xstrncpy (from include/xstrncpy.h)
* Adds strnlen, strnchr and strndup if not available (remove it from libmount utils)
A few Makefile.am files were modified to compile accordingly along with trivial renaming
in schedutils source code.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
|
|
The problem is pretty visible in strace output:
broken version:
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0
[...]
ioctl(0, SNDCTL_TMR_START or TCSETS, {B0 -opost -isig -icanon -echo ...}) = 0
^^^
fixed version:
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B115200 opost isig icanon echo ...}) = 0
[...]
ioctl(0, SNDCTL_TMR_START or TCSETS, {B115200 -opost -isig -icanon -echo ...}) = 0
Reported-by: Jon Masters <jcm@redhat.com>
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=645640
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
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>
|
|
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>
|
|
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
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>
|
|
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
|
|
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>
|