Age | Commit message (Collapse) | Author | Files | Lines |
|
The ambivalent probing result should be properly reported and user
should be informed that the problem is possible to bypass by "-t
<type>" or resolved by wipefs(8).
The mount(8) command uses a brute force stage (calls mount(2) for all
/{proc,etc}/fylesystems) if there is not any other way how to detect
the filesystem type. The brute force stage should not be restricted by
libblkid. It's possible that libblkid is not able to detect slightly
corrupted filesystem, but kernel is able to mount such filesystem.
Note that the brute force stage should not be used if libblkid returns
ambivalent probing result. In this case user's intervention is required
(e.g. mount -t <type>).
Reported-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
.. and cleanup blkdev_get_size() usage in libblkid.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
$ make checkincludes
fsck/fsck.c: errno.h is included more than once.
lib/canonicalize.c: string.h is included more than once.
shlibs/blkid/src/blkidP.h: stdio.h is included more than once.
shlibs/blkid/src/devname.c: string.h is included more than once.
shlibs/blkid/src/devno.c: string.h is included more than once.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Conflicts:
AUTHORS
NEWS
configure.ac
debian/changelog
disk-utils/fsck.minix.c
po/ca.po
po/cs.po
po/da.po
po/de.po
po/es.po
po/et.po
po/eu.po
po/fi.po
po/fr.po
po/hu.po
po/id.po
po/it.po
po/ja.po
po/nl.po
po/pl.po
po/pt_BR.po
po/ru.po
po/sl.po
po/sv.po
po/tr.po
po/uk.po
po/util-linux-ng.pot
po/vi.po
po/zh_CN.po
shlibs/blkid/src/probe.c
shlibs/blkid/src/superblocks/iso9660.c
shlibs/blkid/src/superblocks/vfat.c
|
|
|
|
On Wed, Dec 09, 2009 at 10:08:38PM +0000, Jochen Voss wrote:
> while experimenting with coccinelle, I accidentally found what I
> believe is a bug in util-linux-ng release 2.17-rc2 (downloaded
> today). The problem is the following code in lib/md5.c (around line
> 153):
>
> void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
> {
> [...]
> memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
> }
>
> The third argument of memset should probably be the size of 'struct
> MD5Context' instead of the size of the pointer. So my guess is
> that the memset line should be
>
> memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
>
> instead. I don't know whether this actually causes a problem,
> but the comment makes it seem possible that it does.
Note, this typo does not have any impact on the utils in the
util-linux-ng project, because we don't use MD5 for any security
sensitive data or cryptographic stuff. The typo also does not have any
impact to the final MD5 hashes.
Reported-by: Jochen Voss <voss@seehuhn.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
Remove an extraneous fopen() that leaks memory and a file descriptor.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
|
|
It's better to use one macro for all situations where we depends on
in-tree (internal) libblkid.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
* mount(8) uses private device-mapper names in mtab
* libblkid returns private device-mapper names when evaluate udev
/dev/disk-by symlinks.
* on systems where DM is fully integrated with udev the /dev/mapper/<name>
files are symlinks to /dev/dm-N. It means we need a special care to hide
private device-mapper names.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The current implementation uses fixed sector size (512 bytes), that's
wrong. UEFI standard requires real logical sector size -- it means
BLKSSZGET for Linux.
The size of GPT header is not static, but whole sector is allocated
for the header. In theory the HeaderSize field could be greater than
sizeof(struct gpt_header). It means we have to read whole sector with
the header, because the header crc32 checksum is counted according to
HeaderSize.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Conflicts:
mount/lomount.c
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
git://git.kernel.org/pub/scm/utils/util-linux-ng/tytso/util-linux-ng
|
|
Remove an extraneous fopen() that leaks memory and a file descriptor.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The libblkid library supports partition tables detection now.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Conflicts:
mount/mount.8
|
|
|
|
This is public domain implementation, based on static crc32_table[].
This implementation is used on may places (libparted, FreeBSD kernel,
PostgreSQL, ...). The Linux kernel uses on-the-fly generated and
allocated tables. That's useless in shared libraries.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
ENOMEDIUM is Linux-only. On other systems, the open call on a CD-ROM
device without any medium may be successful and a subsequent read may
return EINVAL instead. Let's just break out of the loop if ENOMEDIUM
isn't defined.
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: LaMont Jones <lamont@debian.org>
|
|
Conflicts:
AUTHORS
NEWS
config/include-Makefile.am
configure.ac
mount/lomount.c
po/POTFILES.in
po/ca.po
po/cs.po
po/da.po
po/de.po
po/es.po
po/et.po
po/eu.po
po/fi.po
po/fr.po
po/hu.po
po/id.po
po/it.po
po/ja.po
po/nl.po
po/pl.po
po/pt_BR.po
po/ru.po
po/sl.po
po/sv.po
po/tr.po
po/uk.po
po/util-linux-ng.pot
po/vi.po
po/zh_CN.po
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
When building util-linux-ng-2.15, I get this:
../lib/fsprobe.c:10:19: error: blkid.h: No such file or directory
Unfortunately, the blkid.pc uses -I${includedir}/blkidi since
e2fsprogs v1.41.2. The old versions use -I${includedir} only.
Reported-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The libvolume_id is deprecated in favor of libblkid. The libblkid from
u-l-ng provides the same functionality as libvolume_id.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
When building util-linux-ng-2.15, I get this:
../lib/fsprobe.c:10:19: error: blkid.h: No such file or directory
Unfortunately, the blkid.pc uses -I${includedir}/blkidi since
e2fsprogs v1.41.2. The old versions use -I${includedir} only.
Reported-by: Robert Schwebel <r.schwebel@pengutronix.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
"SPEC" is usually used in mount(8) as a generic term for device name or
tag (LABEL, UUID). The function blkid_evaluate_* works with TAGs only.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
|
|
<linux/fd.h> is included for no reason in lib/ismounted.c. This
obviously breaks on non-Linux systems.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
|
|
Conflicts:
NEWS
config/include-Makefile.am
configure.ac
mount/Makefile.am
mount/mount.c
po/ca.po
po/cs.po
po/da.po
po/de.po
po/es.po
po/et.po
po/eu.po
po/fi.po
po/fr.po
po/hu.po
po/id.po
po/it.po
po/ja.po
po/nl.po
po/pl.po
po/pt_BR.po
po/ru.po
po/sl.po
po/sv.po
po/tr.po
po/uk.po
po/util-linux-ng.pot
po/vi.po
po/zh_CN.po
|
|
lib/fsprobe.c: In function ‘fsprobe_get_fstype_by_devname’:
lib/fsprobe.c:243: warning: return discards qualifiers from pointer target type
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>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
This is a small fragment from libdisk (from xfsprogs). The final
solution will be to move the library to util-linux-ng.
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|
|
The fsprobe_ functions return newly allocated strings.
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>
|
|
Signed-off-by: Karel Zak <kzak@redhat.com>
|