Commit Graph

105 Commits

Author SHA1 Message Date
Karel Zak 01095ae33c agetty: pass hostname to login(1)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-10-26 23:17:15 +02:00
Sami Kerola 7dab96af41 docs: align wall.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:51:39 +02:00
Sami Kerola 1aa1fbaee1 docs: align scriptreplay.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:49:04 +02:00
Sami Kerola c5e7b9fa70 docs: align script.1 with howto-man-page.txt
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-10-03 20:32:45 +02:00
Petr Uzel 960cf5737e misc: use %m in format string instead of %s and strerror(errno)
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-09-27 15:46:07 +02:00
Karel Zak b926112726 agetty: test ECHO on c_lflag
Reported-by: xinglp <xinglp@gmail.com>
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=739522
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-26 12:34:10 +02:00
Karel Zak d36ee054ca script: non-ANSI definition [smatch scan]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-12 16:18:16 +02:00
Karel Zak 36601b2343 agetty: add --nohints
Reported-by: "Gabor Z. Papp" <gzp@papp.hu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-12 14:24:27 +02:00
Karel Zak 4d84fcb4c7 script: libintl.h included in nls.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-07 16:29:56 +02:00
Karel Zak 89aed1c950 agetty: double equals sign typo in opentty()
Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-07 07:37:03 +02:00
Natanael Copa 3c911718df script: fix building with --disable-nls
We should only include the libintl.h when NLS is requested.

This fixes issue when building util-linux with uClibc.

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
2011-09-07 07:30:35 +02:00
Karel Zak b89fdd9c05 write: fix path for freopen()
Reported-by: xinglp <xinglp@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-09-06 03:18:46 +02:00
Karel Zak fa25f2289c Merge branch 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetit
* 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetit:
  docs: remove duplicated text
  docs: require kernel support before accepting use of it
  docs: note about independent super block structs
  docs: add libmount & libblkid debug instructions
  Documentation: add debugging doc
  arch: start using arch as a usage() example
  docs: new file Documentation/release-schedule.txt
  docs: move setuid information from reame to hwclock.8
  docs: clean up old readme files
  docs: copy contributors from legacy files to AUTHORS
  docs: new file Documentation/howto-man-page.txt
  docs: new file Documentation/source-code-management.txt
  docs: new file Documentation/howto-contribute.txt
  docs: new file Documentation/howto-compilation.txt
  docs: tell what the Documentation/ is about
  docs: add usage() howto for contributors
  docs: Documentation directory added
  docs: remove README.clear
2011-08-31 11:04:15 +02:00
Benno Schulenberg 62246430f3 docs: also uniformize headers and footers of troff-formatted man pages
Add two spaces as the required third argument of the date line to make
the specified date get used instead of today's date.  Incorporate the
section number into the page title, then use an empty section number,
so that specifying an explicit section/volume name will work.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-29 11:24:39 +02:00
Benno Schulenberg 557db9cd05 scriptreplay: improve synopsis and formatting and wording in man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-22 10:39:28 +02:00
Benno Schulenberg 232dc924c4 docs: uniformize the header and footer lines in man pages
Use dates without the day, use the full month name, put "util-linux" in
the lower left corner, and "User Commands" or "System Administration"
at the top center.

Also improve here and there the one-line program description.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-22 10:39:21 +02:00
Karel Zak 4c27cd9089 write: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 13:56:17 +02:00
Karel Zak a290362bb8 wall: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 13:53:36 +02:00
Karel Zak a1e04e8fe3 setterm: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 13:50:29 +02:00
Karel Zak 14cc9ddafe scriptreplay: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 13:43:34 +02:00
Karel Zak 87d6050bb0 script: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 13:41:06 +02:00
Karel Zak 2960a4a343 mesg: cleanup usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 13:39:03 +02:00
Karel Zak c0d38ecdce agetty: clean up usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-16 11:58:50 +02:00
Benno Schulenberg 73bc3206bc script: normalize formatting of the man page
Also improve the description of the --timing option,
and discard a then superfluous paragraph.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-15 15:49:50 +02:00
Benno Schulenberg 51b65a5bf7 script: indicate that the file argument to --timing is optional
Also improve some other descriptions in the usage message.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-15 15:49:48 +02:00
Benno Schulenberg 1bf3e8a8eb write: remove inconsistent periods from two error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2011-08-15 15:49:47 +02:00
Sami Kerola f98d4f766e docs: Documentation directory added
Move readme, licence, change log, relese notes and other
supplementary files to a Documentation directory. This commit
does not change contents of any other but few Makefile.am files.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-08-12 20:19:52 +02:00
Karel Zak 9aeb66dc6b agetty: improve login(1) argv[]
* fix regression: missing username should not be reported (EPERM) if
  -n/--skip-login is given and username is NULL.

