]> git.ipfire.org Git - thirdparty/util-linux.git/log
thirdparty/util-linux.git
6 years agobuild-sys: release++ (v2.31-rc2) v2.31-rc2
Karel Zak [Tue, 3 Oct 2017 15:53:33 +0000 (17:53 +0200)] 
build-sys: release++ (v2.31-rc2)

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update v2.31-ReleaseNotes
Karel Zak [Tue, 3 Oct 2017 15:51:55 +0000 (17:51 +0200)] 
docs: update v2.31-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update AUTHORS file
Karel Zak [Tue, 3 Oct 2017 15:49:32 +0000 (17:49 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agopo: merge changes
Karel Zak [Tue, 3 Oct 2017 15:48:43 +0000 (17:48 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agorfkill: support old "list" output
Karel Zak [Tue, 3 Oct 2017 13:35:17 +0000 (15:35 +0200)] 
rfkill: support old "list" output

.. just because we want to be replacement for the original version.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agorfkill: remove duplicate code
Karel Zak [Tue, 3 Oct 2017 12:31:57 +0000 (14:31 +0200)] 
rfkill: remove duplicate code

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agorfkill: refactor actions
Karel Zak [Tue, 3 Oct 2017 11:44:19 +0000 (13:44 +0200)] 
rfkill: refactor actions

* convert action string to ID and use switch()
* add note about default output to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agorfkill: improve default output
Karel Zak [Tue, 3 Oct 2017 11:01:56 +0000 (13:01 +0200)] 
rfkill: improve default output

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: add Atari PT to the TODO list
Karel Zak [Mon, 2 Oct 2017 13:45:41 +0000 (15:45 +0200)] 
docs: add Atari PT to the TODO list

Addresses: https://github.com/karelzak/util-linux/issues/517
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibmount: add human compatible message for EBADMSG errno
Karel Zak [Mon, 2 Oct 2017 11:44:29 +0000 (13:44 +0200)] 
libmount: add human compatible message for EBADMSG errno

 mount: /media/sdb5: mount(2) system call failed: Bad message.

is really ugly for end users. It seems XFS, extN (etc) use EBADMSG for
bad checksums. For network or pseudo filesystems continue to use "Bad
message" error...

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1496764
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoMerge branch 'fix-python_libmount_get_propagation' of https://github.com/giuseppe...
Karel Zak [Mon, 2 Oct 2017 10:44:24 +0000 (12:44 +0200)] 
Merge branch 'fix-python_libmount_get_propagation' of https://github.com/giuseppe/util-linux

* 'fix-python_libmount_get_propagation' of https://github.com/giuseppe/util-linux:
  libmount: fix Python get_propagation

6 years agoMerge branch 'patch-1' of https://github.com/sgargel/util-linux
Karel Zak [Mon, 2 Oct 2017 10:20:36 +0000 (12:20 +0200)] 
Merge branch 'patch-1' of https://github.com/sgargel/util-linux

* 'patch-1' of https://github.com/sgargel/util-linux:
  Fix end translation

6 years agolosetup: rename to --sector-size and LOG-SEC
Karel Zak [Mon, 2 Oct 2017 09:59:57 +0000 (11:59 +0200)] 
losetup: rename to --sector-size and LOG-SEC

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolib/randutils: remove superfluous continue
Karel Zak [Mon, 2 Oct 2017 09:27:59 +0000 (11:27 +0200)] 
lib/randutils: remove superfluous continue

Addresses: https://github.com/karelzak/util-linux/commit/fa949792072530b49ef5760d7ecd6d250c66e35f#commitcomment-24678670
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoFix end translation
sgargel [Thu, 28 Sep 2017 11:56:56 +0000 (13:56 +0200)] 
Fix end translation

See also https://translate.google.it/#en/it/end

6 years agolosetup: Add support for logical block size
Stanislav Brabec [Tue, 26 Sep 2017 14:14:51 +0000 (16:14 +0200)] 
losetup: Add support for logical block size

Kernel since 4.14 supports setting of logical block size[1]. It allows to
create loop devices that report logical block size different from 512.

Add support for this feature to losetup.

References:
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/block/loop.c?id=89e4fdecb51cf5535867026274bc97de9480ade5

[kzak@redhat.com: - fix loopcxt_get_blocksize()
                  - remove lo_blocksize from loop_info64]

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: add exec() exit codes to TODO
Karel Zak [Wed, 27 Sep 2017 09:25:08 +0000 (11:25 +0200)] 
docs: add exec() exit codes to TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agocfdisk: cleanup die-on-signal code
Karel Zak [Tue, 26 Sep 2017 10:47:50 +0000 (12:47 +0200)] 
cfdisk: cleanup die-on-signal code

Let's keep signal handler simple and don't cleanup terminal from the
handler.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agocfdisk: make resize code more readable
Karel Zak [Tue, 26 Sep 2017 10:23:33 +0000 (12:23 +0200)] 
cfdisk: make resize code more readable

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosetproctitle: fix out of boundary access
Tobias Stoeckmann [Mon, 25 Sep 2017 19:55:34 +0000 (21:55 +0200)] 
setproctitle: fix out of boundary access

A program using setproctitle can trigger an out of boundary access
if an attacker was able to clear the environment before execution.

The check in setproctitle prevents overflows, but does not take into
account that the whole length of the arguments could be 1, which is
possible by supplying such a program name to execlp(3) or using a
symbolic link, e.g. argv[0] = "l", argv[1] = NULL.

Only login uses setproctitle, which is not affected by this
problem due to initializing the environment right before the call.

6 years agologin: fix signal race
Tobias Stoeckmann [Mon, 25 Sep 2017 19:54:11 +0000 (21:54 +0200)] 
login: fix signal race

The functions warnx(3) and gettext(3) are not safe to use within signal
handlers and should be avoided. Preparing the message beforehand and
calling write(2) as well as calling _exit(2) solves the problem.

[kzak@redhat.com: - use program_invocation_short_name rather than argv[0],
                  - use ignore_result() to keep compiler happy]

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: add 2.30.2 to ReleaseNotes
Karel Zak [Mon, 25 Sep 2017 08:40:37 +0000 (10:40 +0200)] 
docs: add 2.30.2 to ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agobuild-sys: release++ (v2.31-rc1) v2.31-rc1
Karel Zak [Fri, 22 Sep 2017 10:03:15 +0000 (12:03 +0200)] 
build-sys: release++ (v2.31-rc1)

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update v2.31 release notes
Karel Zak [Fri, 22 Sep 2017 09:53:22 +0000 (11:53 +0200)] 
docs: update v2.31 release notes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agopo: merge changes
Karel Zak [Fri, 22 Sep 2017 09:49:50 +0000 (11:49 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agopo: Fix translation in ja.po
Masanari Iida [Thu, 21 Sep 2017 14:23:25 +0000 (23:23 +0900)] 
po: Fix translation in ja.po

English message and Japanese translation are unmatch.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
6 years agopo:Fix a typo
Masanari Iida [Thu, 21 Sep 2017 14:23:24 +0000 (23:23 +0900)] 
po:Fix a typo

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
6 years agoMerge branch '170915' of github.com:jwpi/util-linux
Karel Zak [Fri, 22 Sep 2017 08:59:05 +0000 (10:59 +0200)] 
Merge branch '170915' of github.com:jwpi/util-linux

* '170915' of github.com:jwpi/util-linux:
  hwclock: make debug implicit for test mode.
  hwclock: exit bug fix and single test mode message

6 years agolibmount: fix Python get_propagation
Giuseppe Scrivano [Thu, 21 Sep 2017 21:18:30 +0000 (23:18 +0200)] 
libmount: fix Python get_propagation

The current implementation would return always 0, as it is the return
code of mnt_fs_get_propagation.  Change the implementation to raise an
exception on an error and return the propagation flags otherwise.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
6 years agohwclock: make debug implicit for test mode.
J William Piggott [Wed, 20 Sep 2017 22:54:35 +0000 (18:54 -0400)] 
hwclock: make debug implicit for test mode.

Calling --test without --debug is not useful, so
make it implicit.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
6 years agohwclock: exit bug fix and single test mode message
J William Piggott [Wed, 20 Sep 2017 00:55:23 +0000 (20:55 -0400)] 
hwclock: exit bug fix and single test mode message

Bug fix: hwclock returns success when saving /etc/adjtime fails.

Remove redundant test mode messages.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
6 years agoDocs: add hwclock 'highlights' v2.31-ReleaseNotes
J William Piggott [Thu, 21 Sep 2017 01:20:47 +0000 (21:20 -0400)] 
Docs: add hwclock 'highlights' v2.31-ReleaseNotes

Signed-off-by: J William Piggott <elseifthen@gmx.com>
6 years agoDocs: grammar fixes for v2.31-ReleaseNotes
J William Piggott [Thu, 21 Sep 2017 01:18:13 +0000 (21:18 -0400)] 
Docs: grammar fixes for v2.31-ReleaseNotes

Signed-off-by: J William Piggott <elseifthen@gmx.com>
6 years agopo: fix ipcrm translation error fr.po
Karel Zak [Wed, 20 Sep 2017 10:14:42 +0000 (12:14 +0200)] 
po: fix ipcrm translation error fr.po

Addresses: https://github.com/karelzak/util-linux/issues/512
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update v2.31-ReleaseNotes
Karel Zak [Wed, 20 Sep 2017 09:31:42 +0000 (11:31 +0200)] 
docs: update v2.31-ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: remove UUID v3 and v5 from TODO
Karel Zak [Tue, 19 Sep 2017 12:44:50 +0000 (14:44 +0200)] 
docs: remove UUID v3 and v5 from TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: update AUTHORS file
Karel Zak [Tue, 19 Sep 2017 12:17:25 +0000 (14:17 +0200)] 
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agopo: merge changes
Karel Zak [Tue, 19 Sep 2017 12:14:46 +0000 (14:14 +0200)] 
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agopo: update pt_BR.po (from translationproject.org)
Rafael Fontenelle [Tue, 19 Sep 2017 12:05:56 +0000 (14:05 +0200)] 
po: update pt_BR.po (from translationproject.org)

6 years agopo: update fr.po (from translationproject.org)
Stéphane Aulery [Tue, 19 Sep 2017 12:05:56 +0000 (14:05 +0200)] 
po: update fr.po (from translationproject.org)

6 years agopo: update es.po (from translationproject.org)
Antonio Ceballos Roa [Tue, 19 Sep 2017 12:05:56 +0000 (14:05 +0200)] 
po: update es.po (from translationproject.org)

6 years agopo: update da.po (from translationproject.org)
Joe Hansen [Tue, 19 Sep 2017 12:05:55 +0000 (14:05 +0200)] 
po: update da.po (from translationproject.org)

6 years agopo: update cs.po (from translationproject.org)
Petr Písař [Tue, 19 Sep 2017 12:05:55 +0000 (14:05 +0200)] 
po: update cs.po (from translationproject.org)

6 years agotests: update build-sys tests
Karel Zak [Tue, 19 Sep 2017 11:59:17 +0000 (13:59 +0200)] 
tests: update build-sys tests

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agobuild-sys: fix non-blkid compilation
Karel Zak [Tue, 19 Sep 2017 11:48:52 +0000 (13:48 +0200)] 
build-sys: fix non-blkid compilation

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agobuild-sys: make rfkill optional (and enabled by default)
Karel Zak [Tue, 19 Sep 2017 11:22:31 +0000 (13:22 +0200)] 
build-sys: make rfkill optional (and enabled by default)

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agobuild-sys: add libtinfow check
Karel Zak [Tue, 19 Sep 2017 10:55:49 +0000 (12:55 +0200)] 
build-sys: add libtinfow check

It seems some systems differentiate between tinfo and tinfow. And it
seems that mix ncursesw and tinfo (wide vs. non-wide char) is problem
for the systems.

Note that for example Fedora have ncursesw as well as ncurses, but
only one tinfo library. So, we need fallback this scenario.

Reported-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: (pty) improve SIGSTOP/SIGCONT semantic
Karel Zak [Thu, 7 Sep 2017 12:19:20 +0000 (14:19 +0200)] 
su: (pty) improve SIGSTOP/SIGCONT semantic

We want to use waitpid() only when child is terminated or stopped to
pick up child status, otherwise PTY proxy has to be active. This is
difference between "su" and "su --pty". For "su" we keep parent all
time in waitpid().

It would be possible to use separate code based on signalfd_siginfo,
but it seems better to keep all this stuff on one place -- it  means
wait_for_child().

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: (pty) save child status
Karel Zak [Thu, 7 Sep 2017 10:09:17 +0000 (12:09 +0200)] 
su: (pty) save child status

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: (pty) simplify stdin usage in poll()
Karel Zak [Thu, 7 Sep 2017 09:23:50 +0000 (11:23 +0200)] 
su: (pty) simplify stdin usage in poll()

Not sure why I have problem with this years ago for script(1), but it
seems .fd=-1 is really enough to the ignore the FD.

Reported-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoscript: simplify stdin usage in poll()
Karel Zak [Thu, 7 Sep 2017 09:22:11 +0000 (11:22 +0200)] 
script: simplify stdin usage in poll()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: (pty) fix slave terminal attributes initialization
Karel Zak [Thu, 7 Sep 2017 08:45:24 +0000 (10:45 +0200)] 
su: (pty) fix slave terminal attributes initialization

Reported-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: (pty) fix child signal mask usage
Karel Zak [Thu, 7 Sep 2017 08:31:21 +0000 (10:31 +0200)] 
su: (pty) fix child signal mask usage

The signal mask is used by pty_init_slave(), but it has never been
uninitialized before fork(), so child gets 0 as a mask :-(

Note that script(1) has no this issue because it opens signal-fd
before fork().

Reported-by: Vaclav Dolezal <vdolezal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agorunuser: fix linking
Sami Kerola [Sun, 27 Aug 2017 20:25:03 +0000 (21:25 +0100)] 
runuser: fix linking

Add conditional -lutil to runuser when needed to avoid linking error.

login-utils/su-common.o: In function `pty_create':
login-utils/su-common.c:269: undefined reference to `openpty'
login-utils/su-common.c:273: undefined reference to `openpty'

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
6 years agosu: fix non-pty compilation
Karel Zak [Wed, 23 Aug 2017 12:16:51 +0000 (14:16 +0200)] 
su: fix non-pty compilation

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: enable TIOCSCTTY and minor changes
Karel Zak [Wed, 23 Aug 2017 11:50:04 +0000 (13:50 +0200)] 
su: enable TIOCSCTTY and minor changes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: add more informartion to man page
Karel Zak [Wed, 23 Aug 2017 11:49:23 +0000 (13:49 +0200)] 
su: add more informartion to man page

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: add PTY support
Karel Zak [Thu, 17 Aug 2017 14:09:52 +0000 (16:09 +0200)] 
su: add PTY support

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: add --pty option
Karel Zak [Thu, 17 Aug 2017 10:07:35 +0000 (12:07 +0200)] 
su: add --pty option

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: move parent signals setup to separate function
Karel Zak [Thu, 17 Aug 2017 10:01:01 +0000 (12:01 +0200)] 
su: move parent signals setup to separate function

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: make wait_for_child() usable in arbitrary situation
Karel Zak [Wed, 16 Aug 2017 12:03:06 +0000 (14:03 +0200)] 
su: make wait_for_child() usable in arbitrary situation

For example if called more than once; to keep PTY code simple and
robust.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: keep old sigactions in control struct
Karel Zak [Wed, 16 Aug 2017 11:49:27 +0000 (13:49 +0200)] 
su: keep old sigactions in control struct

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: fix refactoring bug in child PID usage
Karel Zak [Wed, 16 Aug 2017 11:57:41 +0000 (13:57 +0200)] 
su: fix refactoring bug in child PID usage

Fix child pid cleanup according to commit 0076012563ff34e294a6166d605118bcdd35f7e1.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: add child to control struct
Karel Zak [Wed, 16 Aug 2017 11:42:34 +0000 (13:42 +0200)] 
su: add child to control struct

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: fix compiler warnings [-Wimplicit-fallthrough=]
Karel Zak [Wed, 16 Aug 2017 11:09:47 +0000 (13:09 +0200)] 
su: fix compiler warnings [-Wimplicit-fallthrough=]

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: add wait_for_child()
Karel Zak [Wed, 16 Aug 2017 11:04:51 +0000 (13:04 +0200)] 
su: add wait_for_child()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: unblock signals is all initialized
Karel Zak [Fri, 11 Aug 2017 15:05:00 +0000 (17:05 +0200)] 
su: unblock signals is all initialized

This patch a little bit reorders signals initialization. The original
code unblocks SIGINT SIGQUIT before signal handler is set for the
signals. It means there is a small possible race.

It seems better to compose wanted mask, setup handlers and then
unblock all the wanted signals.

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: clean up signals usage
Karel Zak [Fri, 11 Aug 2017 14:47:01 +0000 (16:47 +0200)] 
su: clean up signals usage

- don't use magic numbers to index old actions
- don't use if () if ()
- make if() conditions more readable

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: clean up const usage
Karel Zak [Fri, 11 Aug 2017 13:18:31 +0000 (15:18 +0200)] 
su: clean up const usage

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: fix debug message
Karel Zak [Fri, 11 Aug 2017 13:15:16 +0000 (15:15 +0200)] 
su: fix debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: properly clear child PID
Karel Zak [Wed, 1 Feb 2017 10:58:09 +0000 (11:58 +0100)] 
su: properly clear child PID

The patch from master branch, somehow lost during su refactoring
rebase.

Reported-by: Tobias Stöckmann <tobias@stoeckmann.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: improve some debug messages
Karel Zak [Fri, 11 Aug 2017 13:07:36 +0000 (15:07 +0200)] 
su: improve some debug messages

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: add debug.h stuff
Karel Zak [Wed, 9 Nov 2016 13:46:00 +0000 (14:46 +0100)] 
su: add debug.h stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: use switch() to split after fork
Karel Zak [Wed, 9 Nov 2016 13:19:22 +0000 (14:19 +0100)] 
su: use switch() to split after fork

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: move PAM session initialization to separate function
Karel Zak [Wed, 9 Nov 2016 13:15:31 +0000 (14:15 +0100)] 
su: move PAM session initialization to separate function

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: rename evaluate_uid()
Karel Zak [Wed, 9 Nov 2016 13:07:01 +0000 (14:07 +0100)] 
su: rename evaluate_uid()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: cosmetic code changes
Karel Zak [Fri, 14 Oct 2016 13:40:12 +0000 (15:40 +0200)] 
su: cosmetic code changes

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: cleanup setuid/gid related code
Karel Zak [Fri, 14 Oct 2016 13:28:00 +0000 (15:28 +0200)] 
su: cleanup setuid/gid related code

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: cleanup setenv related code
Karel Zak [Fri, 14 Oct 2016 13:23:44 +0000 (15:23 +0200)] 
su: cleanup setenv related code

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: cleanup shell related code
Karel Zak [Fri, 14 Oct 2016 13:18:37 +0000 (15:18 +0200)] 
su: cleanup shell related code

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: cleanup usernames usage
Karel Zak [Fri, 14 Oct 2016 13:06:33 +0000 (15:06 +0200)] 
su: cleanup usernames usage

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolib/pwdutils: add xgetlogin()
Karel Zak [Fri, 14 Oct 2016 13:02:01 +0000 (15:02 +0200)] 
lib/pwdutils: add xgetlogin()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: cleanup pwd struct usage
Karel Zak [Fri, 14 Oct 2016 11:41:27 +0000 (13:41 +0200)] 
su: cleanup pwd struct usage

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agologin: add xgetpwnam()
Karel Zak [Fri, 14 Oct 2016 11:21:17 +0000 (13:21 +0200)] 
login: add xgetpwnam()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: consolidate tty name usage
Karel Zak [Fri, 14 Oct 2016 10:21:15 +0000 (12:21 +0200)] 
su: consolidate tty name usage

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: reorder functions
Karel Zak [Fri, 14 Oct 2016 10:02:53 +0000 (12:02 +0200)] 
su: reorder functions

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: cleanup PAM stuff
Karel Zak [Thu, 13 Oct 2016 12:50:22 +0000 (14:50 +0200)] 
su: cleanup PAM stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: cleanup usage()
Karel Zak [Thu, 13 Oct 2016 12:40:54 +0000 (14:40 +0200)] 
su: cleanup usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: add control struct
Karel Zak [Thu, 13 Oct 2016 12:22:52 +0000 (14:22 +0200)] 
su: add control struct

* setup logindefs loader by function rather than by global pointer

* move basic booleans to the su_context struct

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: cosmetic changes after indent
Karel Zak [Thu, 13 Oct 2016 11:14:58 +0000 (13:14 +0200)] 
su: cosmetic changes after indent

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agosu: fix indention
Karel Zak [Thu, 13 Oct 2016 11:06:35 +0000 (13:06 +0200)] 
su: fix indention

Yes, I know... this patch is horrible. We all hate this in git
history, but the original indention from coreutils has been so
crazy...

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agodocs: add ASAN to TODO list
Karel Zak [Mon, 18 Sep 2017 09:44:57 +0000 (11:44 +0200)] 
docs: add ASAN to TODO list

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agobash-completion: update uuidgen, wipefs, tunelp, setpriv, and hwclock
Sami Kerola [Sun, 17 Sep 2017 18:49:02 +0000 (19:49 +0100)] 
bash-completion: update uuidgen, wipefs, tunelp, setpriv, and hwclock

uuidgen: Add hash-based UUIDs to bash-completion.  These were added in
commit c6f1ec68a8b38863efff2a18e30b7272db4fb273.

wipefs: Command started to use libsmartcols, and it got some new options.
Commit d9921b2a128f17aa9a9a110444d5faa43e1b371c.

rename: New option was added in commit fabb90676af89bcb5f429793746f141c0.

tunelp: The --trust-irq was removed it being years broken.  Commit
d52eb4bd9062081c8420b22c029c694f29d036c7.

setpriv: Add --ambient-caps option from commit 0c92194eeee9c1fd58580ef852.
In same go fix 'bash set -u' issue, that is the same as mentioned commit
abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056.

hwclock: For some reason --get has always been missing from this file.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
6 years agodocs: remove repeated word from mount(8) man page
Sami Kerola [Sun, 17 Sep 2017 18:49:00 +0000 (19:49 +0100)] 
docs: remove repeated word from mount(8) man page

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
6 years agolibsmartcols: fix scols_line_move_cells() n+1 error [asan]
Karel Zak [Mon, 18 Sep 2017 08:41:20 +0000 (10:41 +0200)] 
libsmartcols: fix scols_line_move_cells() n+1 error [asan]

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoMerge branch 'patch-1' of https://github.com/aner-perez/util-linux
Karel Zak [Fri, 15 Sep 2017 12:45:36 +0000 (14:45 +0200)] 
Merge branch 'patch-1' of https://github.com/aner-perez/util-linux

6 years agolibmount: export locking errors as MNT_EX_FILEIO
Karel Zak [Fri, 15 Sep 2017 12:30:06 +0000 (14:30 +0200)] 
libmount: export locking errors as MNT_EX_FILEIO

The mount man page assumes locking errors mapped to MNT_EX_FILEIO (16)
return code. Unfortunately, this is internally not exported as a
special error code, so it's returned as a generic (errno based)
stuff. This patch fixes this issue.

Note that we still use locking for example for utab or when enabled
/etc/mtab (disabled by default).

Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agolibsmartcols: fix heap-buffer-overflow when move columns
Karel Zak [Fri, 15 Sep 2017 11:43:54 +0000 (13:43 +0200)] 
libsmartcols: fix heap-buffer-overflow when move columns

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agouuidparse:fix stack-buffer-overflow [asan]
Karel Zak [Fri, 15 Sep 2017 11:30:45 +0000 (13:30 +0200)] 
uuidparse:fix stack-buffer-overflow [asan]

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
6 years agoswaplabel: fix --disable-libuuid compilation
Karel Zak [Fri, 15 Sep 2017 11:30:40 +0000 (13:30 +0200)] 
swaplabel: fix --disable-libuuid compilation

Signed-off-by: Karel Zak <kzak@redhat.com>