summaryrefslogtreecommitdiffstats
path: root/sys-utils
Commit message (Collapse)AuthorAgeFilesLines
* lscpu: fix typos in ppc codeKarel Zak2015-02-091-3/+3
| | | | | Reported-by: David Gibson <dgibson@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: cleanup ppc virtualization detectionKarel Zak2015-02-061-20/+13Star
| | | | | References: https://bugzilla.redhat.com/show_bug.cgi?id=1151604 Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: fix compiler error [-Werror=format-security]Karel Zak2015-02-061-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: detect also QEMU emulation on ppcKarel Zak2015-02-051-19/+37
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* textual: grammarize and harmonize the stat error messageBenno Schulenberg2015-02-027-8/+8
| | | | | | | | | The message "stat failed %s" seems to say that stat() failed to do something, or failed to pass a test, but of course it means that the statting of something failed. So say so. Also make two very similar messages equal to this one. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: mention nice(1) in renice(1) manual pageSami Kerola2015-02-021-0/+1
| | | | | Addresses: https://bugs.debian.org/260984 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* mount: Further FAT mount option updateJan Kara2015-02-021-5/+44
| | | | | | Add some mount options mentioned in Documentation/filesystems/vfat.txt. Signed-off-by: Jan Kara <jack@suse.cz>
* mount: Add documentation of FAT mount option time_offsetJan Kara2015-02-021-0/+12
| | | | Signed-off-by: Jan Kara <jack@suse.cz>
* setarch: fix --listKarel Zak2015-01-281-1/+1
| | | | | | | | | | $ ./setarch --list . . setarch: no architecture argument specified Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* switch_root: document that maintains /run tooKarel Zak2015-01-261-1/+1
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/144 Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'icc-fixes' of https://github.com/rudimeier/util-linuxKarel Zak2015-01-263-6/+6
|\ | | | | | | | | | | | | | | | | * 'icc-fixes' of https://github.com/rudimeier/util-linux: build: fix printf warnings for icc (-Wformat-security) build-sys: fix UL_SCANF_TYPE_MODIFIER for icc build-sys: free() needs stdlib.h build-sys: avoid icc warnings "ignoring unknown option" tests: python tests should not remove user's LD_LIBRARY_PATH
| * build: fix printf warnings for icc (-Wformat-security)Ruediger Meier2015-01-213-6/+6
| | | | | | | | | | | | | | | | Intel compiler complains about printf style function calls with trivial format string and no other arguments. Like this one: ../sys-utils/ipcrm.c(117): warning #2279: printf/scanf format not a string literal and no format arguments err(EXIT_FAILURE, iskey ? _("key failed") : _("id failed"));
* | Merge branch 'opts' of https://github.com/jwpi/util-linuxKarel Zak2015-01-2614-75/+75
|\ \
| * | docs: restore minus symbols in long optsJ William Piggott2015-01-2114-75/+75
| |/ | | | | | | Signed-off-by: J William Piggott <elseifthen@gmx.com>
* | textual: fix spellos and inconsistencies in several program messagesBenno Schulenberg2015-01-262-5/+5
| | | | | | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | dmesg: Enable proper indent for messages containing line breaksIngo Brückl2015-01-261-24/+40
|/ | | | | | | | | | Messages containing line breaks somehow look broken when additional time, facility or level information is displayed, because they partly appear in time/facility/level column. Indent them accordingly. Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: revert "read mtab on remount" ideaKarel Zak2015-01-161-9/+8Star
| | | | | | | | | | | | | | It's backwardly incompatible nonsense to prefer mtab on remount. mount -o remount /foo has to read mount options from fstab otherwise the remount has no effect. (The ideal solution would be to read both mtab, then modify the options according to fstab -- but for now more important is to be backwardly compatible.) References: https://bugzilla.redhat.com/show_bug.cgi?id=1182778 Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'isa' of github.com:jwpi/util-linuxKarel Zak2015-01-142-49/+33Star
|\ | | | | | | | | | | * 'isa' of github.com:jwpi/util-linux: hwclock: update man-page for directisa change hwclock: remove automatic ISA fallback
| * hwclock: update man-page for directisa changeJ William Piggott2015-01-141-42/+33Star
| | | | | | | | | | | | | | Update man-page for the direct ISA options changes. Signed-off-by: J William Piggott <elseifthen@gmx.com>
| * hwclock: remove automatic ISA fallbackJ William Piggott2015-01-141-7/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old behavior when hwclock was unable to access the rtc device was to fallback to direct ISA I/O. This was sometimes allowing two processes to access the Hardware Clock at the same time and hanging the system. This is the reason the rtc device driver only allows one process to open it. Now hwclock defaults to using the rtc device and only uses direct ISA when that option is given. Signed-off-by: J William Piggott <elseifthen@gmx.com>
* | docs: fix-up man-pages flaged by checkmans.shJ William Piggott2015-01-131-1/+0Star
|/ | | | | | | | | disk-utils/sfdisk.8 Fix font escape login-utils/vipw.8 Delete bogus macro misc-utils/look.1 Delete bogus macro sys-utils/prlimit.1 Delete bogus macro Signed-off-by: J William Piggott <elseifthen@gmx.com>
* hwclock: exclude also i386 from CMOS auto-probingKarel Zak2015-01-131-3/+3
|
* hwclock: don't check CMOS automatically on x86_64Karel Zak2015-01-131-0/+4
| | | | | | | We have enabled CMOS also for x86_64, but it should be available only if --directisa is explicitly specified. Signed-off-by: Karel Zak <kzak@redhat.com>
* unshare: add some examplesLubomir Rintel2015-01-121-0/+14
| | | | | | | ...and fix one typo. Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Karel Zak <kzak@redhat.com>
* hwclock: man regressionJWP2015-01-121-1/+1
| | | | | | Fixes merge for commit 2ed1d70 that clobbered commit 98ac774 Signed-off-by: J William Piggott <elseifthen@gmx.com>
* setarch: cleanup options usageKarel Zak2015-01-121-28/+38
| | | | | | | | | * call --help, --verbose and --list from one place only * add 'archwrapper' variable to detect when called by symplink * make --list available only got setchar(8) (but no for symlinks) Reported-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: mention that setarch may not be able to set all listed architecturesBenno Schulenberg2015-01-121-4/+5
| | | | | | | [[kzak@redhat.com: - use minus in option name\ Signed-off-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
* setarch: differentiate between "unrecognized" and "cannot set"Benno Schulenberg2015-01-121-1/+1
| | | | | | | | | When the provided string does not match any architecture that setarch knows about, the response stays "Unrecognized architecture", but when trying to set the specified architecture does not have any effect, then respond with "Kernel cannot set architecture to...". Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: remove obsolete and unneeded comments from man-page filesBenno Schulenberg2015-01-1214-38/+4Star
| | | | | | | Transform some of them into copyright lines. Also fix three header lines and snip some trailing whitespace. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* hwclock: man page 'Since v2.26' notesJWP2015-01-091-19/+5Star
| | | | | | | | Clean up the 'Since v2.26' man page notes. They were redundant of information already in the manual, and became too verbose. Signed-off-by: J William Piggott <elseifthen@gmx.com>
* hwclock: update man page for v2.26 rcJWP2015-01-091-382/+752
| | | | | | | | | Authored new section: DATE-TIME CONFIGURATION. Subsections: Keeping Time..., LOCAL vs UTC, POSIX vs 'RIGHT'. Errata and drop outdated language. Updates for v2.26 Signed-off-by: J William Piggott <elseifthen@gmx.com>
* hwclock: Incorrect UTC defaultsJWP2015-01-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hwclock's default timescale was changed to UTC in: commit 7894bf0f08740f75610990a2ba76af7a7cbce61e Date: Mon Feb 21 13:27:07 2011 +0000 This change was incomplete. With no /etc/adjtime file the current behavior is: hwclock --utc --adjust #Creates a UTC file. hwclock --localtime --adjust #File is not created. That is the opposite of what UTC default should do. With this patch the behavior is: hwclock --utc --adjust #File is not created. hwclock --localtime --adjust #Creates a LOCAL file. 'Creates a xxxx file' means: An /etc/adjtime file is created with zero for all parameters except the Hardware Clock's timescale field, which is set to the value indicated by xxxx. The second item missed in the patch was a test in the save_adjtime() function that defaults to LOCAL. Theoretically we cannot get to the save function without having a value set for adjtime.local_utc, but the test is there so it needs be correct. Signed-off-by: J William Piggott <elseifthen@gmx.com>
* hwclock: enable --directisa for x86_64JWP2015-01-091-4/+5
| | | | | | | Currently only x86 and Alpha can use --directisa. This patch allows x86_64 machines to use it as well. Signed-off-by: J William Piggott <elseifthen@gmx.com>
* nsenter: add --preserve-credentials and cleanup setgroups() usageKarel Zak2015-01-092-6/+25
| | | | | | | | | | | | | The new option --preserve-credentials completely disables all operations related to UIGs and GIDs. The patch also calls setgroups() before we enter user namespace (so root can always clear their groups) and after we enter user namespace (to detect /proc/self/setgroups "deny"). If both fail then nsenter complains. Acked-by: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* nsenter: keep semantic consistentKarel Zak2015-01-091-0/+9
| | | | | | | | | | | | | | | The current nseneter behavior is inconsistent and depends on way how namespace is specified on command line # nsenter --user vs. # nseneter --user=filename if the namespace is specified by <filename> than nsenter does not do additinal setting and actions (e.g. does not call setgroups, setuid). This is bug. Signed-off-by: Karel Zak <kzak@redhat.com>
* unshare: add --setgroups=deny|allowKarel Zak2015-01-092-6/+65
| | | | | | | | | | | | | | Since Linux 3.19 the file /proc/self/setgroups controls setgroups(2) syscall usage in user namespaces. This patch provides command line knob for this feature. The new --setgroups does not automatically implies --user to avoid complexity, it's user's responsibility to use it in right context. The exception is --map-root-user which is mutually exclusive to --setgroups=allow. CC: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* unshare: Fix --map-root-user to work on new kernelsEric W. Biederman2015-01-091-0/+19
| | | | | | | | | | | | | | | In rare cases droping groups with setgroups(0, NULL) is an operation that can grant a user additional privileges. User namespaces were allwoing that operation to unprivileged users and that had to be fixed. Update unshare --map-root-user to disable the setgroups operation before setting the gid_map. This is needed as after the security fix gid_map is restricted to privileged users unless setgroups has been disabled. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
* eject: add verbosity to cdrom door lock errorSami Kerola2015-01-071-8/+11
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* ipcs: remove FIXME markupSami Kerola2015-01-071-4/+0Star
| | | | | | | | The ipc message q_qbytes information is not in /proc, and it is unlikely it will ever appear to there. Reference: https://lkml.org/lkml/2012/11/25/18 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: make tools/checkmans.sh to pass without warningsSami Kerola2015-01-071-1/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: support nsenter.staticKarel Zak2015-01-071-0/+7
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* maint: fix shadow declarationSami Kerola2015-01-072-8/+8
| | | | | | | | | | | | | | | | This change fixes all shadow declarations. The worth while to mention fix is with libfdisk sun geometry. It comes from bitops.h cpu_to_be16 macro that further expands from include/bits/byteswap.h that has the shadowing. libfdisk/src/sun.c:961:173: warning: declaration of '__v' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:69: warning: shadowed declaration is here [-Wshadow] libfdisk/src/sun.c:961:178: warning: declaration of '__x' shadows a previous local [-Wshadow] libfdisk/src/sun.c:961:74: warning: shadowed declaration is here [-Wshadow] That could have caused earlier some unexpected results. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* fallocate: create mode 0666, that's what umask is forKarel Zak2015-01-071-1/+2
| | | | | | | User's umask will typically mask the mode down to 0664 or 0644. Reported-by: Peter Cordes <peter@cordes.ca> Signed-off-by: Karel Zak <kzak@redhat.com>
* ipcrm: fix usageKarel Zak2015-01-061-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* ipc*: use customary fputs() instead of fprintf() with the usage macrosBenno Schulenberg2015-01-063-16/+22
| | | | | | Also use the clearer word <number> with the --semaphore option. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* textual: list the options of setarch in a more alphabetical orderBenno Schulenberg2015-01-061-6/+8
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* setarch: make the usage synopsis comprehensible for translatorsBenno Schulenberg2015-01-061-3/+4
| | | | | | | | Use two separate strings for the two different forms of setarch, instead of filling in an untranslated word into a single string. Also use the standard angular brackets for nonliteral arguments. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* docs: restore the alternative form of setarch in its man pageBenno Schulenberg2015-01-061-10/+11
| | | | | | | | Commit c372860ddb4a768f7f6c50cd26d60119370d5cd accidentally removed the alternative form of setarch in which the command name specifies the architecture to be set. Also improve some formatting. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* ipcrm: gettextize the command synopsis of the usage textBenno Schulenberg2015-01-061-3/+3
| | | | Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* ipcs: in usage show resource option as nonoptional when used with -iBenno Schulenberg2015-01-061-4/+4
| | | | | | | | Also, the resource option -a is not valid with -i, so show the valid ones explicitly. Also gettextize the synopsis as a single string, as the two lines are tightly related and other synopses do this too. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>