summaryrefslogtreecommitdiffstats
path: root/sys-utils
Commit message (Collapse)AuthorAgeFilesLines
* hwclock: internationalizing the message of the used interfaceBenno Schulenberg2014-02-104-4/+4
| | | | | | In addition, do it in a single sentence instead of in two fragments. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* setpriv: Fix --apparmor-profileAndy Lutomirski2014-02-101-2/+2
| | | | | | | | | | | | | | | There were two bugs. First, trying to access /proc/self/attr/exec with O_CREAT | O_EXCL has no chance of working. Second, it turns out that the correct command to send is "exec", not "changeprofile". Of course, there was no way to know this until: commit 3eea57c26e49a5add4c053a031cc2a1977b7c48e Author: John Johansen <john.johansen@canonical.com> Date: Wed Feb 27 03:44:40 2013 -0800 apparmor: fix setprocattr arg processing for onexec Signed-off-by: Andy Lutomirski <luto@amacapital.net>
* nsenter: fix set{gid,uid} order,drop supplementary groupsKarel Zak2014-02-061-2/+5
| | | | | | | .. always, always setgid() before setuid()! Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1061751 Signed-off-by: Karel Zak <kzak@redhat.com>
* dmesg: -w output not line-bufferedKarel Zak2014-02-061-0/+2
| | | | | | | | when writing to e.g. a pipe, output from dmesg -w can come many minutes late due to buffering. Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1060925 Signed-off-by: Karel Zak <kzak@redhat.com>
* include/c.h: prefer nanosleep() over usleep()Karel Zak2014-01-242-2/+2
| | | | | | | | | | | | | | Let's use nanosleep() although if usleep() exists. The nanosleep function does no interact with signals and other timers. The patch introduces xusleep() as replacement to libc (or our fallback) usleep(). Yes, we don't want to use struct timespec + nanosleep() everywhere in code as nano-time resolution is useless for us. The patch also enlarges delays in some busy wait loops. It seems enough to try read/write 4x per second. Signed-off-by: Karel Zak <kzak@redhat.com>
* flock: Change the 'exit status' man page section to make more senseWieland Hoffmann2014-01-201-2/+2
| | | | Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
* build-sys: fstrim depends on libmountKarel Zak2014-01-171-6/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: sort NUMA nodes to keep output human readableKarel Zak2014-01-141-0/+8
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: update man page ext3/4 mount optionsCarlos Maiolino2014-01-131-11/+31
| | | | | | | | Add missing mount options to ext3 and ext4 filesystems. This also remove resize option information from the man page. Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* fallocate: prefer FALLOC_FL_* flags from libc headersKarel Zak2014-01-131-2/+3
| | | | | Reported-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* dmesg: fix --raw zero timestamp for kmsgKarel Zak2014-01-071-8/+12
| | | | | Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1049438 Signed-off-by: Karel Zak <kzak@redhat.com>
* unshare: Add possibility to add mapping into root user in user namespaceLubomir Rintel2014-01-072-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it very convenient to use make use of privileged actions on CONFIG_USER_NS enabled kernels, without having to manually tinker with uid_map and gid_map to obtain required credentials (as those given upon unshare() vanish with call to execve() and lot of userspace checks for euid==0 anyway). Usage example: $ unshare --uts unshare: unshare failed: Operation not permitted $ unshare --user --uts [nfsnobody@odvarok ~]$ hostname swag hostname: you must be root to change the host name $ unshare -r --uts [root@odvarok util-linux]# hostname swag [root@odvarok util-linux]# [kzak@redhat.com: - move code to map_id() - use all-io.h - add paths to pathnames.h] Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: support discontinuous NUMA nodesKarel Zak2014-01-061-7/+43
| | | | | | | | | | | lscpu fails to print proper NUMA node values in a system with discontinuous nodes. This patch adds support by creating a nodeidx array to map node numbers. Based on patch from Madhavan Srinivasan <maddy@linux.vnet.ibm.com>. Reported-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup: remove warning for unsupported -e and -EKarel Zak2014-01-061-6/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup, mount: remove --pass-fd at allKarel Zak2014-01-063-13/+3Star
| | | | | | | | The option is unsupported since v2.23, let's cleanup man pages and code to remove it at all. Reported-by: "Dale R. Worley" <worley@alum.mit.edu> Signed-off-by: Karel Zak <kzak@redhat.com>
* man: Syntax and spelling fixes.Ville Skyttä2014-01-062-3/+3
| | | | Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
* mount: add note about "noauto" to --all descriptionKarel Zak2013-12-121-1/+4
| | | | | References: https://bugzilla.redhat.com/show_bug.cgi?id=1039905 Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: small inprovements to usage and man page of fstrimBenno Schulenberg2013-12-122-8/+9
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* fstrim: de-duplicate list of filesystemsKarel Zak2013-12-111-1/+15
| | | | | Reported-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* fstrim: add --all to discard all filesystemKarel Zak2013-12-103-31/+202
| | | | | | | | | | | | * read /proc/self/mountinfo to get filesystems * ignore net and pseudo filesystems * ignore unaccessible filesystems (over mounted by another FS) * read disk sysfs queue/discard_granularity to detect is discard support * call FITRIM ioctl * silently ignore EOPNOTSUPP (for example LUKS without discard) and ENOTTY (for example vfat) errors Signed-off-by: Karel Zak <kzak@redhat.com>
* fstrim: cleanup usage()Karel Zak2013-12-101-4/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* mount man page cleanupsPhillip Susi2013-12-021-29/+39
| | | | | Fowarding this patch submitted by Bjarni Ingi Gislason <bjarniig@rhi.hi.is> to deb bug #674595.
* mount.8: fix grammarPhillip Susi2013-12-021-1/+1
| | | | | | | Switch "A unbindable" to "An unbindable" Reported-by: Regid Ichira <regid23@nt1.in> Signed-off-by: Phillip Susi <psusi@ubuntu.com>
* losetup, agetty: remove unnecessary if's before free()Sami Kerola2013-12-021-4/+2Star
| | | | | Reference: http://git.savannah.gnu.org/cgit/gnulib.git/tree/build-aux/useless-if-before-free Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* umount: fix umount by tag for non-rootsKarel Zak2013-11-191-3/+5
| | | | | | | | | $ umount LABEL=foo currently does not work for non-root users as umount uses the LABEL= as a path in sanitize_path(). Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: make NAME=value tags usable for non-rootKarel Zak2013-11-191-4/+22
| | | | | | | | | | | | | | | The libmount does not care if we set source or target, it's able to swap it, but the mount.c function sanitize_paths() does not work as expected if we set NAME=value as target. It means that $ mount LABEL=foo does not work for non-root users (since 51e3530cdcb1d4f3ab91ae953ebc5adcdc5f9239, v2.24). This patch also checks if source or target is specified more than once. Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: fix man mount page typePhillip Susi2013-11-191-1/+1
| | | | | | Slight grammatical error in the mount man page Signed-off-by: Phillip Susi <psusi@ubuntu.com>
* setpriv: simplify usage()Karel Zak2013-11-191-2/+2
| | | | | | | Let's keep usage() simple and details in the man page. The current brief description in usage() seems confusing for some users. Signed-off-by: Karel Zak <kzak@redhat.com>
* unshare: add more hints about mount namespaces to the man pageKarel Zak2013-11-181-2/+8
| | | | | | | | There is also idea (by Lennart) to add --propagation=[shared|private|slave|off] to unshare(1), but it seems unnecessary and too complex as everyone can call mount(8) after unshare(1) to setup a proper namespace. Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: correct mount man page default iso9660 permissionPhillip Susi2013-11-141-1/+1
| | | | | | | The mount man page said the default permissions are read for everyone, but it is in fact, read and execute. Signed-off-by: Phillip Susi <psusi@ubuntu.com>
* lscpu: support non sequentially numbering of CPUsAlexander Troosh2013-11-052-49/+87
| | | | | | | | | | | | | | lscpu don't work correctly on my system with: $ cat /sys/devices/system/cpu/possible 0-1,4-5,8-9,12-13 [kzak@redhat.com: - coding style, - add commit message - add real_cpu_num() macro, - fix functions where we need idx as well as CPU number] Signed-off-by: Karel Zak <kzak@redhat.com>
* blkdiscard: BLKSSZGET fills in an int, not a uint64Theodore Ts'o2013-11-041-2/+2
| | | | | Reported-by: Jason Cipriani <jason.cipriani@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* mount: improve -s man mage infoKarel Zak2013-10-311-4/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* setpriv: use LC_ALLKarel Zak2013-10-181-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* nsenter: unshare: use LC_ALLKarel Zak2013-10-182-2/+2
| | | | | Reported-by: Trần Ngọc Quân <vnwildman@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: tweak formatting and grammar of the ipcrm man pageBenno Schulenberg2013-10-152-24/+24
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: tweak wording and formatting of unshare and nsenter man pagesBenno Schulenberg2013-10-152-12/+14
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: standardize the phrases for --help and --version in all man pagesBenno Schulenberg2013-10-1529-56/+53Star
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* cytune: fix glush typo in cytuneRafael Ferreira2013-10-091-1/+1
| | | | Signed-off-by: Rafael Ferreira <rafael.f.f1@gmail.com>
* losetup: cut the remaining little block of help text into slices tooBenno Schulenberg2013-10-091-6/+7
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: standardize some "cannot read" and "seek failed" error messagesBenno Schulenberg2013-10-091-1/+1
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* wdctl: pluralize one thrice-repeated messageBenno Schulenberg2013-10-081-3/+6
| | | | | | | Also put in one hard space, to keep text and number separated when the translated string should be too long. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* wdctl: gettextize and pluralize one forgotten messageBenno Schulenberg2013-10-081-1/+2
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: properly use uppercase in certain abbreviationsBenno Schulenberg2013-10-082-3/+3
| | | | | Reported-by: Petr Písař <petr.pisar@atlas.cz> Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* libmount: (docs) make it obvious how we call mount.<type> helpersKarel Zak2013-10-072-2/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: cleanup DMI code [coverity scan]Karel Zak2013-10-022-37/+42
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: check strchr() result [coverity scan]Karel Zak2013-10-011-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: don't pass null pointer to string functions [coverity scan]Karel Zak2013-10-011-3/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* losetup: don't require 512-byte aligned offsetsKarel Zak2013-10-011-5/+1Star
| | | | | | | | | | | | | | | | Kernel aligns the device size, but the offset where the device starts is not required to be aligned. # losetup --offset 32 -f file.img is just fine, the final size of the look device will be (in sectors) (backing_file_size - offset) >> 9 so we have to do the same in userspace when we check for successful set capacity ioctl. Signed-off-by: Karel Zak <kzak@redhat.com>
* Fix various typosYuri Chornoivan2013-09-282-2/+2
|