summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* libuuid: remove _SVID_SOURCE pre-processor definitionSami Kerola2014-10-011-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | The _SVID_SOURCE is deprecated. In file included from /usr/include/stdio.h:27:0, from libuuid/src/gen_uuid.c:46: /usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] Notice that the Makefile.am has AM_CPPFLAGS = \ -include config.h \ that enforces the config.h is included before any other hearer. In the configure.ac there is AC_USE_SYSTEM_EXTENSIONS that makes all possible features that can be supported in a system are turned on. With these two there is absolutely no need for any legacy _SOURCE definitions. Reference: https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=c941736c92fa3a319221f65f6755659b2a5e0a20 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use usage() text element macrosSami Kerola2014-10-0114-46/+35Star
| | | | | | | Translating these text elements should happen only once, which is more likely when the text macros are used properly. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use manual tail usage() macroSami Kerola2014-10-0119-7/+19
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: use version printing macro everywhereSami Kerola2014-10-0121-44/+22Star
| | | | | | | Only mount, umount, and blkid remains not using the macro because they are print also library references. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* flock: add error message to translationsSami Kerola2014-10-011-1/+1
| | | | | | And remove type casting. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* textual: fix couple typos in commentsSami Kerola2014-10-013-3/+3
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* hexdump: remove deprecation messageSami Kerola2014-10-011-6/+1Star
| | | | | | | | Message 'calling hexdump as od has been deprecated in favor of GNU coreutils od' has informed the hexdump not to be used like that for three and half years, and five releases. It is time to get rid of notice. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* docs: update deprecation bannersSami Kerola2014-10-016-18/+36
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* swapon: align available columns section in usage()Sami Kerola2014-10-011-1/+1
| | | | | | Commit 5db57cfc469b45ada0162a64d627ce25a3d2431f missed doing this change. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* cfdisk: don't modify ncurses LINES and COLSKarel Zak2014-10-011-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | On Sun, Sep 28, 2014 at 01:48:38AM -0700, pv4 wrote: If ncurses is build with --enable-reentrant, building util-linux-2.25.1 fails with the folllowing error: disk-utils/cfdisk.c: In function 'resize': disk-utils/cfdisk.c:202:9: error: lvalue required as left operand of assignment LINES = ws.ws_row; ^ disk-utils/cfdisk.c:203:8: error: lvalue required as left operand of assignment COLS = ws.ws_col; ^ man COLS gives the following: Depending on the configuration, these may be actual variables, or macros (see curs_threads(3X)) which provide read-only access to curses's state. In either case, applications should treat them as read-only to avoid confusing the library. Addresses: https://github.com/karelzak/util-linux/issues/125 Signed-off-by: Karel Zak <kzak@redhat.com>
* su: print proper core dump message when killedpcpa2014-10-011-3/+2Star
| | | | | | | | | An example is, in one terminal "sudo su -; echo $$", and in another terminal, "kill -9 $PID" (the pid of the su -). It should not print "(core dumped)", unless the kill signal specified so, e.g. kill -7 or kill -11. Signed-off-by: pcpa <paulo.cesar.pereira.de.andrade@gmail.com>
* 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>