* don't compose login options *string* if we can use argv *array* (the
  string is necessary only for --login-options).

* don't overwrite --login-options by --autologin

  The old code silently ignores login-options and "login -f <username>"
  is always used.

  The new code uses:
    a)	"login -f <username>"    by default
    b)	"login <login-options>"  for --login-options + --autologin

  where for b) the username from "--autologin <username>" is used to
  replace \u magic string in <login-options>.

* the \u could be used more than once in one login argv string, for
  example: agetty --login-options "-o user=\\u,name=\\u --foo"

* the space in --login-options is correctly ignored, for example
  agetty --login-options " hello world ".

Reviewed-by: Voelker, Bernhard <bernhard.voelker@siemens-enterprise.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-08 12:07:07 +02:00
Samuel Thibault b0198a1163 agetty: C.UTF-8 locale instead of en_US.UTF-8
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2011-08-08 11:50:21 +02:00
Samuel Thibault 7478fce029 agetty: only enable F_UTF8 if kernel has already set IUTF8.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2011-08-08 11:49:58 +02:00
Petr Uzel e3c5ef39e3 wall: build with SUID_{C,LD}FLAGS
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-08-08 11:49:43 +02:00
Werner Fink 8408647d89 agetty: Fix IUTF8 flag
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>
2011-08-02 14:20:31 +02:00
Sami Kerola 739de07650 scriptreplay: fix buffer overflow
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-07-26 11:58:38 +02:00
Marc-Antoine Perennou bfa8d39b58 build-sys: fix spaces versus tabs conflict
For some reason, tabs were replaced by spaces in commit
73ae0d5be6

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2011-07-11 15:12:06 +02:00
Marc-Antoine Perennou 73ae0d5be6 build-sys: don't try to chgrp write or wall if they are not built
Fix regression from commit 4aa9d65bfa

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2011-07-11 11:53:44 +02:00
Sami Kerola 05644dabb4 script: remove magic constants and a type mismatch fix
The type mismatch; doinput: int -> ssize_t

[kzak@redhat.com: - int -> pid_t,
                  - remove "register" keyword]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-29 11:31:58 +02:00
Sami Kerola 8fb810ff26 script: include-what-you-use header check
The tool proposed;

script.c should add these lines:

script.c should remove these lines:
- #include <sys/file.h>  // lines 53-53
- #include <sys/types.h>  // lines 48-48
- #include "c.h"  // lines 61-61

and the change nearly did what the tool told. We should keep on
using c.h, not err.h. The config.h is not needed, it's added
automaticly.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-29 11:24:30 +02:00
Sami Kerola 0f81d3289f script: remove unnecessary void casting
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-29 11:23:58 +02:00
Sami Kerola fd4c1f632f script: option --force added
The --force will allow default output destination, e.g.
typescript file, to be hard or symbolic link.

[kzak@redhat.com: - remove "error:" prefix from errx()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-29 11:22:14 +02:00
Sami Kerola 5f51b8b25d write: maintenance fixes
Use libc error printing facilities, remove void casting, clean up
unused headers and alignt coding style with README.devel.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-25 14:25:40 +02:00
Sami Kerola aa44b95f12 write: long options & new usage
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-25 14:24:16 +02:00
Sami Kerola 4aa9d65bfa build-sys: move write to term-utils directory
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-06-25 13:54:31 +02:00
Samuel Thibault 4585ec0b29 misc: hurd build fixes
* 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>
2011-06-20 12:48:35 +02:00
Karel Zak 4a9b7543ae agetty: try next speed after CBREAK
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-05-18 14:19:39 +02:00
Karel Zak ca8e91a4bf agetty: don't use xalloc.h stuff
agetty logs errors and warnings to syslog, we shouldn't use err.h
stuff here.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-05-17 14:02:57 +02:00
Karel Zak 3fc62fd3a5 agetty: remove unnecessary options synonyms
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-05-17 13:21:45 +02:00
Karel Zak a694957a9a agetty: use a generic function for strings concatenation
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-05-17 13:03:52 +02:00
Karel Zak 763d7a8705 agetty: remove unnecessary space and "(void)" junk
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-05-17 11:36:02 +02:00
Dr. Werner Fink e85281a8ac aggety: further mingetty features
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>
2011-05-17 11:13:19 +02:00
Werner Fink eb8e1f9f0c agetty: add an autologin feature
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>
2011-05-17 11:13:06 +02:00