summaryrefslogtreecommitdiffstats
path: root/term-utils
Commit message (Collapse)AuthorAgeFilesLines
...
* a pointer should not be compared to zero [coccinelle]Sami Kerola2013-02-061-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: spell and encode the name of Arkadiusz Miśkiewicz correctlyBenno Schulenberg2013-02-066-6/+6
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* agetty: properly pluralize the reporting of the number of usersBenno Schulenberg2013-01-301-2/+3
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* agetty: make usage() translator friendlySami Kerola2013-01-251-35/+35
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: gettextize several overlooked messagesBenno Schulenberg2013-01-251-13/+13
| | | | | | Also improve the clarity of some of them. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: tag two bug messages as "internal error"Benno Schulenberg2013-01-251-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* script: search shell from path, when necessarySami Kerola2013-01-091-5/+11
| | | | | Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518532 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* include/ttyutils: add default chardataWerner Fink2013-01-081-25/+2Star
| | | | | | | | | | | | this one moves the init_chardata to include/ttyutils.h as well as to lib/include/ttyutils.c. Also the macros CTL/CTRL are fixed in agetty.c and sulogin.c to use the XOR variant CTL. [kzak@redhat.com: use macro rather than global variable for default chardata] Signed-off-by: Werner Fink <werner@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: replace perms 660 to 620Karel Zak2013-01-021-1/+1
| | | | | | ... the default is root:tty 620 Signed-off-by: Karel Zak <kzak@redhat.com>
* sulogin: remove consoles.c from libcommonKarel Zak2012-12-231-14/+3Star
| | | | | | | | - move struct chardata to include/ttyutils.h - move console.{h,c} to login-utils/sulogin-* (it's sulogin specific) - fix sulogin and agetty includes Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: fix compiler warningKarel Zak2012-12-201-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: remove @ and # as default kill and erase charsKarel Zak2012-11-222-8/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: add --{erase,kill}-chars optionsKarel Zak2012-11-222-5/+39
| | | | | | | | | | | | | | We need way to disable the default kill and erase agetty chars to make the getty usable for Active Directory users with '@' in username. It seems that the most extendible solution is to add options that allow to complete control additional erase/kill chars. If you specify empty strings then the chars are disabled at all. Note that this patch is backwardly compatible. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=870854 Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: make --autologin useful with --skip-login (prompt)Karel Zak2012-11-191-4/+8
| | | | | | | | | | | | | | | | | | The --autologin prints hostname login: username (automatic login) message. This commit allows to suppress the message at all if --skip-login (aka skip prompt) is specified. It means that agetty --skip-login --noissue --autologin foouser does completely silent autologin. Addresses: https://github.com/karelzak/util-linux/issues/21 Signed-off-by: Karel Zak <kzak@redhat.com>
* script: do not try to close stderr twiceSami Kerola2012-11-081-3/+5
| | | | | | | | | | | | | | | The commit cdd2a8c360c70d16804ace7cc923a6c6bb7c9ca9 broke script(1) return value. $ script -e -c "echo"; echo $? 1 The reason, as Daniel it reported, was that the script will close stderr twice, once as timing file and atexit() in function close_stdout(). This commit fixes the problem. Reported-by: Daniel Narvaez <dwnarvaez@gmail.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: fix autodetection for TERMMichal Schmidt2012-11-021-1/+0Star
| | | | | open_tty() autodetects whether to set TERM to "linux" or "vt102", but it can apply the result only if op->term is still NULL.
* agetty: replace gethostbyname() with getaddrinfo()Sami Kerola2012-10-222-7/+19
| | | | | | | | The gethostbyname() is legacy function which may be withdrawn in a future. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/gethostbyname.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* write: stop using MAXHOSTNAMELENKarel Zak2012-10-191-3/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: stop using MAXHOSTNAMELENKarel Zak2012-10-191-23/+55
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setterm: make error message more informativePetr Uzel2012-09-211-3/+7
| | | | | | | | | | | | | | | | | | | | | If `setterm -dump` fails because of lack of permission to read /dev/vcsa, it should not report that it couldn't read /dev/vcsa0. This could be misleading if there is only /dev/vcsa, but not /dev/vcsa0. Before: $ ./setterm -dump setterm: Couldn't read /dev/vcsa0 After: $ ./setterm -dump setterm: Couldn't read neither /dev/vcsa0 nor /dev/vcsa (Note: /dev/vcsa0 does not exist and the user does not have read permission on /dev/vcsa in this case). Addresses: https://bugzilla.novell.com/show_bug.cgi?id=780615 Reported-by: Christopher Yeleighton <giecrilj@stegny.2a.pl> Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* agetty: add \4 and \6 issue file sequences to print IP addressesKarel Zak2012-09-132-3/+121
| | | | | | Based on Andrea Bonomi <a.bonomi@endian.com> ideas. Signed-off-by: Karel Zak <kzak@redhat.com>
* script: add noreturn function attributesSami Kerola2012-07-261-5/+5
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* setterm: fix shadow declarationSami Kerola2012-07-261-3/+3
| | | | | | | | term-utils/setterm.c:221:55: warning: declaration of 'opt_term' shadows a global declaration [-Wshadow] term-utils/setterm.c:181:5: warning: shadowed declaration is here [-Wshadow] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: remove unnecessary sleep(10)Mantas Mikulėnas2012-07-251-2/+0Star
| | | | | | | I'm quite sure this is not supposed to be here (apparently added as part of commit 783b08fc1c6e5c906e). Signed-off-by: Mantas Mikulėnas <grawity@gmail.com>
* scriptreplay: fix compiler warning [-Wmissing-prototypes]Karel Zak2012-07-161-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* translation: unify file open error messagesSami Kerola2012-07-163-6/+6
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* translation: unify stat error messagesSami Kerola2012-07-162-2/+2
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: close tty before vhangup()Karel Zak2012-07-121-17/+27
| | | | | | | Let's close all tty file descriptors if called with --hangup option. References: https://lkml.org/lkml/2012/6/5/145 Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: make tcsetpgrp() optionalKarel Zak2012-07-111-1/+1
| | | | | | | | The session setup TIOCSCTTY is optional, so tcsetpgrp() that depends on controlling terminal should be optional too. Reported-by: Hilko Bengen <bengen@debian.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: use configured run state directorySami Kerola2012-07-101-2/+1Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: always use default $(LDADD)Karel Zak2012-07-091-5/+5
| | | | | | | | The global variable $(LDADD) is always used if program_LDADD is not specified. Let's use $LDADD everywhere to avoid exceptions for people who need to specify global $LDADD. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup .gitignore filesKarel Zak2012-06-261-7/+0Star
| | | | | | | - move all binaries to top-level .gitignore - remove unnecessary */.gitignore files Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert lib/ to libcommon.laKarel Zak2012-06-261-8/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert term-utils/ to moduleKarel Zak2012-06-262-79/+99
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* script: remove unused codeKarel Zak2012-06-211-10/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* agetty: more robust debug() macro, check ioctl result [coverity scan]Karel Zak2012-06-211-5/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* scriptreplay: fix compiler format warningSami Kerola2012-06-171-2/+1Star
| | | | | | scriptreplay.c:210:3: warning: format '%zd' expects argument of type 'signed size_t *', but argument 4 has type 'size_t *' [-Wformat] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build: fix redundant redeclaration warningsSami Kerola2012-06-113-4/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | env.c:24:15: warning: redundant redeclaration of 'environ' [-Wredundant-decls] su.c:81:15: warning: redundant redeclaration of 'environ' [-Wredundant-decls] fstab.c:581:14: warning: redundant redeclaration of 'strsignal' [-Wredundant-decls] kill.h:1:13: note: previous declaration of 'get_pids' was here kill.c:152:13: warning: redundant redeclaration of 'get_pids' [-Wredundant-decls] kill.c:142:5: warning: redundant redeclaration of 'main' [-Wredundant-decls] getopt.c:89:5: warning: redundant redeclaration of 'main' [-Wredundant-decls] agetty.c:536:15: warning: redundant redeclaration of 'optarg' [-Wredundant-decls] agetty.c:537:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls] script.c:161:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls] wall.c:96:13: warning: redundant redeclaration of 'optind' [-Wredundant-decls] libmount.h:362:26: note: previous declaration of 'mnt_update_get_fs' was here libmount.h:454:26: note: previous declaration of 'mnt_context_get_fs' was here mountP.h:383:26: warning: redundant redeclaration of 'mnt_context_get_fs' [-Wredundant-decls] mountP.h:398:26: warning: redundant redeclaration of 'mnt_update_get_fs' [-Wredundant-decls] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* Merge branch '2012wk22' of git://github.com/kerolasa/lelux-utiliteetitKarel Zak2012-06-053-8/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * '2012wk22' of git://github.com/kerolasa/lelux-utiliteetit: docs: clean up getopt.1 manual docs: clean up dmesg.1 manual docs: clean up chcpu.8 manual fileutils: xmkstemp() interface change docs: fix all man page groff warnings tools: add checkmans.sh docs: clean up wdctl.8 manual docs: clean up login.1 manual login: allow TTYGROUP name begin by number build-sys: add su executable to .gitignore logindefs: change getlogindefs_num() to return unsigned long Conflicts: login-utils/su.c sys-utils/dmesg.1
| * fileutils: xmkstemp() interface changeDave Reisner2012-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | We can not let the user control where TMPDIR is for this tempfile. This will be where we write the updated passwd file, and must be capable of being moved atomically with rename(2). Therefore, it cannot be on a different device, or setpwnam() and vipw/vigr programs will invariably fail with EXDEV. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * docs: fix all man page groff warningsSami Kerola2012-06-022-7/+7
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | Fix typos in comments and wall's man pageBernhard Voelker2012-06-052-2/+2
|/ | | | | | | | | | | Culprits identified again by (newer) misspellings: $ git ls-files | misspellings -f - | grep -v '^po/' * wall: Fix typo in man page. * Fix typos in source code comments. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
* write: Don't explicitly include <asm/param.h>.Thomas Schwinge2012-05-291-1/+0Star
| | | | | | | It doesn't exist on some systems, but will come in via <sys/param.h> on the others. Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
* write: Use PATH_MAX instead of MAXPATHLEN, as elsewhere.Thomas Schwinge2012-05-291-3/+3
| | | | Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
* include/c: move fallback for MAXHOSTNAMELEN to c.hKarel Zak2012-05-292-16/+0Star
| | | | | Reported-by: Thomas Schwinge <thomas@codesourcery.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* term-utils: cleanup strtoxx_or_err()Karel Zak2012-05-151-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: rename writeall.h to all-io.hPetr Uzel2012-05-151-1/+1
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* term-utils: verify writing to streams was successfulSami Kerola2012-04-047-7/+30
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* script: error in usage() outputSami Kerola2012-04-021-1/+1
| | | | | | | Error originates to commit 3ff526391fb5c6b33418dc9cfec31c2ff9b4792e which is bit more than year, and part or releases v2.20 & v2.21. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* reset: make scripts bourne sh compliant [checkbashisms]Sami Kerola2012-03-302-4/+4
| | | | | | | | | | | | | In addition strict compliance the commit will take variable name quoting, and $(command) substitution in use. $ checkbashisms reset reset.033c possible bashism in reset line 11 ('$[' should be '$(('): bot=$[ ${LINES:-`tput lines`} - 1 ] possible bashism in reset.033c line 11 (echo -e): echo -e \\033c Signed-off-by: Sami Kerola <kerolasa@iki.fi>