summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: fix the ipcs test for shmall being too big to showKarel Zak2014-10-011-1/+1
| | | | | | Based on hints from Adam Sampson, Ruediger Meier and Sami Kerola. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: don't return root if path contains // or ending /Søren Holm2014-10-011-1/+1
| | | | | | | | If the path fx. is /foo/bar/ the initial stripoff will replace the last slash with \0 and return a pointer to that exact \0 character. The same thing will happen if the path contains // somewhere. Signed-off-by: Søren Holm <sgh@sgh.dk>
* textual: there may be no space between option and optional =argBenno Schulenberg2014-10-011-8/+8
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: angular brackets around a non-literal argument, singularBenno Schulenberg2014-10-013-4/+7
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: grammarize another error messageBenno Schulenberg2014-10-011-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: using angular brackets around individual argumentsBenno Schulenberg2014-10-011-10/+10
| | | | | | And separate short and long options with the standard comma. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: grammarize an error messageBenno Schulenberg2014-10-011-2/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: not using angular brackets around literal argumentsBenno Schulenberg2014-10-011-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: add a comma for clarity, plus some other tweaksBenno Schulenberg2014-10-011-4/+4
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: use a somewhat clearer and more standard failure messageBenno Schulenberg2014-10-011-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: "ambivalent" applies to intentions, "ambiguous" to resultsBenno Schulenberg2014-10-011-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: use angular brackets around each individual argumentBenno Schulenberg2014-10-011-1/+3
| | | | | | | In usage texts each word that is an argument should be marked separately with angular brackets. Also add a translator comment. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* lslogins: free after error [coverity scan]Karel Zak2014-09-261-1/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lslogins: cleanup after error [coverity scan]Karel Zak2014-09-261-3/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: improve --move docsKarel Zak2014-09-251-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'misc' of git://github.com/kerolasa/lelux-utiliteetitKarel Zak2014-09-2217-817/+631Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'misc' of git://github.com/kerolasa/lelux-utiliteetit: textual: share crypt() error message in sulogin and newgrp newgrp: avoid use of obsolete getpass() function newgrp: use libc function to read gshadow if it is available setarch: use personality() system call when it is available setarch: reindent code hwclock: remove referal to deprecated keyboard interface eject: make open_device() and select_speed() to use struct eject_control eject: add struct eject_control to remove global variables mountpoint: simplify if statement mkfs.minix: fix couple compiler warnings mountpoint: add struct mountpoint_control last: improve code readability by renaming variable names last: make is_phantom() when kernel config does not include audit support lib: remove xgetpass() include: simplify fputc_careful() in carefulputc.h libuuid: add extern qualifiers to uuid/uuid.h system header
| * textual: share crypt() error message in sulogin and newgrpSami Kerola2014-09-191-1/+1
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * newgrp: avoid use of obsolete getpass() functionSami Kerola2014-09-191-1/+47
| | | | | | | | | | | | | | | | | | Read a password from user with termios, and once the password data is no longer needed ensure it gets overwrote before unallocating memory. Reference: http://man7.org/linux/man-pages/man3/getpass.3.html Reference: https://www.securecoding.cert.org/confluence/display/seccode/MSC06-C.+Beware+of+compiler+optimizations Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * newgrp: use libc function to read gshadow if it is availableSami Kerola2014-09-192-0/+12
| | | | | | | | | | | | | | The glib versionf of getsgnam() is using /etc/nsswitch.conf, allowing the group passwords to come from external database. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * setarch: use personality() system call when it is availableSami Kerola2014-09-191-4/+6
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * setarch: reindent codeSami Kerola2014-09-191-259/+248Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * hwclock: remove referal to deprecated keyboard interfaceSami Kerola2014-09-194-186/+1Star
| | | | | | | | | | | | | | The KDGHWCLK has been gone quite a while. Reference: http://marc.info/?l=linux-kernel&m=104171103925897 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * eject: make open_device() and select_speed() to use struct eject_controlSami Kerola2014-09-191-29/+25Star
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * eject: add struct eject_control to remove global variablesSami Kerola2014-09-191-196/+198
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * mountpoint: simplify if statementSami Kerola2014-09-191-14/+11Star
| | | | | | | | | | | | | | Returning straight after print_devno() makes the code to be more obvious and removes need for long else statement. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * mkfs.minix: fix couple compiler warningsSami Kerola2014-09-191-6/+10
| | | | | | | | | | | | | | disk-utils/mkfs.minix.c:366:3: warning: ISO C forbids 'return' with expression, in function returning void [-Wpedantic] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * mountpoint: add struct mountpoint_controlSami Kerola2014-09-191-45/+41Star
| | | | | | | | | | | | | | This unifies variable names in different functions, and removes redundant stat() calls. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * last: improve code readability by renaming variable namesSami Kerola2014-09-191-11/+14
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * last: make is_phantom() when kernel config does not include audit supportSami Kerola2014-09-191-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When kernel CONFIG_AUDIT is not set the /proc/<pid>/loginuid information is not present resulting live sessions to be marked 'gone - no logout' in last(1) print out. To go-around this change makes last(1) to look /dev/<tty> device ownership as a substitute of loginuid. The go-around seems to work fairly well, but it has it short comings. For example after closing a X window session the /dev/ttyN file seems to be owned by root, not the user who had it before entering to the X session. While that is suboptimal it is still better than an attmempt to determine uid_t by looking owner of the /proc/<struct utmp ut_pid>, that is a login(1) process running as root. The issue was found using Archlinux installation. $ pacman -Qi linux Name : linux Version : 3.16-2 [...] Build Date : Mon Aug 4 18:06:51 2014 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * lib: remove xgetpass()Sami Kerola2014-09-194-54/+0Star
| | | | | | | | | | | | | | This function is not in use, and it has reference to obsoleted getpass(). Reference: http://man7.org/linux/man-pages/man3/getpass.3.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * include: simplify fputc_careful() in carefulputc.hSami Kerola2014-09-191-10/+6Star
| | | | | | | | | | | | | | New version of comparisions does the same thing as the old without being quite as difficult to understand. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * libuuid: add extern qualifiers to uuid/uuid.h system headerSami Kerola2014-09-191-15/+15
| | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | Merge branch 'renice' of git://github.com/kerolasa/lelux-utiliteetitKarel Zak2014-09-221-56/+55Star
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'renice' of git://github.com/kerolasa/lelux-utiliteetit: renice: reorder usage() option descriptions rename: add getpriority() message lookup table renice: fix numeric uid argument parsing renice: avoid having same lines of code twice renice: disallow --priority <arg> without pid argument rename: use usage and version print out macros renice: reorder functions to avoid need of function prototype
| * | renice: reorder usage() option descriptionsSami Kerola2014-09-191-6/+7
| | | | | | | | | | | | | | | | | | | | | Make the Usage: and Options: sections to be in same order, which I found to be quicker to use than alphabetical order. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | rename: add getpriority() message lookup tableSami Kerola2014-09-191-13/+14
| | | | | | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | renice: fix numeric uid argument parsingSami Kerola2014-09-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following was inconflict with what usage() tells are valid option arguments. $ renice 1 -u 1000 renice: unknown user 1000 $ id uid=1000(kerolasa) ... Reviewed-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | renice: avoid having same lines of code twiceSami Kerola2014-09-191-16/+16
| | | | | | | | | | | | | | | | | | | | | Add getprio() function to avoid duplication of a simple task. Reviewed-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | renice: disallow --priority <arg> without pid argumentSami Kerola2014-09-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier a lonely priority with an argument but without pid resulted to no action and success, when the invocation should have failed. $ renice --priority 42 ; echo $? 0 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | rename: use usage and version print out macrosSami Kerola2014-09-191-9/+5Star
| | | | | | | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * | renice: reorder functions to avoid need of function prototypeSami Kerola2014-09-191-33/+32Star
| |/ | | | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | lib/swapprober: add missing header fileKarel Zak2014-09-221-0/+1
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | swapon: split swapon-common.cKarel Zak2014-09-229-64/+82
| | | | | | | | | | | | | | | | | | | | | | swapon - requires libmount and libblkid swapoff - requires libmount swaplabel - requires libblkid This patch add lib/swapprober.c with blkid stuff for swap. It allows to use and link libblkid only when necessary. Signed-off-by: Karel Zak <kzak@redhat.com>
* | logger: gettimeofday needs <sys/time.h>Andreas Henriksson2014-09-221-1/+1
| | | | | | | | | | | | | | | | | | Either works on linux, but kfreebsd build fails if we don't use the <sys/time.h> include. According to man gettimeofday the correct include is <sys/time.h> Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* | build-sys: build libmount everywhereAndreas Henriksson2014-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This enables libmount to build on non-linux, which also means we can build fsck on non-linux again. (Since the context part of libmount still needs porting, building the mount utility has instead been restricted to only build on Linux.) This has been build-tested on Debian GNU/kFreeBSD. Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* | libmount: only include context on linuxAndreas Henriksson2014-09-221-4/+8
| | | | | | | | | | | | | | | | | | | | This is part of an attempt to make libmount buildable on non-linux. The parts that need architecture specific porting is under the context*.c files and the rest of libmount is useful/used by for example fsck. Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* | libmount: only invoke loopcxt on linuxAndreas Henriksson2014-09-222-0/+4
| | | | | | | | | | | | | | | | | | This is part of an attempt to make libmount buildable on non-linux. The support for /dev/loop* is Linux-specific so just disable it on non-linux for now. Signed-off-by: Andreas Henriksson <andreas@fatal.se>
* | umount: read mountinfo if --detach-loop givenRobert Schiele2014-09-221-1/+3
| | | | | | | | | | | | | | | | | | | | Don't use the optimization not to read mountinfo from commit 6a52473ecd877227f6f7da2b95da0b51593ffec1 if --detach-loop was given since we need the name of the loop device in that case and with the optimization this is not present and thus the detach operation obviously fails. Signed-off-by: Robert Schiele <rschiele@gmail.com>
* | cal: `color` option documentation should match actual behaviourEugene Yunak2014-09-211-1/+1
|/
* Merge branch 'master' of https://github.com/stevenhoneyman/util-linuxKarel Zak2014-09-171-2/+2
|\
| * zramctl: fixed two -Wformat-security warningsSteven Honeyman2014-09-151-2/+2
| | | | | | | | | | | | (they prevented compilation if -Werror=format-security is enabled) Signed-off-by: Steven Honeyman <stevenhoneyman@users.noreply.github.com>