| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
$ blkid | egrep -i 'sda.*label' | cat -A
/dev/sda2: UUID="8382f307-fb43-489f-ab38-8d4cf37ca88c" SEC_TYPE="ext2" TYPE="ext3" LABEL="test" $
/dev/sda5: UUID="0b46d673-8c23-4709-b92c-3fdf460e1dd4" TYPE="ext3" LABEL="rescue" SEC_TYPE="ext2" $
/dev/sda6: UUID="cb9d814f-d885-435b-8e6d-ac17c0ac5aa1" TYPE="ext3" LABEL="root" $
/dev/sda8: UUID="1e2851bd-cc6f-4d72-bf9f-c6fa754155b1" TYPE="ext3" LABEL="data" SEC_TYPE="ext2" $
/dev/sda9: UUID="d16a2f42-9a50-4489-a788-8624c832a7f3" TYPE="ext3" LABEL="storage" SEC_TYPE="ext2" $
/dev/sda7: TYPE="swap" LABEL="swap" UUID="8393acfa-d4bd-40fc-8eb9-5ccd8d85e103" $
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586179
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# whereis -m cal -M /usr/share/man/man1/ -f ls
cal: /usr/share/man/man1/cal.1.gz /usr/share/man/man1p/cal.1p.gz
ls: /usr/bin/ls /usr/share/man/man1/ls.1.gz
the -M also resets the search mask, so for 'ls' it returns also
binaries. That's bug. Expected result is:
# ./whereis -m cal -M /usr/share/man/man1/ -f ls
cal: /usr/share/man/man1/cal.1.gz /usr/share/man/man1p/cal.1p.gz
ls: /usr/share/man/man1/ls.1.gz
the search mask has to be sensitive only to -b -m -s options,
otherwise the semantic is pretty messy.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* use debug stuff from include/debug.h and make whereis(1) sensitive
to WHEREIS_DEBUG=0xffff mask
* fix problem with argv[] usage
# whereis -b -m -M /usr/share/man/man1 -B /usr/bin -f gcc
bin: /usr/local/bin
gcc: /usr/bin/gcc /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz
the code ignores "-B" and /usr/bin is interpreted as search pattern,
expected result is:
# whereis -b -m -M /usr/share/man/man1 -B /usr/bin -f gcc
gcc: /usr/share/man/man1/gcc.1.gz /usr/bin/gcc
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765306
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
| |
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594005
Signed-off-by: Karel Zak <kzak@redhat.com>
|
| |
|
|
|
|
|
| |
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=766077
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
| |
term-utils/setterm.c:165:24: error: dubious one-bit signed bitfield
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
| |
Reported-by: Phillip Susi <psusi@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If offset (range[0]) is greater than device size (blksize), the variable 'end'
will be greater than blksize, and range[1] (length) will be recalculated.
The underflow happens when subtracting range[0] (offset) from blksize, thus
range[1] will be the result of an underflow. The bug leads to unwanted behavior
from the program, where range[1] is likely to be a high number and then will
discard a considerable amount of blocks from the device. The fix consists of
exitting the program with an error message when the condition stated above is
true. Spotted while auditing the code.
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
|
|
|
|
|
|
|
|
|
|
| |
The system libtool program has architecture dependent behaviour. It is
therefore unavailable in cross build environments. The only place it was
used in util-linux is autogen.sh to determine the availability of
libtool. All other places correctly use libtoolize or
$(top_builddir)/libtool.
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
|
|
|
|
|
|
|
| |
* always use fsync() if the device open read-write
* use sync() on demand
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
This issue affects util-linux portability to GNU/HURD
Reported-by: Pino Toscano (from Red Hat)
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Since 37f4060225df0591ab8e1dd676dbc8115d900d4f prober functions are
sensitive to errno, it seems more robust to set errno=0 with in
blkid_probe_get_buffer() on success than set the zero on all places
where we call blkid_probe_get_buffer().
Addresses: https://github.com/karelzak/util-linux/issues/119
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch reverts Sami's "timeout cannot be zero", introduced
in commit 605325b23b36238c8f3ae165e37cab9064553cf7.
The --timeout 0 has been originally interpreted as --nonblock. The
patch also add hint about this behavior to the man page.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1149974
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
The zero index is absolutely valid for extended partition (it means
extended partition could be the first partition on the device).
Reported-by: Christoph Hoopmann <christophhoopmann@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
| |
sys-utils/hwclock.c:1219:13: warning: using integer absolute value function
'abs' when argument is of floating point type [-Wabsolute-value]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Based on hints from Adam Sampson, Ruediger Meier and Sami Kerola.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Andreas Henriksson <andreas@fatal.se>
|
|
|
|
|
|
|
| |
Handle vc flags missing on FreeBSD
Fix tty creation on kFreeBSD taking patch from 2.19
Addresses-Debian-Bug: #650185
|
|
|
|
|
| |
Addresses-Debian-Bug: #527384
Signed-off-by: LaMont Jones <lamont@debian.org>
|
|
|
|
| |
Addresses-Debian-Bug: 592292
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current code returns -errno when not found "mount /foo" in fstab
and mtab does not exist (or /etc/mtab points to non-mounted /proc).
This is problem because the return value is too low-level and maybe
misinterpreted by top level code. It's better to always return
MNT_ERR_NOFSTAB when not found in fstab/mtab.
Reported-by: Dylan Cali <calid1984@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
|
|
|
|
|
| |
CppCheck founds a few wrong arguments in format strings and a NULL
pointer dereference.
Amended version with fixed strcmp() usage.
Signed-off-by: Boris Egorov <egorov@linux.com>
|
|
|
|
|
| |
Reported-by: Francis Moreau <francis.moro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
| |
Signed-off-by: Karel Zak <kzak@redhat.com>
|