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>