Preserve IUTF8 as set up by the kernel, which knows which consoles are
in utf8 mode.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Werner Fink <werner@suse.de>
* Make blkdev_is_misaligned return 0 when BLKALIGNOFF is not available.
* Make procutils.c include c.h to get a PATH_MAX replacement.
* Provide agetty.c USE_SYSLOG, DEFAULT_VCTERM and DEFAULT_STERM
defaults for Hurd.
* Make agetty.c only deal with OFDEL, XCASE and VSWTCH if they are
available.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Allow the system adminstrator to provide options to the login
program. Some changes for several layouts of the agetty
prompt like short host name or full qualified host name.
Four options enables the user to delay agetty after start,
to change the working directory, to change the root directory,
and to modified scheduling priority.
Signed-off-by: Werner Fink <werner@suse.de>
Add an autologin feature to agetty, that is that a user can be
automatically logged in. For this the options of for the
login program has to used. Make it possible to pass-through
options to the login program which requires a security check.
Signed-off-by: Werner Fink <werner@suse.de>
Better support of virtual console due support of UTF-8 login names
provided by e.g. LDAP. Set default size 24/80 on serial modem lines
if not found by the kernel.
Signed-off-by: Werner Fink <werner@suse.de>
Check out a virtual console line for UTF-8 support, also skip
modem specific setups on a virtual console line.
Signed-off-by: Werner Fink <werner@suse.de>
Ensure a proper session on the terminal line, that is do a
vhangup() and become the controlling terminal. After this
determine if the terminal line a virtual console by using
the ioctl TIOCMGET to get the status modem bits of a serial
line which is a invalid argument on a virtual console.
Signed-off-by: Werner Fink <werner@suse.de>
Next cleanup, that is split off special character parsing in do_prompt()
and parse_args(), handle name of line of virtual console and use it in
utmp update as well as the session id. Also move the initial TERM
variable to open_tty() as we use this later in open_tty(). Use writeall()
but avoid repeat to often for EAGAIN (compare with info page of the
(g)libc, description of the macro EAGAIN).
Signed-off-by: Werner Fink <werner@suse.de>
More code cleanup, that is use bit mask for eight bit option, use
modern speed_t type, split local error() into local log_err(), log_warn(),
and dolog() for fine graduated logging with syslogger.
Signed-off-by: Werner Fink <werner@suse.de>
In reply to two requests.
http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/3990http://permalink.gmane.org/gmane.linux.utilities.util-linux-ng/3999
The scubbing consists;
o Old school introduction back to the top of the source file.
o Indentation changes.
o Removal of void casting.
o Removal of braces from single statements.
o Unified format for comments.
o Comparison with W. Venema's code from 1993 to clean few comment
mysteries.
o Web referrals added to further explanation to near the code or
comments which some could find difficult to understand why.
o Clean up of comments.
o FIXME items added where attention is needed.
o Make functions static.
o Functions with same argument types use same argument order.
o Get rid of classic K&R style function declarations.
Please notice that this patch _should not_ affect how program
works e.g. this has no actual code changes.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The case clause after getopts is in alphabetical order, just like
option string definition and manual page. The patch also convers
spaces to tabs in this code block.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
I find it easier to read code in which standard file descriptors
are symbolic strings rather than numbers.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The longer #ifdef ... #endif markups have now at the end section
comment where they begun, which should improve preprosessor
directive readability.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This patch will introducing --help and --version options, which
does not have short version. Reason to this is a that the -h was
already assigned.
[kzak@redhat.com: - fix one usage call,
- use %1$s in usage printf format
- remove "static const" from enum]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>