1
0
forked from pool/util-linux
OBS User unknown 2008-06-25 22:34:31 +00:00 committed by Git OBS Bridge
parent f0c68a3e54
commit c4a0719257
18 changed files with 936 additions and 990 deletions

View File

@ -1,7 +1,7 @@
Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.1 Index: util-linux-ng-2.14/misc-utils/hostid.1
=================================================================== ===================================================================
--- /dev/null --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ util-linux-ng-2.12r+git20070530/misc-utils/hostid.1 +++ util-linux-ng-2.14/misc-utils/hostid.1 2008-06-24 12:12:17.000000000 +0200
@@ -0,0 +1,24 @@ @@ -0,0 +1,24 @@
+.TH hostid 1 +.TH hostid 1
+.SH NAME +.SH NAME
@ -27,10 +27,10 @@ Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.1
+.SH SEE ALSO +.SH SEE ALSO
+gethostid(2), sethostid(2) +gethostid(2), sethostid(2)
+ +
Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.c Index: util-linux-ng-2.14/misc-utils/hostid.c
=================================================================== ===================================================================
--- /dev/null --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ util-linux-ng-2.12r+git20070530/misc-utils/hostid.c +++ util-linux-ng-2.14/misc-utils/hostid.c 2008-06-24 12:12:17.000000000 +0200
@@ -0,0 +1,88 @@ @@ -0,0 +1,88 @@
+/* Program hostid. Changed on 7.10.1997 <ms@suse.de> +/* Program hostid. Changed on 7.10.1997 <ms@suse.de>
+ New: - Hostid 0 is not permitted. + New: - Hostid 0 is not permitted.
@ -120,25 +120,25 @@ Index: util-linux-ng-2.12r+git20070530/misc-utils/hostid.c
+ +
+ return 0; + return 0;
+} +}
Index: util-linux-ng-2.12r+git20070530/misc-utils/Makefile.am Index: util-linux-ng-2.14/misc-utils/Makefile.am
=================================================================== ===================================================================
--- util-linux-ng-2.12r+git20070530.orig/misc-utils/Makefile.am --- util-linux-ng-2.14.orig/misc-utils/Makefile.am 2008-05-29 01:01:02.000000000 +0200
+++ util-linux-ng-2.12r+git20070530/misc-utils/Makefile.am +++ util-linux-ng-2.14/misc-utils/Makefile.am 2008-06-24 12:13:45.000000000 +0200
@@ -5,7 +5,7 @@ EXTRA_DIST = README.flushb @@ -4,7 +4,7 @@ EXTRA_DIST = README.flushb
bin_PROGRAMS = bin_PROGRAMS =
usrbinexec_PROGRAMS = cal ddate logger look mcookie \ -usrbinexec_PROGRAMS = cal ddate logger look mcookie \
- namei script whereis +usrbinexec_PROGRAMS = cal ddate hostid logger look mcookie \
+ namei script whereis hostid namei script whereis scriptreplay
EXTRA_DIST += README.cal README.ddate README.namei README.namei2 EXTRA_DIST += README.cal README.ddate README.namei README.namei2
mcookie_SOURCES = mcookie.c ../lib/md5.c @@ -14,7 +14,7 @@ usrbinexec_SCRIPTS = chkdupexe
@@ -15,7 +15,7 @@ usrbinexec_SCRIPTS = chkdupexe scriptrep
CLEANFILES = chkdupexe scriptreplay
man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \ CLEANFILES = chkdupexe
- namei.1 script.1 whereis.1 scriptreplay.1
+ namei.1 script.1 whereis.1 scriptreplay.1 hostid.1
if HAVE_NCURSES -dist_man_MANS = cal.1 chkdupexe.1 ddate.1 logger.1 look.1 mcookie.1 \
cal_LDADD = -lncurses +dist_man_MANS = cal.1 chkdupexe.1 ddate.1 hostid.1 logger.1 look.1 mcookie.1 \
namei.1 script.1 whereis.1 scriptreplay.1
if HAVE_TINFO

View File

@ -1,13 +0,0 @@
Index: util-linux-ng-2.13rc2+git20070725/fdisk/Makefile.am
===================================================================
--- util-linux-ng-2.13rc2+git20070725.orig/fdisk/Makefile.am
+++ util-linux-ng-2.13rc2+git20070725/fdisk/Makefile.am
@@ -29,7 +29,7 @@ if HAVE_NCURSES
sbin_PROGRAMS += cfdisk
man_MANS += cfdisk.8
cfdisk_SOURCES = cfdisk.c $(fdisk_common)
-cfdisk_LDADD = -lncurses
+cfdisk_LDADD = -lncursesw
endif
endif

View File

@ -1,96 +0,0 @@
commit bfdb8be5c49d8fadb25118fb4416ab2a68fc3a16
Author: Karel Zak <kzak@redhat.com>
Date: Thu Oct 25 12:29:51 2007 +0200
losetup: canonicalize loopfile name
When setting up a loop device, canonicalize the loop file
name. This simplifies a later identification of loop file names
when querying the loop devices.
Co-Author: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Index: util-linux-ng-2.13.1/mount/lomount.c
===================================================================
--- util-linux-ng-2.13.1.orig/mount/lomount.c
+++ util-linux-ng-2.13.1/mount/lomount.c
@@ -22,10 +22,12 @@
#include "lomount.h"
#include "xstrncpy.h"
#include "nls.h"
+#include "realpath.h"
+#include "xmalloc.h"
+
extern int verbose;
extern char *progname;
-extern char *xstrdup (const char *s); /* not: #include "sundries.h" */
extern void error (const char *fmt, ...); /* idem */
#define SIZE(a) (sizeof(a)/sizeof(a[0]))
@@ -279,6 +281,7 @@ set_loop(const char *device, const char
struct loop_info64 loopinfo64;
int fd, ffd, mode, i;
char *pass;
+ char filename[PATH_MAX+1];
mode = (*loopro ? O_RDONLY : O_RDWR);
if ((ffd = open(file, mode)) < 0) {
@@ -298,7 +301,8 @@ set_loop(const char *device, const char
memset(&loopinfo64, 0, sizeof(loopinfo64));
- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE);
+ myrealpath(file, filename, PATH_MAX);
+ xstrncpy(loopinfo64.lo_file_name, filename, LO_NAME_SIZE);
if (encryption && *encryption) {
if (digits_only(encryption)) {
@@ -386,7 +390,7 @@ set_loop(const char *device, const char
if (verbose > 1)
printf(_("set_loop(%s,%s,%llu): success\n"),
- device, file, offset);
+ device, filename, offset);
return 0;
}
@@ -470,23 +474,6 @@ usage(void) {
exit(1);
}
-char *
-xstrdup (const char *s) {
- char *t;
-
- if (s == NULL)
- return NULL;
-
- t = strdup (s);
-
- if (t == NULL) {
- fprintf(stderr, _("not enough memory"));
- exit(1);
- }
-
- return t;
-}
-
void
error (const char *fmt, ...) {
va_list args;
Index: util-linux-ng-2.13.1/mount/Makefile.am
===================================================================
--- util-linux-ng-2.13.1.orig/mount/Makefile.am
+++ util-linux-ng-2.13.1/mount/Makefile.am
@@ -25,7 +25,7 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD
swapon_SOURCES = swapon.c swap_constants.h $(utils_common)
-losetup_SOURCES = lomount.c loop.h lomount.h
+losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c
losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
mount_LDADD = $(LDADD_common)

View File

@ -1,65 +0,0 @@
X-Gnus-Coding-System: -*- coding: utf-8; -*-
Minix filesystem until version 2 has a fixed blocksize of 1024 bytes.
If you try to create a filsystem on a device with a physical sectorsize
larger than 1024 bytes, this resulting minix fs cannot be mounted,
because the physical sectorsize must be smaller than the filesystem
blocksize.
This patch adds a check for this and will refuse to create a filesystem
if the sectorsize is bigger than the blocksize.
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
---
disk-utils/Makefile.am | 4 +++-
disk-utils/mkfs.minix.c | 12 ++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c
===================================================================
--- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c
+++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c
@@ -78,6 +78,7 @@
#ifndef BLKGETSIZE
#define BLKGETSIZE _IO(0x12,96) /* return device size */
#endif
+#define BLKSSZGET _IO(0x12,104)/* get block device sector size */
#ifndef __GNUC__
#error "needs gcc for the bitop-__asm__'s"
@@ -238,6 +239,16 @@ get_size(const char *file) {
return size;
}
+/* get hardware sector size */
+int
+blkdev_get_sector_size(int fd, int *sector_size)
+{
+ if (ioctl(fd, BLKSSZGET, sector_size) >= 0)
+ return 0;
+
+ return -1;
+}
+
static void
write_tables(void) {
/* Mark the super block valid. */
@@ -707,9 +718,16 @@ main(int argc, char ** argv) {
DEV = open(device_name,O_RDWR);
if (DEV<0)
die(_("unable to open %s"));
- if (!S_ISBLK(statbuf.st_mode))
+ if (S_ISBLK(statbuf.st_mode)) {
+ int sectorsize;
+
+ if (blkdev_get_sector_size(DEV, &sectorsize) == -1)
+ die(_("cannot determine sector size for %s"));
+ if (BLOCK_SIZE < sectorsize)
+ die(_("block size smaller than physical sector size of %s"));
+ } else if (!S_ISBLK(statbuf.st_mode)) {
check=0;
- else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340)
+ } else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340)
die(_("will not try to make filesystem on '%s'"));
setup_tables();
if (check)

View File

@ -1,103 +0,0 @@
Index: util-linux-ng-2.13.1/disk-utils/mkfs.minix.c
===================================================================
--- util-linux-ng-2.13.1.orig/disk-utils/mkfs.minix.c
+++ util-linux-ng-2.13.1/disk-utils/mkfs.minix.c
@@ -78,6 +78,7 @@
#ifndef BLKGETSIZE
#define BLKGETSIZE _IO(0x12,96) /* return device size */
#endif
+#define BLKGETSIZE64 _IOR(0x12,114,size_t) /* return device size in bytes (u64 *arg) */
#define BLKSSZGET _IO(0x12,104)/* get block device sector size */
#ifndef __GNUC__
@@ -103,7 +104,7 @@
static char * program_name = "mkfs";
static char * device_name = NULL;
static int DEV = -1;
-static long BLOCKS = 0;
+static unsigned long long BLOCKS = 0;
static int check = 0;
static int badblocks = 0;
static int namelen = 30; /* default (changed to 30, per Linus's
@@ -219,24 +220,21 @@ count_blocks (int fd) {
return (low + 1);
}
-static int
-get_size(const char *file) {
- int fd;
- long size;
-
- fd = open(file, O_RDWR);
- if (fd < 0) {
- perror(file);
- exit(1);
- }
+/* get size in bytes */
+int
+blkdev_get_size(int fd, unsigned long long *bytes)
+{
+ unsigned long size;
+
+ if (ioctl(fd, BLKGETSIZE64, bytes) >= 0)
+ return 0;
+
if (ioctl(fd, BLKGETSIZE, &size) >= 0) {
- close(fd);
- return (size * 512);
+ *bytes = ((unsigned long long)size << 9);
+ return 0;
}
-
- size = count_blocks(fd);
- close(fd);
- return size;
+
+ return -1;
}
/* get hardware sector size */
@@ -687,19 +685,9 @@ main(int argc, char ** argv) {
}
}
- if (device_name && !BLOCKS)
- BLOCKS = get_size (device_name) / 1024;
- if (!device_name || BLOCKS<10) {
+ if (!device_name) {
usage();
}
- if (version2) {
- if (namelen == 14)
- magic = MINIX2_SUPER_MAGIC;
- else
- magic = MINIX2_SUPER_MAGIC2;
- } else
- if (BLOCKS > 65535)
- BLOCKS = 65535;
check_mount(); /* is it already mounted? */
tmp = root_block;
*(short *)tmp = 1;
@@ -725,10 +713,22 @@ main(int argc, char ** argv) {
die(_("cannot determine sector size for %s"));
if (BLOCK_SIZE < sectorsize)
die(_("block size smaller than physical sector size of %s"));
+ if (!BLOCKS && blkdev_get_size(DEV, &BLOCKS) == -1)
+ die(_("cannot determine size of %s"));
} else if (!S_ISBLK(statbuf.st_mode)) {
check=0;
} else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340)
die(_("will not try to make filesystem on '%s'"));
+ if (BLOCKS < 10)
+ die(_("number of blocks too small"));
+ if (version2) {
+ if (namelen == 14)
+ magic = MINIX2_SUPER_MAGIC;
+ else
+ magic = MINIX2_SUPER_MAGIC2;
+ } else
+ if (BLOCKS > 65535)
+ BLOCKS = 65535;
setup_tables();
if (check)
check_blocks();

View File

@ -1,86 +0,0 @@
X-Gnus-Coding-System: -*- coding: utf-8; -*-
On Mon, Feb 11, 2008 at 05:04:22PM +0100, Matthias Koenig wrote:
> Matthias Koenig <mkoenig@suse.de> writes:
>
> > Fixes a problem when you define a device via a persistent
> > udev device name in /etc/fstab but use the real block device
> > name on mount invocation.
I didn't test it, but according to the code (and code never lies:-)
you're right.
> > mc0 = fstab_head();
> > - for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
> > - if (streq(mc->m.mnt_fsname, devname))
> > + for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
> > + name = canonicalize(mc->m.mnt_fsname);
> > + if (streq(name, devname)) {
> > + free(name);
> > return mc;
> > + }
> > + free(name);
> > + }
> > return NULL;
> > }
We can't simply canonicalize only. We have to support non-canonicalized
(/dev/cdrom, ...) versions too. And there shouldn't be a performance
penalization for people who use canonical paths in their fstab.
> I am dumb, please ignore this patch.
> New patch will follow.
No problem. Please, test the patch below.
Karel
>From a3c6d618c332ed3651fef629739ac246fd31b7ca Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Fri, 15 Feb 2008 01:56:18 +0100
Subject: [PATCH] mount: use canonicalize in getfs_by_devname
Fixes a problem when you define a device via a persistent
udev device name in /etc/fstab but use the real block device
name on mount invocation.
Signed-off-by: Karel Zak <kzak@redhat.com>
---
mount/fstab.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/mount/fstab.c b/mount/fstab.c
index 814e6fc..ada8d32 100644
--- a/mount/fstab.c
+++ b/mount/fstab.c
@@ -425,9 +425,22 @@ getfs_by_devname (const char *devname) {
struct mntentchn *mc, *mc0;
mc0 = fstab_head();
+
+ /* canonical devname in fstab */
for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)
if (streq(mc->m.mnt_fsname, devname))
return mc;
+
+ /* noncanonical devname in fstab */
+ for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) {
+ char *fs = canonicalize(mc->m.mnt_fsname);
+ if (streq(fs, devname)) {
+ free(fs);
+ return mc;
+ }
+ free(fs);
+ }
+
return NULL;
}
--
1.5.3.8
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

View File

@ -1,245 +0,0 @@
commit 2368077223fa5800cf88659c9c57a7f6517f3fad
Author: Karel Zak <kzak@redhat.com>
Date: Tue Sep 11 14:35:34 2007 +0200
mount: prevent loop mounting the same file twice
The mount syscall prevents mounting the same device twice
to the same mountpoint. When loop mounting a file, for each
file a new loop device gets allocated, which prevents the detection
of loop mounting the same file to the same mountpoint twice.
The patch adds a check to prevent double mounts, if the same loopfile
is going to be mounted with the same offset to the same mountpoint.
Co-Author: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Index: util-linux-ng-2.13.1/mount/lomount.c
===================================================================
--- util-linux-ng-2.13.1.orig/mount/lomount.c
+++ util-linux-ng-2.13.1/mount/lomount.c
@@ -143,7 +143,7 @@ show_used_loop_devices (void) {
for (j = 0; j < SIZE(loop_formats); j++) {
for(i = 0; i < 256; i++) {
- sprintf(dev, loop_formats[j], i);
+ snprintf(dev, sizeof(dev), loop_formats[j], i);
if (stat (dev, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)) {
fd = open (dev, O_RDONLY);
if (fd >= 0) {
@@ -169,6 +169,102 @@ show_used_loop_devices (void) {
#endif
+/* check if the loopfile is already associated with the same given
+ * parameters.
+ *
+ * returns: -1 error
+ * 0 unused
+ * 1 loop device already used
+ */
+static int
+is_associated(int dev, struct stat *file, unsigned long long offset)
+{
+ struct loop_info64 linfo64;
+ struct loop_info64 linfo;
+ int ret = 0;
+
+ if (ioctl(dev, LOOP_GET_STATUS64, &linfo64) == 0) {
+ if (file->st_dev == linfo64.lo_device &&
+ file->st_ino == linfo64.lo_inode &&
+ offset == linfo64.lo_offset)
+ ret = 1;
+ return ret;
+ }
+ if (ioctl(dev, LOOP_GET_STATUS, &linfo) == 0) {
+ if (file->st_dev == linfo.lo_device &&
+ file->st_ino == linfo.lo_inode &&
+ offset == linfo.lo_offset)
+ ret = 1;
+ return ret;
+ }
+
+ return errno == ENXIO ? 0 : -1;
+}
+
+/* check if the loop file is already used with the same given
+ * parameters. We check for device no, inode and offset.
+ * returns: associated devname or NULL
+ */
+char *
+loopfile_used (const char *filename, unsigned long long offset) {
+ char dev[20];
+ char *loop_formats[] = { "/dev/loop%d", "/dev/loop/%d" };
+ int i, j, fd;
+ struct stat devstat, filestat;
+ struct loop_info loopinfo;
+
+ if (stat(filename, &filestat) == -1) {
+ perror(filename);
+ return NULL;
+ }
+
+ for (j = 0; j < SIZE(loop_formats); j++) {
+ for(i = 0; i < 256; i++) {
+ snprintf(dev, sizeof(dev), loop_formats[j], i);
+ if (stat (dev, &devstat) == 0 && S_ISBLK(devstat.st_mode)) {
+ fd = open (dev, O_RDONLY);
+ if (fd >= 0) {
+ int res = 0;
+
+ if(ioctl (fd, LOOP_GET_STATUS, &loopinfo) == 0)
+ res = is_associated(fd, &filestat, offset);
+ close (fd);
+ if (res == 1)
+ return xstrdup(dev);
+ }
+ continue; /* continue trying as long as devices exist */
+ }
+ break;
+ }
+ }
+ return NULL;
+}
+
+int
+loopfile_used_with(char *devname, const char *filename, unsigned long long offset)
+{
+ struct stat statbuf;
+ int fd, ret;
+
+ if (!is_loop_device(devname))
+ return 0;
+
+ if (stat(filename, &statbuf) == -1) {
+ perror(filename);
+ return -1;
+ }
+
+ fd = open(devname, O_RDONLY);
+ if (fd == -1) {
+ perror(devname);
+ return -1;
+ }
+ ret = is_associated(fd, &statbuf, offset);
+
+ close(fd);
+ return ret;
+}
+
int
is_loop_device (const char *device) {
struct stat statbuf;
@@ -284,6 +380,16 @@ set_loop(const char *device, const char
char *filename;
char res_file[PATH_MAX+1];
+ if (verbose) {
+ char *xdev = loopfile_used(file, offset);
+
+ if (xdev) {
+ printf(_("warning: %s is already associated with %s\n"),
+ file, xdev);
+ free(xdev);
+ }
+ }
+
mode = (*loopro ? O_RDONLY : O_RDWR);
if ((ffd = open(file, mode)) < 0) {
if (!*loopro && errno == EROFS)
Index: util-linux-ng-2.13.1/mount/lomount.h
===================================================================
--- util-linux-ng-2.13.1.orig/mount/lomount.h
+++ util-linux-ng-2.13.1/mount/lomount.h
@@ -4,3 +4,6 @@ extern int set_loop(const char *, const
extern int del_loop(const char *);
extern int is_loop_device(const char *);
extern char * find_unused_loop_device(void);
+
+extern int loopfile_used_with(char *devname, const char *filename, unsigned long long offset);
+extern char *loopfile_used (const char *filename, unsigned long long offset);
Index: util-linux-ng-2.13.1/mount/mount.c
===================================================================
--- util-linux-ng-2.13.1.orig/mount/mount.c
+++ util-linux-ng-2.13.1/mount/mount.c
@@ -42,6 +42,7 @@
#include "mount_paths.h"
#include "env.h"
#include "nls.h"
+#include "realpath.h"
#define DO_PS_FIDDLING
@@ -833,9 +834,49 @@ suid_check(const char *spec, const char
*flags &= ~(MS_OWNER | MS_GROUP);
}
+/* Check, if there already exists a mounted loop device on the mountpoint node
+ * with the same parameters.
+ */
+static int
+is_mounted_same_loopfile(const char *node0, const char *loopfile, unsigned long long offset)
+{
+ struct mntentchn *mnt = NULL;
+ char node[PATH_MAX+1];
+ int res = 0;
+
+ myrealpath(node0, node, PATH_MAX);
+
+ /* Search for mountpoint node in mtab,
+ * procceed if any of these has the loop option set or
+ * the device is a loop device
+ */
+ mnt = getmntdirbackward(node, mnt);
+ if (!mnt) {
+ return 0;
+ }
+ for(; mnt && res == 0; mnt = getmntdirbackward(node, mnt)) {
+ char *p;
+
+ if (strncmp(mnt->m.mnt_fsname, "/dev/loop", 9) == 0)
+ res = loopfile_used_with((char *) mnt->m.mnt_fsname,
+ loopfile, offset);
+
+ else if ((p = strstr(mnt->m.mnt_opts, "loop="))) {
+ char *dev = xstrdup(p+5);
+ if ((p = strchr(dev, ',')))
+ *p = '\0';
+ res = loopfile_used_with(dev, loopfile, offset);
+ free(dev);
+ }
+ }
+
+ return res;
+}
+
static int
loop_check(const char **spec, const char **type, int *flags,
- int *loop, const char **loopdev, const char **loopfile) {
+ int *loop, const char **loopdev, const char **loopfile,
+ const char *node) {
int looptype;
unsigned long long offset;
@@ -876,6 +917,11 @@ loop_check(const char **spec, const char
offset = opt_offset ? strtoull(opt_offset, NULL, 0) : 0;
+ if (is_mounted_same_loopfile(node, *loopfile, offset)) {
+ error(_("mount: according to mtab %s is already mounted on %s as loop"), *loopfile, node);
+ return EX_FAIL;
+ }
+
do {
if (!*loopdev || !**loopdev)
*loopdev = find_unused_loop_device();
@@ -1061,7 +1107,7 @@ try_mount_one (const char *spec0, const
* stale assignments of files to loop devices. Nasty when used for
* encryption.
*/
- res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile);
+ res = loop_check(&spec, &types, &flags, &loop, &loopdev, &loopfile, node);
if (res)
goto out;
}

View File

@ -0,0 +1,37 @@
Index: util-linux-ng-2.14/mount/lomount.c
===================================================================
--- util-linux-ng-2.14.orig/mount/lomount.c 2008-06-25 11:35:27.000000000 +0200
+++ util-linux-ng-2.14/mount/lomount.c 2008-06-25 12:47:28.000000000 +0200
@@ -878,6 +878,7 @@ set_loop(const char *device, const char
int
del_loop (const char *device) {
int fd;
+ int res = 0;
if ((fd = open (device, O_RDONLY)) < 0) {
int errsv = errno;
@@ -886,10 +887,22 @@ del_loop (const char *device) {
return 1;
}
if (ioctl (fd, LOOP_CLR_FD, 0) < 0) {
- perror ("ioctl: LOOP_CLR_FD");
+ if (errno == ENXIO) {
+ /* ignore ENXIO, device has probably been
+ * auto-destructed */
+ if (verbose > 1)
+ printf(_("del_loop(%s): already deleted\n"),
+ device);
+ res = 0;
+ } else {
+ perror ("ioctl: LOOP_CLR_FD");
+ res = 1;
+ }
+
close(fd);
- return 1;
+ return res;
}
+
close (fd);
if (verbose > 1)
printf(_("del_loop(%s): success\n"), device);

View File

@ -0,0 +1,123 @@
mount: retry on ENOMEDIUM
From: Matthias Koenig <mkoenig@suse.de>
Due to a change in kernel behaviour when opening CDROM devices,
we need to retry the open/mount call when ENOMEDIUM is returned.
Explanation from Tejun Heo:
Okay, the difference is from the addition of cdrom_get_media_event()
call to both sr_drive_status() and ide_cdrom_drive_status().
Previously, the cdrom driver can't differentiate between tray closed
w/ no media and tray open and always returned tray open, which
triggers close and retry in the open logic which probably have delayed
things enough to get the media recognized.
Now the cdrom driver can discern between tray closed w/o media and
device not ready for other reasons and returns -ENOMEDIUM on the
former. This is all good and dandy but the problem seems that some
drives report no media right after the tray is closed but it hasn't
properly detected the media yet.
It seems the only way to work around the problem is via sensible
retries (e.g. try three times 5 secs apart) and I don't think we can
add that type of retry logic into cdrom open path. Please note that
the previous logic wasn't water proof. Some drives can take longer to
recognize the media is there and could have failed the in-kernel retry
too. Also, reading the media can take quite some time and during that
period the drive reports media present but device not ready. The
driver will retry the command (e.g. READ TOC for open) five times but
all of them can fail w/ EMEDIUMTYPE.
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
---
mount/fsprobe_volumeid.c | 15 +++++++++++++--
mount/mount.c | 11 +++++++++++
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/mount/fsprobe_volumeid.c b/mount/fsprobe_volumeid.c
index 7c98dc6..1ef788c 100644
--- a/mount/fsprobe_volumeid.c
+++ b/mount/fsprobe_volumeid.c
@@ -3,6 +3,7 @@
#include <unistd.h>
#include <string.h>
#include <stddef.h>
+#include <errno.h>
#include <sys/mount.h>
#include <sys/ioctl.h>
#include <fcntl.h>
@@ -15,6 +16,8 @@
#include "pathnames.h"
#include "sundries.h"
+#define MAX_RETRIES 5
+
enum probe_type {
VOLUME_ID_NONE,
VOLUME_ID_LABEL,
@@ -30,10 +33,18 @@ static char
struct volume_id *id;
const char *val;
char *value = NULL;
+ int retries = 0;
+retry:
fd = open(device, O_RDONLY);
- if (fd < 0)
- return NULL;
+ if (fd < 0) {
+ if (errno == ENOMEDIUM && retries < MAX_RETRIES) {
+ ++retries;
+ sleep(3);
+ goto retry;
+ } else
+ return NULL;
+ }
id = volume_id_open_fd(fd);
if (!id) {
diff --git a/mount/mount.c b/mount/mount.c
index bed792d..5d50bca 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -1061,6 +1061,7 @@ cdrom_setspeed(const char *spec) {
static int
try_mount_one (const char *spec0, const char *node0, const char *types0,
const char *opts0, int freq, int pass, int ro) {
+#define MAX_RETRIES 5
int res = 0, status = 0, special = 0;
int mnt5_res = 0; /* only for gcc */
int mnt_err;
@@ -1072,6 +1073,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0,
int loop = 0;
const char *loopdev = 0, *loopfile = 0;
struct stat statbuf;
+ int retries = 0; /* Nr of retries for mount in case of ENOMEDIUM */
/* copies for freeing on exit */
const char *opts1, *spec1, *node1, *types1, *extra_opts1;
@@ -1134,6 +1136,7 @@ try_mount_one (const char *spec0, const char *node0, const char *types0,
goto out;
}
+mount_retry:
block_signals (SIG_BLOCK);
if (!fake) {
@@ -1363,6 +1366,14 @@ try_mount_one (const char *spec0, const char *node0, const char *types0,
}
break;
}
+ case ENOMEDIUM:
+ if (retries < MAX_RETRIES) {
+ ++retries;
+ sleep(3);
+ goto mount_retry;
+ }
+ error(_("mount: No medium found on %s"), spec);
+ break;
default:
error ("mount: %s", strerror (mnt_err)); break;
}

View File

@ -40,62 +40,58 @@ Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
create mode 100644 mount/sha512.c create mode 100644 mount/sha512.c
create mode 100644 mount/sha512.h create mode 100644 mount/sha512.h
Index: util-linux-ng-2.13.1/mount/Makefile.am Index: util-linux-ng-2.14/mount/Makefile.am
=================================================================== ===================================================================
--- util-linux-ng-2.13.1.orig/mount/Makefile.am --- util-linux-ng-2.14.orig/mount/Makefile.am 2008-05-29 01:01:02.000000000 +0200
+++ util-linux-ng-2.13.1/mount/Makefile.am +++ util-linux-ng-2.14/mount/Makefile.am 2008-06-25 11:33:15.000000000 +0200
@@ -13,6 +13,7 @@ headers_common = fstab.h linux_fs.h moun @@ -13,6 +13,7 @@ headers_common = fstab.h mount_mntent.h
getusername.h loop.h sundries.h getusername.h loop.h sundries.h
mount_common = fstab.c mount_mntent.c getusername.c lomount.c \ mount_common = fstab.c mount_mntent.c getusername.c lomount.c \
+ rmd160.c sha512.c \ + rmd160.c sha512.c \
$(utils_common) $(headers_common) ../lib/env.c $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \
../lib/blkdev.c
mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c
@@ -25,7 +26,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD
@@ -27,7 +28,8 @@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LD
swapon_SOURCES = swapon.c swap_constants.h $(utils_common) swapon_SOURCES = swapon.c swap_constants.h $(utils_common)
-losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \
+losetup_SOURCES = lomount.c loop.h lomount.h realpath.c xmalloc.c \ - loop.h lomount.h xmalloc.h sundries.h realpath.h
+ rmd160.c sha512.c + loop.h lomount.h xmalloc.h sundries.h realpath.h \
+ rmd160.c sha512.c
losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
mount_LDADD = $(LDADD_common) mount_LDADD = $(LDADD_common)
Index: util-linux-ng-2.13.1/mount/lomount.c Index: util-linux-ng-2.14/mount/lomount.c
=================================================================== ===================================================================
--- util-linux-ng-2.13.1.orig/mount/lomount.c --- util-linux-ng-2.14.orig/mount/lomount.c 2008-05-29 01:01:02.000000000 +0200
+++ util-linux-ng-2.13.1/mount/lomount.c +++ util-linux-ng-2.14/mount/lomount.c 2008-06-25 11:33:15.000000000 +0200
@@ -20,11 +20,16 @@ @@ -24,6 +24,12 @@
#include "sundries.h"
#include "loop.h" #include "xmalloc.h"
#include "lomount.h" #include "realpath.h"
+#include "rmd160.h" +#include "rmd160.h"
+#include "sha512.h" +#include "sha512.h"
#include "xstrncpy.h" +
#include "nls.h"
#include "realpath.h"
#include "xmalloc.h"
+#ifndef MIN +#ifndef MIN
+#define MIN(a,b) ((a<b)?(a):(b)) +#define MIN(a,b) ((a<b)?(a):(b))
+#endif +#endif
extern int verbose; #define SIZE(a) (sizeof(a)/sizeof(a[0]))
extern char *progname;
@@ -97,12 +102,22 @@ show_loop(char *device) { @@ -334,12 +340,22 @@ show_loop_fd(int fd, char *device) {
if (loopinfo64.lo_encrypt_type || if (loopinfo64.lo_encrypt_type ||
loopinfo64.lo_crypt_name[0]) { loopinfo64.lo_crypt_name[0]) {
- char *e = loopinfo64.lo_crypt_name; - char *e = (char *)loopinfo64.lo_crypt_name;
+ const char *e = (const char*)loopinfo64.lo_crypt_name; + const char *e = (const char*)loopinfo64.lo_crypt_name;
if (*e == 0 && loopinfo64.lo_encrypt_type == 1) if (*e == 0 && loopinfo64.lo_encrypt_type == 1)
e = "XOR"; e = "XOR";
- printf(_(", encryption %s (type %d)"), - printf(_(", encryption %s (type %" PRIu32 ")"),
- e, loopinfo64.lo_encrypt_type); - e, loopinfo64.lo_encrypt_type);
+ printf(_(", encryption %s (type %d), key length %u"), + printf(_(", encryption %s (type %" PRIu32 "), key length %u"),
+ e, loopinfo64.lo_encrypt_type, loopinfo64.lo_encrypt_key_size); + e, loopinfo64.lo_encrypt_type, loopinfo64.lo_encrypt_key_size);
+ +
+#if 0 +#if 0
+ if(loopinfo64.lo_encrypt_key_size) { + if(loopinfo64.lo_encrypt_key_size) {
@ -108,8 +104,8 @@ Index: util-linux-ng-2.13.1/mount/lomount.c
+#endif +#endif
} }
printf("\n"); printf("\n");
close (fd); return 0;
@@ -357,7 +372,7 @@ xgetpass(int pfd, const char *prompt) { @@ -593,7 +609,7 @@ xgetpass(int pfd, const char *prompt) {
} }
if (pass == NULL) if (pass == NULL)
@ -118,7 +114,7 @@ Index: util-linux-ng-2.13.1/mount/lomount.c
pass[i] = 0; pass[i] = 0;
return pass; return pass;
@@ -371,12 +386,30 @@ digits_only(const char *s) { @@ -607,12 +623,31 @@ digits_only(const char *s) {
return 1; return 1;
} }
@ -142,18 +138,19 @@ Index: util-linux-ng-2.13.1/mount/lomount.c
+ +
int int
set_loop(const char *device, const char *file, unsigned long long offset, set_loop(const char *device, const char *file, unsigned long long offset,
- const char *encryption, int pfd, int *loopro) { - unsigned long long sizelimit, const char *encryption, int pfd, int *options) {
+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz) { + unsigned long long sizelimit, const char *encryption, const char *phash,
+ int pfd, int *options, int keysz) {
struct loop_info64 loopinfo64; struct loop_info64 loopinfo64;
int fd, ffd, mode, i; int fd, ffd, mode, i;
- char *pass; - char *pass;
+ char *pass = NULL; + char *pass = NULL;
char filename[PATH_MAX+1]; char *filename;
if (verbose) { if (verbose) {
@@ -410,13 +443,38 @@ set_loop(const char *device, const char @@ -646,13 +681,37 @@ set_loop(const char *device, const char
myrealpath(file, filename, PATH_MAX); filename = (char *) file;
xstrncpy(loopinfo64.lo_file_name, filename, LO_NAME_SIZE); xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE);
+ loopinfo64.lo_encrypt_key_size = 0; + loopinfo64.lo_encrypt_key_size = 0;
+ +
@ -168,7 +165,7 @@ Index: util-linux-ng-2.13.1/mount/lomount.c
loopinfo64.lo_encrypt_type = atoi(encryption); loopinfo64.lo_encrypt_type = atoi(encryption);
} else { } else {
loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI; loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI;
- snprintf(loopinfo64.lo_crypt_name, LO_NAME_SIZE, - snprintf((char *)loopinfo64.lo_crypt_name, LO_NAME_SIZE,
+ // check for something like twofish256 + // check for something like twofish256
+ unsigned len = strlen(encryption); + unsigned len = strlen(encryption);
+ snprintf((char*)loopinfo64.lo_crypt_name, LO_NAME_SIZE, + snprintf((char*)loopinfo64.lo_crypt_name, LO_NAME_SIZE,
@ -188,11 +185,10 @@ Index: util-linux-ng-2.13.1/mount/lomount.c
+ loopinfo64.lo_crypt_name, keysz); + loopinfo64.lo_crypt_name, keysz);
+ return 1; + return 1;
+ } + }
+ loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI;
} }
} }
@@ -436,20 +494,70 @@ set_loop(const char *device, const char @@ -673,20 +732,70 @@ set_loop(const char *device, const char
} }
#endif #endif
@ -206,11 +202,11 @@ Index: util-linux-ng-2.13.1/mount/lomount.c
- default: - default:
- pass = xgetpass(pfd, _("Password: ")); - pass = xgetpass(pfd, _("Password: "));
- gotpass: - gotpass:
+ if (loopinfo64.lo_encrypt_type != LO_CRYPT_NONE) { + if (loopinfo64.lo_encrypt_type != LO_CRYPT_NONE) {
+ void (*hfunc)(const unsigned char*, size_t, unsigned char*, size_t) = NULL; + void (*hfunc)(const unsigned char*, size_t, unsigned char*, size_t) = NULL;
+ +
memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE); memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE);
- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE); - xstrncpy((char *)loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
+ +
+ pass = xgetpass(pfd, _("Password: ")); + pass = xgetpass(pfd, _("Password: "));
+ if(!pass) + if(!pass)
@ -275,20 +271,9 @@ Index: util-linux-ng-2.13.1/mount/lomount.c
} }
if (ioctl(fd, LOOP_SET_FD, ffd) < 0) { if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
@@ -530,8 +638,8 @@ mutter(void) { @@ -837,7 +946,13 @@ usage(void) {
}
int fprintf(stderr, _("\nOptions:\n"
-set_loop (const char *device, const char *file, unsigned long long offset,
- const char *encryption, int *loopro) {
+set_loop(const char *device, const char *file, unsigned long long offset,
+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz) {
mutter();
return 1;
}
@@ -570,7 +678,13 @@ usage(void) {
" %1$s [ options ] {-f|--find|loop_device} file # setup\n"
"\nOptions:\n"
" -e | --encryption <type> enable data encryption with specified <name/num>\n" " -e | --encryption <type> enable data encryption with specified <name/num>\n"
+ " -H | --phash <type> hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n" + " -H | --phash <type> hash password using specified algorithm (sha512/sha256/sha384/rmd160/none)\n"
" -h | --help this help\n" " -h | --help this help\n"
@ -298,50 +283,50 @@ Index: util-linux-ng-2.13.1/mount/lomount.c
+ " key size. Key sizes < 128 are generally not\n" + " key size. Key sizes < 128 are generally not\n"
+ " recommended\n" + " recommended\n"
" -o | --offset <num> start at offset <num> into file\n" " -o | --offset <num> start at offset <num> into file\n"
" --sizelimit <num> loop limited to only <num> bytes of the file\n"
" -p | --pass-fd <num> read passphrase from file descriptor <num>\n" " -p | --pass-fd <num> read passphrase from file descriptor <num>\n"
" -r | --read-only setup read-only loop device\n" @@ -850,11 +965,14 @@ usage(void) {
@@ -594,11 +708,14 @@ error (const char *fmt, ...) {
int int
main(int argc, char **argv) { main(int argc, char **argv) {
char *p, *offset, *encryption, *passfd, *device, *file; char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc;
+ char *keysize; + char *keysize;
+ char *phash = NULL; + char *phash = NULL;
int delete, find, c, all; int delete, find, c, all;
int res = 0; int res = 0;
int showdev = 0; int showdev = 0;
int ro = 0; int ro = 0;
int pfd = -1; int pfd = -1;
+ int keysz = 0; + int keysz = 0;
unsigned long long off; unsigned long long off, slimit;
struct option longopts[] = { struct option longopts[] = {
{ "all", 0, 0, 'a' }, { "all", 0, 0, 'a' },
@@ -606,6 +723,8 @@ main(int argc, char **argv) { @@ -862,6 +980,8 @@ main(int argc, char **argv) {
{ "encryption", 1, 0, 'e' }, { "encryption", 1, 0, 'e' },
{ "find", 0, 0, 'f' }, { "find", 0, 0, 'f' },
{ "help", 0, 0, 'h' }, { "help", 0, 0, 'h' },
+ { "keybits", 1, 0, 'k' }, + { "keybits", 1, 0, 'k' },
+ { "phash", 1, 0, 'H' }, + { "phash", 1, 0, 'H' },
{ "associated", 1, 0, 'j' },
{ "offset", 1, 0, 'o' }, { "offset", 1, 0, 'o' },
{ "pass-fd", 1, 0, 'p' }, { "sizelimit", 1, 0, 128 },
{ "read-only", 0, 0, 'r' }, @@ -880,12 +1000,13 @@ main(int argc, char **argv) {
@@ -621,12 +740,13 @@ main(int argc, char **argv) {
delete = find = all = 0;
off = 0; off = 0;
offset = encryption = passfd = NULL; slimit = 0;
assoc = offset = sizelimit = encryption = passfd = NULL;
+ keysize = NULL; + keysize = NULL;
progname = argv[0]; progname = argv[0];
if ((p = strrchr(progname, '/')) != NULL) if ((p = strrchr(progname, '/')) != NULL)
progname = p+1; progname = p+1;
- while ((c = getopt_long(argc, argv, "ade:E:fho:p:rsv", - while ((c = getopt_long(argc, argv, "ade:E:fhj:o:p:rsv",
+ while ((c = getopt_long(argc, argv, "ade:E:fhk:o:p:rsvH:", + while ((c = getopt_long(argc, argv, "ade:E:fhj:k:o:p:rsvH:",
longopts, NULL)) != -1) { longopts, NULL)) != -1) {
switch (c) { switch (c) {
case 'a': case 'a':
@@ -645,6 +765,12 @@ main(int argc, char **argv) { @@ -907,6 +1028,12 @@ main(int argc, char **argv) {
case 'f': case 'j':
find = 1; assoc = optarg;
break; break;
+ case 'k': + case 'k':
+ keysize = optarg; + keysize = optarg;
@ -352,24 +337,25 @@ Index: util-linux-ng-2.13.1/mount/lomount.c
case 'o': case 'o':
offset = optarg; offset = optarg;
break; break;
@@ -708,8 +834,10 @@ main(int argc, char **argv) { @@ -985,8 +1112,11 @@ main(int argc, char **argv) {
usage(); else {
if (passfd && sscanf(passfd, "%d", &pfd) != 1) if (passfd && sscanf(passfd, "%d", &pfd) != 1)
usage(); usage();
+ if (keysize && sscanf(keysize,"%d",&keysz) != 1) + if (keysize && sscanf(keysize,"%d",&keysz) != 1)
+ usage(); + usage();
do { do {
- res = set_loop(device, file, off, encryption, pfd, &ro); - res = set_loop(device, file, off, slimit, encryption, pfd, &ro);
+ res = set_loop(device, file, off, encryption, phash, pfd, &ro, keysz); + res = set_loop(device, file, off, slimit, encryption, phash,
+ pfd, &ro, keysz);
if (res == 2 && find) { if (res == 2 && find) {
if (verbose) if (verbose)
printf("stolen loop=%s...trying again\n", printf("stolen loop=%s...trying again\n",
Index: util-linux-ng-2.13.1/mount/losetup.8 Index: util-linux-ng-2.14/mount/losetup.8
=================================================================== ===================================================================
--- util-linux-ng-2.13.1.orig/mount/losetup.8 --- util-linux-ng-2.14.orig/mount/losetup.8 2008-05-29 01:01:02.000000000 +0200
+++ util-linux-ng-2.13.1/mount/losetup.8 +++ util-linux-ng-2.14/mount/losetup.8 2008-06-25 11:33:15.000000000 +0200
@@ -76,6 +76,15 @@ find the first unused loop device. If a @@ -80,9 +80,18 @@ find the first unused loop device. If a
argument is present, use this device. Otherwise, print its name. argument is present, use this device. Otherwise, print its name
.IP "\fB\-h, \-\-help\fP" .IP "\fB\-h, \-\-help\fP"
print help print help
+.IP "\fB\-H, \-\-phash \fIhash_type\fP" +.IP "\fB\-H, \-\-phash \fIhash_type\fP"
@ -379,12 +365,15 @@ Index: util-linux-ng-2.13.1/mount/losetup.8
+.BR sha384 , +.BR sha384 ,
+.BR rmd160 , +.BR rmd160 ,
+.BR none . +.BR none .
.IP "\fB\-j, \-\-associated \fIfile\fP"
show status of all loop devices associated with given
.I file
+.IP "\fB\-k, \-\-keybits \fInum\fP" +.IP "\fB\-k, \-\-keybits \fInum\fP"
+set the number of bits to use in key to \fInum\fP. +set the number of bits to use in key to \fInum\fP.
.IP "\fB\-o, \-\-offset \fIoffset\fP" .IP "\fB\-o, \-\-offset \fIoffset\fP"
The data start is moved \fIoffset\fP bytes into the specified file or the data start is moved \fIoffset\fP bytes into the specified file or
device. device
@@ -140,6 +149,8 @@ the command @@ -153,6 +162,8 @@ the command
.fi .fi
.SH RESTRICTION .SH RESTRICTION
DES encryption is painfully slow. On the other hand, XOR is terribly weak. DES encryption is painfully slow. On the other hand, XOR is terribly weak.
@ -393,13 +382,13 @@ Index: util-linux-ng-2.13.1/mount/losetup.8
Cryptoloop is deprecated in favor of dm-crypt. For more details see Cryptoloop is deprecated in favor of dm-crypt. For more details see
.B cryptsetup(8). .B cryptsetup(8).
Index: util-linux-ng-2.13.1/mount/mount.8 Index: util-linux-ng-2.14/mount/mount.8
=================================================================== ===================================================================
--- util-linux-ng-2.13.1.orig/mount/mount.8 --- util-linux-ng-2.14.orig/mount/mount.8 2008-06-09 11:28:17.000000000 +0200
+++ util-linux-ng-2.13.1/mount/mount.8 +++ util-linux-ng-2.14/mount/mount.8 2008-06-25 11:33:15.000000000 +0200
@@ -610,6 +610,15 @@ This option implies the options @@ -618,6 +618,15 @@ This option implies the options
(unless overridden by subsequent options, as in the option line .B nofail
.BR group,dev,suid ). Do not report errors for this device if it does not exist.
.TP .TP
+.B encryption +.B encryption
+Specifies an encryption algorithm to use. Used in conjunction with the +Specifies an encryption algorithm to use. Used in conjunction with the
@ -413,7 +402,7 @@ Index: util-linux-ng-2.13.1/mount/mount.8
.B mand .B mand
Allow mandatory locks on this filesystem. See Allow mandatory locks on this filesystem. See
.BR fcntl (2). .BR fcntl (2).
@@ -2008,6 +2017,10 @@ that are really options to @@ -2034,6 +2043,10 @@ that are really options to
.BR \%losetup (8). .BR \%losetup (8).
(These options can be used in addition to those specific (These options can be used in addition to those specific
to the filesystem type.) to the filesystem type.)
@ -424,11 +413,11 @@ Index: util-linux-ng-2.13.1/mount/mount.8
If no explicit loop device is mentioned If no explicit loop device is mentioned
(but just an option `\fB\-o loop\fP' is given), then (but just an option `\fB\-o loop\fP' is given), then
Index: util-linux-ng-2.13.1/mount/mount.c Index: util-linux-ng-2.14/mount/mount.c
=================================================================== ===================================================================
--- util-linux-ng-2.13.1.orig/mount/mount.c --- util-linux-ng-2.14.orig/mount/mount.c 2008-05-29 01:01:02.000000000 +0200
+++ util-linux-ng-2.13.1/mount/mount.c +++ util-linux-ng-2.14/mount/mount.c 2008-06-25 11:33:15.000000000 +0200
@@ -94,6 +94,9 @@ static int suid = 0; @@ -87,6 +87,9 @@ static int suid = 0;
/* Contains the fd to read the passphrase from, if any. */ /* Contains the fd to read the passphrase from, if any. */
static int pfd = -1; static int pfd = -1;
@ -438,54 +427,51 @@ Index: util-linux-ng-2.13.1/mount/mount.c
/* Map from -o and fstab option strings to the flag argument to mount(2). */ /* Map from -o and fstab option strings to the flag argument to mount(2). */
struct opt_map { struct opt_map {
const char *opt; /* option name */ const char *opt; /* option name */
@@ -191,6 +194,7 @@ static int opt_nofail = 0; @@ -184,6 +187,7 @@ static int opt_nofail = 0;
static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption, static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_sizelimit,
*opt_speed, *opt_comment, *opt_uhelper; *opt_encryption, *opt_speed, *opt_comment, *opt_uhelper;
+static const char *opt_keybits, *opt_phash; +static const char *opt_keybits, *opt_phash;
static int mounted (const char *spec0, const char *node0); static int mounted (const char *spec0, const char *node0);
static int check_special_mountprog(const char *spec, const char *node, static int check_special_mountprog(const char *spec, const char *node,
@@ -205,6 +209,8 @@ static struct string_opt_map { @@ -199,6 +203,8 @@ static struct string_opt_map {
{ "vfs=", 1, &opt_vfstype },
{ "offset=", 0, &opt_offset }, { "offset=", 0, &opt_offset },
{ "sizelimit=", 0, &opt_sizelimit },
{ "encryption=", 0, &opt_encryption }, { "encryption=", 0, &opt_encryption },
+ { "phash=", 0, &opt_phash }, + { "phash=", 0, &opt_phash },
+ { "keybits=", 0, &opt_keybits }, + { "keybits=", 0, &opt_keybits },
{ "speed=", 0, &opt_speed }, { "speed=", 0, &opt_speed },
{ "comment=", 1, &opt_comment }, { "comment=", 1, &opt_comment },
{ "uhelper=", 0, &opt_uhelper }, { "uhelper=", 0, &opt_uhelper },
@@ -903,7 +909,7 @@ loop_check(const char **spec, const char @@ -898,7 +904,8 @@ loop_check(const char **spec, const char
*type = opt_vfstype; *type = opt_vfstype;
} }
- *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption); - *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit || opt_encryption);
+ *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_encryption || opt_phash || opt_keybits); + *loop = ((*flags & MS_LOOP) || *loopdev || opt_offset || opt_sizelimit ||
+ opt_encryption || opt_phash || opt_keybits);
*loopfile = *spec; *loopfile = *spec;
if (*loop) { if (*loop) {
@@ -929,9 +935,10 @@ loop_check(const char **spec, const char @@ -930,7 +937,7 @@ loop_check(const char **spec, const char
return EX_SYSERR; /* no more loop devices */
if (verbose)
printf(_("mount: going to use the loop device %s\n"), *loopdev); printf(_("mount: going to use the loop device %s\n"), *loopdev);
-
+ if (!keysz && opt_keybits) if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit,
+ keysz = strtoul(opt_keybits, NULL, 0); - opt_encryption, pfd, &loop_opts))) {
if ((res = set_loop(*loopdev, *loopfile, offset, + opt_encryption, opt_phash, pfd, &loop_opts, keysz))) {
- opt_encryption, pfd, &loopro))) {
+ opt_encryption, opt_phash, pfd, &loopro, keysz))) {
if (res == 2) { if (res == 2) {
/* loop dev has been grabbed by some other process, /* loop dev has been grabbed by some other process,
try again, if not given explicitly */ try again, if not given explicitly */
@@ -1681,6 +1688,7 @@ static struct option longopts[] = { @@ -1650,6 +1657,7 @@ static struct option longopts[] = {
{ "options", 1, 0, 'o' }, { "options", 1, 0, 'o' },
{ "test-opts", 1, 0, 'O' }, { "test-opts", 1, 0, 'O' },
{ "pass-fd", 1, 0, 'p' }, { "pass-fd", 1, 0, 'p' },
+ { "keybits", 1, 0, 'k' }, + { "keybits", 1, 0, 'k' },
{ "types", 1, 0, 't' }, { "types", 1, 0, 't' },
{ "bind", 0, 0, 128 }, { "bind", 0, 0, 128 },
{ "replace", 0, 0, 129 }, { "move", 0, 0, 133 },
@@ -1836,6 +1844,7 @@ main(int argc, char *argv[]) { @@ -1811,6 +1819,7 @@ main(int argc, char *argv[]) {
char *options = NULL, *test_opts = NULL, *node; char *options = NULL, *test_opts = NULL, *node;
const char *spec = NULL; const char *spec = NULL;
char *label = NULL; char *label = NULL;
@ -493,7 +479,7 @@ Index: util-linux-ng-2.13.1/mount/mount.c
char *uuid = NULL; char *uuid = NULL;
char *types = NULL; char *types = NULL;
char *p; char *p;
@@ -1866,7 +1875,7 @@ main(int argc, char *argv[]) { @@ -1841,7 +1850,7 @@ main(int argc, char *argv[]) {
initproctitle(argc, argv); initproctitle(argc, argv);
#endif #endif
@ -502,7 +488,7 @@ Index: util-linux-ng-2.13.1/mount/mount.c
longopts, NULL)) != -1) { longopts, NULL)) != -1) {
switch (c) { switch (c) {
case 'a': /* mount everything in fstab */ case 'a': /* mount everything in fstab */
@@ -1884,6 +1893,9 @@ main(int argc, char *argv[]) { @@ -1859,6 +1868,9 @@ main(int argc, char *argv[]) {
case 'i': case 'i':
external_allowed = 0; external_allowed = 0;
break; break;
@ -512,9 +498,9 @@ Index: util-linux-ng-2.13.1/mount/mount.c
case 'l': case 'l':
list_with_volumelabel = 1; list_with_volumelabel = 1;
break; break;
@@ -2030,6 +2042,9 @@ main(int argc, char *argv[]) { @@ -1989,6 +2001,9 @@ main(int argc, char *argv[]) {
create_mtab ();
} atexit(unlock_mtab);
+ if (keysize && sscanf(keysize,"%d",&keysz) != 1) + if (keysize && sscanf(keysize,"%d",&keysz) != 1)
+ die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); + die (EX_USAGE, _("mount: argument to --keybits or -k must be a number"));
@ -522,10 +508,10 @@ Index: util-linux-ng-2.13.1/mount/mount.c
switch (argc+specseen) { switch (argc+specseen) {
case 0: case 0:
/* mount -a */ /* mount -a */
Index: util-linux-ng-2.13.1/mount/rmd160.c Index: util-linux-ng-2.14/mount/rmd160.c
=================================================================== ===================================================================
--- /dev/null --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ util-linux-ng-2.13.1/mount/rmd160.c +++ util-linux-ng-2.14/mount/rmd160.c 2008-06-25 11:33:15.000000000 +0200
@@ -0,0 +1,532 @@ @@ -0,0 +1,532 @@
+/* rmd160.c - RIPE-MD160 +/* rmd160.c - RIPE-MD160
+ * Copyright (C) 1998 Free Software Foundation, Inc. + * Copyright (C) 1998 Free Software Foundation, Inc.
@ -1059,10 +1045,10 @@ Index: util-linux-ng-2.13.1/mount/rmd160.c
+ rmd160_final( &hd ); + rmd160_final( &hd );
+ memcpy( outbuf, hd.buf, 20 ); + memcpy( outbuf, hd.buf, 20 );
+} +}
Index: util-linux-ng-2.13.1/mount/rmd160.h Index: util-linux-ng-2.14/mount/rmd160.h
=================================================================== ===================================================================
--- /dev/null --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ util-linux-ng-2.13.1/mount/rmd160.h +++ util-linux-ng-2.14/mount/rmd160.h 2008-06-25 11:33:15.000000000 +0200
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+#ifndef RMD160_H +#ifndef RMD160_H
+#define RMD160_H +#define RMD160_H
@ -1075,10 +1061,10 @@ Index: util-linux-ng-2.13.1/mount/rmd160.h
+#endif /*RMD160_H*/ +#endif /*RMD160_H*/
+ +
+ +
Index: util-linux-ng-2.13.1/mount/sha512.c Index: util-linux-ng-2.14/mount/sha512.c
=================================================================== ===================================================================
--- /dev/null --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ util-linux-ng-2.13.1/mount/sha512.c +++ util-linux-ng-2.14/mount/sha512.c 2008-06-25 11:33:15.000000000 +0200
@@ -0,0 +1,432 @@ @@ -0,0 +1,432 @@
+/* +/*
+ * sha512.c + * sha512.c
@ -1512,10 +1498,10 @@ Index: util-linux-ng-2.13.1/mount/sha512.c
+ memset(&ctx, 0, sizeof(ctx)); + memset(&ctx, 0, sizeof(ctx));
+} +}
+#endif +#endif
Index: util-linux-ng-2.13.1/mount/sha512.h Index: util-linux-ng-2.14/mount/sha512.h
=================================================================== ===================================================================
--- /dev/null --- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ util-linux-ng-2.13.1/mount/sha512.h +++ util-linux-ng-2.14/mount/sha512.h 2008-06-25 11:33:15.000000000 +0200
@@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
+/* +/*
+ * sha512.h + * sha512.h
@ -1562,16 +1548,16 @@ Index: util-linux-ng-2.13.1/mount/sha512.h
+/* no sha384_write(), use sha512_write() */ +/* no sha384_write(), use sha512_write() */
+/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */ +/* no sha384_final(), use sha512_final(), result in ctx->sha_out[0...47] */
+extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t); +extern void sha384_hash_buffer(const unsigned char *, size_t, unsigned char *, size_t);
Index: util-linux-ng-2.13.1/mount/lomount.h Index: util-linux-ng-2.14/mount/lomount.h
=================================================================== ===================================================================
--- util-linux-ng-2.13.1.orig/mount/lomount.h --- util-linux-ng-2.14.orig/mount/lomount.h 2008-05-29 01:01:02.000000000 +0200
+++ util-linux-ng-2.13.1/mount/lomount.h +++ util-linux-ng-2.14/mount/lomount.h 2008-06-25 11:33:15.000000000 +0200
@@ -1,6 +1,6 @@ @@ -1,5 +1,6 @@
extern int verbose; -extern int set_loop(const char *, const char *, unsigned long long, unsigned long long,
-extern int set_loop(const char *, const char *, unsigned long long,
- const char *, int, int *); - const char *, int, int *);
+extern int set_loop(const char *device, const char *file, unsigned long long offset, +extern int set_loop(const char * device, const char * file, unsigned long long offset,
+ const char *encryption, const char* phash, int pfd, int *loopro, int keysz); + unsigned long long, const char *encryption, const char *phash,
+ int pfd, int *options, int keysz);
extern int del_loop(const char *); extern int del_loop(const char *);
extern int is_loop_device(const char *); extern int is_loop_device(const char *);
extern char * find_unused_loop_device(void); extern char * find_unused_loop_device(void);

View File

@ -1,61 +0,0 @@
Do not fail on ENOENT
Introduces a new mount option "nofail" which prevents mount
to fail if the device does not exist.
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Index: util-linux-ng-2.13-rc1/mount/mount.8
===================================================================
--- util-linux-ng-2.13-rc1.orig/mount/mount.8
+++ util-linux-ng-2.13-rc1/mount/mount.8
@@ -625,6 +625,9 @@ access on the news spool to speed up new
.B nodiratime
Do not update directory inode access times on this filesystem.
.TP
+.B nofail
+Do not report errors for this device if it does not exist.
+.TP
.B relatime
Update inode access times relative to modify or change time. Access
time is only updated if the previous access time was earlier than the
Index: util-linux-ng-2.13-rc1/mount/mount.c
===================================================================
--- util-linux-ng-2.13-rc1.orig/mount/mount.c
+++ util-linux-ng-2.13-rc1/mount/mount.c
@@ -182,9 +182,12 @@ static const struct opt_map opt_map[] =
{ "norelatime", 0, 1, MS_RELATIME }, /* Update access time without regard
to mtime/ctime */
#endif
+ { "nofail", 0, 0, MS_COMMENT}, /* Do not fail if ENOENT on dev */
{ NULL, 0, 0, 0 }
};
+static int opt_nofail = 0;
+
static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption,
*opt_speed, *opt_comment, *opt_uhelper;
@@ -389,6 +392,8 @@ parse_opt(char *opt, int *mask, char **e
verbose = 0;
}
#endif
+ if (streq(opt, "nofail"))
+ opt_nofail = 1;
return;
}
@@ -1150,9 +1155,11 @@ try_mount_one (const char *spec0, const
else if (stat (node, &statbuf))
error (_("mount: mount point %s is a symbolic link to nowhere"),
node);
- else if (stat (spec, &statbuf))
+ else if (stat (spec, &statbuf)) {
+ if (opt_nofail)
+ goto out;
error (_("mount: special device %s does not exist"), spec);
- else {
+ } else {
errno = mnt_err;
perror("mount");
}

View File

@ -1,112 +0,0 @@
From db6041b3a569d78f5716baa5a134a3a857014337 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Wed, 30 May 2007 13:22:51 +0200
Subject: [PATCH] mount: automatically reinitialize swap with old swsuspend data
We have to reinitialize swap area with old (=useless) software suspend
data. The problem is that if we don't do it, then we get data
corruption the next time with suspended on.
Signed-off-by: Karel Zak <kzak@redhat.com>
---
mount/swapon.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 deletions(-)
diff --git a/mount/swapon.c b/mount/swapon.c
index ed91afc..3f9b442 100644
--- a/mount/swapon.c
+++ b/mount/swapon.c
@@ -10,6 +10,9 @@
#include <errno.h>
#include <sys/stat.h>
#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <fcntl.h>
#include "xmalloc.h"
#include "swap_constants.h"
#include "nls.h"
@@ -17,6 +20,8 @@
#include "realpath.h"
#include "mount_paths.h"
+#define PATH_MKSWAP "/sbin/mkswap"
+
#ifdef HAVE_SYS_SWAP_H
# include <sys/swap.h>
#endif
@@ -158,6 +163,52 @@ display_summary(void)
}
static int
+swap_is_swsuspend(const char *device) {
+ const char *type = fsprobe_get_fstype_by_devname(device);
+
+ return (type && strcmp(type, "swsuspend") == 0) ? 1 : 0;
+}
+
+/* calls mkswap */
+static int
+swap_reinitialize(const char *device) {
+ const char *label = fsprobe_get_label_by_devname(device);
+ pid_t pid;
+ int status, ret;
+
+ switch((pid=fork())) {
+ case -1: /* fork error */
+ fprintf(stderr, _("%s: cannot fork: %s\n"),
+ progname, strerror(errno));
+ return -1;
+
+ case 0: /* child */
+ if (label && *label)
+ execl(PATH_MKSWAP, PATH_MKSWAP, "-L", label, device, NULL);
+ else
+ execl(PATH_MKSWAP, PATH_MKSWAP, device, NULL);
+ exit(1); /* error */
+
+ default: /* parent */
+ do {
+ if ((ret = waitpid(pid, &status, 0)) < 0
+ && errno == EINTR)
+ continue;
+ else if (ret < 0) {
+ fprintf(stderr, _("%s: waitpid: %s\n"),
+ progname, strerror(errno));
+ return -1;
+ }
+ } while (0);
+
+ /* mkswap returns: 0=suss, 1=error */
+ if (WIFEXITED(status) && WEXITSTATUS(status)==0)
+ return 0; /* ok */
+ }
+ return -1; /* error */
+}
+
+static int
do_swapon(const char *orig_special, int prio, int canonic) {
int status;
struct stat st;
@@ -179,6 +230,18 @@ do_swapon(const char *orig_special, int prio, int canonic) {
return -1;
}
+ /* We have to reinitialize swap with old (=useless) software suspend
+ * data. The problem is that if we don't do it, then we get data
+ * corruption the next time with suspended on.
+ */
+ if (swap_is_swsuspend(special)) {
+ fprintf(stdout, _("%s: %s: software suspend data detected. "
+ "Reinitializing the swap.\n"),
+ progname, special);
+ if (swap_reinitialize(special) < 0)
+ return -1;
+ }
+
/* people generally dislike this warning - now it is printed
only when `verbose' is set */
if (verbose) {
--
1.5.2.2

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e67d86683adef0855220b6f5a4b7ca2c51a15faa142e2ecd69925ede76854a4d
size 2854716

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7736d8d7d3b39654e350416585b3e00af9f55670cce8b3dddd2c2494cbaae81c
size 2868987

View File

@ -1,3 +1,36 @@
-------------------------------------------------------------------
Wed Jun 25 14:26:49 CEST 2008 - mkoenig@suse.de
- update to version 2.14
most important changes:
* new command ldattach
mount:
* support auto-destruction of loop devices
losetup:
* new option -j
* supports unlimited number of loop devices
* new option --sizelimit to set data end
* option -s (short form of --show) now deprecated
mkswap:
* new option -U to set UUID explicitly
fdisk:
* calculate partition size in 2^N [bnc#381270]
hwclock:
* new option --adjfile to override default /etc/adjtime
- readd scriptreplay, implemented now in C
- add retry for mount if ENOMEDIUM is returned [bnc#390204]
- ignore ENXIO in del_loop, because they might have been
auto-destructed
- removed patches:
util-linux-2.13.1-canonicalize_loopfile_name.patch
util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch
util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch
util-linux-2.13.1-mount_getfs_fix.patch
util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch
util-linux-2.13-fdisk_cfdisk_ncursesw.patch
util-linux-mount_opt_nofail.patch
util-linux-ng-2.13-swapon-swsuspend.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de Thu Apr 3 17:11:53 CEST 2008 - mkoenig@suse.de

View File

@ -1,5 +1,5 @@
# #
# spec file for package util-linux (Version 2.13.1) # spec file for package util-linux (Version 2.14)
# #
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine # This file and all modifications and additions to the pristine
@ -21,8 +21,8 @@ PreReq: %install_info_prereq permissions
License: BSD 3-Clause; GPL v2 or later License: BSD 3-Clause; GPL v2 or later
Group: System/Base Group: System/Base
AutoReqProv: on AutoReqProv: on
Version: 2.13.1 Version: 2.14
Release: 19 Release: 1
Requires: %name-lang = %{version} Requires: %name-lang = %{version}
Summary: A collection of basic system utilities Summary: A collection of basic system utilities
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2 Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2
@ -32,6 +32,8 @@ Source3: nologin.8
Source4: raw.init Source4: raw.init
Source5: etc.raw Source5: etc.raw
Source6: etc_filesystems Source6: etc_filesystems
Source7: v2.14-ChangeLog
Source8: v2.14-ReleaseNotes
%define time_ver 1.7 %define time_ver 1.7
%define which_ver 2.16 %define which_ver 2.16
%define adjtimex_ver 1.20 %define adjtimex_ver 1.20
@ -52,26 +54,16 @@ Source30: README.largedisk
## ##
# add hostid # add hostid
Patch1: util-linux-2.12-misc_utils_hostid.patch Patch1: util-linux-2.12-misc_utils_hostid.patch
# 104405 - mount -a doesn't work with hotpluggable devices
Patch2: util-linux-mount_opt_nofail.patch
# 160822 - fix for 153657 # 160822 - fix for 153657
Patch3: util-linux-2.12r-fdisk_cyl.patch Patch2: util-linux-2.12r-fdisk_cyl.patch
# 241372 - remove legacy warnings from fdisk # 241372 - remove legacy warnings from fdisk
Patch4: util-linux-2.12r-fdisk_remove_bogus_warnings.patch Patch3: util-linux-2.12r-fdisk_remove_bogus_warnings.patch
# 304861 - support password hashing and key length
Patch6: util-linux-2.13-fdisk_cfdisk_ncursesw.patch
# 338419 # 338419
Patch7: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch Patch4: util-linux-2.13-hwclock_rtc_wait_busy_tempfix.patch
# in upstream git, but not yet released
Patch8: util-linux-2.13.1-canonicalize_loopfile_name.patch
Patch9: util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch
Patch10: util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch
Patch11: util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch
Patch12: util-linux-2.13.1-mount_getfs_fix.patch
# 254437 - swapon should automatically reset the suspend signature
Patch13: util-linux-ng-2.13-swapon-swsuspend.patch
# #
Patch14: util-linux-2.13.1-fdisk_cfdisk_yesno.patch Patch5: util-linux-2.13.1-fdisk_cfdisk_yesno.patch
Patch6: util-linux-2.14-mount_ignore_ENXIO_in_del_loop.patch
Patch7: util-linux-2.14-mount_retry_on_nomedium.patch
# crypto patch # crypto patch
Patch20: util-linux-mount_losetup_crypto.patch Patch20: util-linux-mount_losetup_crypto.patch
## ##
@ -113,17 +105,11 @@ Authors:
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch20 -p1 %patch20 -p1
#%patch38 -p1 cp %{SOURCE7} %{SOURCE8} .
# #
cd adjtimex-* cd adjtimex-*
%patch50 -p1 %patch50 -p1
@ -185,9 +171,14 @@ make setctsid CFLAGS="$RPM_OPT_FLAGS"
%ifarch s390 s390x %ifarch s390 s390x
CFLAGS=-DCONFIG_SMP CFLAGS=-DCONFIG_SMP
%endif %endif
# architecture dependent builds
BUILD_ENABLE=
%ifarch %ix86 x86_64
BUILD_ENABLE="--enable-rdev"
%endif
# Use autogen, when building from git tree # Use autogen, when building from git tree
#autoreconf -fi autoreconf -fi
./autogen.sh #./autogen.sh
./configure --mandir=%{_mandir} \ ./configure --mandir=%{_mandir} \
--datadir=%{_datadir} \ --datadir=%{_datadir} \
--with-fsprobe=volume_id \ --with-fsprobe=volume_id \
@ -196,9 +187,9 @@ CFLAGS=-DCONFIG_SMP
--enable-mesg \ --enable-mesg \
--enable-partx \ --enable-partx \
--enable-raw \ --enable-raw \
--enable-rdev \
--enable-write \ --enable-write \
--disable-use-tty-group \ --disable-use-tty-group \
$BUILD_ENABLE \
CFLAGS="$CFLAGS $RPM_OPT_FLAGS" CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
make make
gcc $RPM_OPT_FLAGS -o nologin nologin.c gcc $RPM_OPT_FLAGS -o nologin nologin.c
@ -271,9 +262,7 @@ rm -f $RPM_BUILD_ROOT/usr/bin/pg
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pg.1* rm -f $RPM_BUILD_ROOT/usr/share/man/man1/pg.1*
# Do not package these files to get rid of the perl dependency # Do not package these files to get rid of the perl dependency
rm -f $RPM_BUILD_ROOT/usr/bin/chkdupexe rm -f $RPM_BUILD_ROOT/usr/bin/chkdupexe
rm -f $RPM_BUILD_ROOT/usr/bin/scriptreplay
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/chkdupexe.1 rm -f $RPM_BUILD_ROOT/usr/share/man/man1/chkdupexe.1
rm -f $RPM_BUILD_ROOT/usr/share/man/man1/scriptreplay.1
# For now, do not package setarch and related symlinks # For now, do not package setarch and related symlinks
rm -f $RPM_BUILD_ROOT/usr/bin/setarch rm -f $RPM_BUILD_ROOT/usr/bin/setarch
rm -f $RPM_BUILD_ROOT/usr/bin/linux32 rm -f $RPM_BUILD_ROOT/usr/bin/linux32
@ -301,7 +290,7 @@ rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/parisc{,32,64}.8
%ifarch s390 s390x %ifarch s390 s390x
rm -f $RPM_BUILD_ROOT/etc/fdprm rm -f $RPM_BUILD_ROOT/etc/fdprm
rm -f $RPM_BUILD_ROOT/usr/bin/cytune rm -f $RPM_BUILD_ROOT/usr/bin/cytune
rm -f $RPM_BUILD_ROOT/usr/bin/fdformat rm -f $RPM_BUILD_ROOT/usr/sbin/fdformat
rm -f $RPM_BUILD_ROOT/sbin/hwclock rm -f $RPM_BUILD_ROOT/sbin/hwclock
rm -f $RPM_BUILD_ROOT/usr/sbin/klogconsole rm -f $RPM_BUILD_ROOT/usr/sbin/klogconsole
rm -f $RPM_BUILD_ROOT/usr/bin/setterm rm -f $RPM_BUILD_ROOT/usr/bin/setterm
@ -353,6 +342,8 @@ fi
%files %files
# Common files for all archs # Common files for all archs
%defattr(-,root,root) %defattr(-,root,root)
%doc v2.14-ChangeLog
%doc v2.14-ReleaseNotes
%doc login-utils/README.getty %doc login-utils/README.getty
%doc login-utils/README.modems-with-agetty %doc login-utils/README.modems-with-agetty
%doc login-utils/README.poeigl %doc login-utils/README.poeigl
@ -419,6 +410,7 @@ fi
/usr/bin/rev /usr/bin/rev
/usr/bin/script /usr/bin/script
#/usr/bin/setarch #/usr/bin/setarch
/usr/bin/scriptreplay
/usr/bin/setsid /usr/bin/setsid
/usr/bin/ul /usr/bin/ul
/usr/bin/tailf /usr/bin/tailf
@ -427,6 +419,7 @@ fi
/usr/bin/which /usr/bin/which
/usr/sbin/addpart /usr/sbin/addpart
/usr/sbin/delpart /usr/sbin/delpart
/usr/sbin/ldattach
/usr/sbin/freeramdisk /usr/sbin/freeramdisk
/usr/sbin/partx /usr/sbin/partx
/usr/sbin/rtcwake /usr/sbin/rtcwake
@ -471,6 +464,7 @@ fi
%{_mandir}/man1/renice.1.gz %{_mandir}/man1/renice.1.gz
%{_mandir}/man1/setsid.1.gz %{_mandir}/man1/setsid.1.gz
%{_mandir}/man1/script.1.gz %{_mandir}/man1/script.1.gz
%{_mandir}/man1/scriptreplay.1.gz
%{_mandir}/man1/setterm.1.gz %{_mandir}/man1/setterm.1.gz
%{_mandir}/man1/tailf.1.gz %{_mandir}/man1/tailf.1.gz
%{_mandir}/man1/taskset.1.gz %{_mandir}/man1/taskset.1.gz
@ -491,6 +485,7 @@ fi
%{_mandir}/man8/mkfs.minix.8.gz %{_mandir}/man8/mkfs.minix.8.gz
%{_mandir}/man8/fsck.minix.8.gz %{_mandir}/man8/fsck.minix.8.gz
%{_mandir}/man8/isosize.8.gz %{_mandir}/man8/isosize.8.gz
%{_mandir}/man8/ldattach.8.gz
%{_mandir}/man8/losetup.8.gz %{_mandir}/man8/losetup.8.gz
%{_mandir}/man8/mkfs.8.gz %{_mandir}/man8/mkfs.8.gz
%{_mandir}/man8/mkswap.8.gz %{_mandir}/man8/mkswap.8.gz
@ -541,7 +536,7 @@ fi
%ifnarch s390 s390x %ifnarch s390 s390x
#%config(noreplace) /etc/fdprm #%config(noreplace) /etc/fdprm
/usr/bin/cytune /usr/bin/cytune
/usr/bin/fdformat /usr/sbin/fdformat
/sbin/hwclock /sbin/hwclock
/usr/sbin/klogconsole /usr/sbin/klogconsole
/usr/bin/setterm /usr/bin/setterm
@ -574,6 +569,36 @@ fi
#%endif #%endif
%changelog %changelog
* Wed Jun 25 2008 mkoenig@suse.de
- update to version 2.14
most important changes:
* new command ldattach
mount:
* support auto-destruction of loop devices
losetup:
* new option -j
* supports unlimited number of loop devices
* new option --sizelimit to set data end
* option -s (short form of --show) now deprecated
mkswap:
* new option -U to set UUID explicitly
fdisk:
* calculate partition size in 2^N [bnc#381270]
hwclock:
* new option --adjfile to override default /etc/adjtime
- readd scriptreplay, implemented now in C
- add retry for mount if ENOMEDIUM is returned [bnc#390204]
- ignore ENXIO in del_loop, because they might have been
auto-destructed
- removed patches:
util-linux-2.13.1-canonicalize_loopfile_name.patch
util-linux-2.13.1-mkfs.minix_add_sectorsize_check.patch
util-linux-2.13.1-mkfs.minix_device_size_cleanup.patch
util-linux-2.13.1-mount_getfs_fix.patch
util-linux-2.13.1-prevent_loop_mounting_the_same_file_twice.patch
util-linux-2.13-fdisk_cfdisk_ncursesw.patch
util-linux-mount_opt_nofail.patch
util-linux-ng-2.13-swapon-swsuspend.patch
* Thu Apr 03 2008 mkoenig@suse.de * Thu Apr 03 2008 mkoenig@suse.de
- cfdisk: accept english answer [bnc#369043] - cfdisk: accept english answer [bnc#369043]
- use upstream getfs fix - use upstream getfs fix

105
v2.14-ChangeLog Normal file
View File

@ -0,0 +1,105 @@
Changes between v2.14-rc3 and v2.14
-----------------------------------
commit fba4e21fa000748112d39c8e9fc266f1cbe9a08f
Author: Karel Zak <kzak@redhat.com>
Date: Mon Jun 9 13:58:54 2008 +0200
build-sys: release++ (v2.14)
Signed-off-by: Karel Zak <kzak@redhat.com>
NEWS | 4 ++++
configure.ac | 2 +-
docs/v2.14-ReleaseNotes | 2 +-
3 files changed, 6 insertions(+), 2 deletions(-)
commit 1d66f79c80e6c655dbd1633f9e7d4efd1562bc20
Author: Karel Zak <kzak@redhat.com>
Date: Mon Jun 9 12:53:27 2008 +0200
docs: update v2.14 ReleaseNotes
Signed-off-by: Karel Zak <kzak@redhat.com>
docs/v2.14-ReleaseNotes | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
commit d5b64541978b45af5eaa60050d2b1a5f3a5da243
Author: Karel Zak <kzak@redhat.com>
Date: Mon Jun 9 12:20:40 2008 +0200
docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
AUTHORS | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
commit 754ba29e2b9d6569cf502a3c6cd0a59c6513e25a
Author: Karel Zak <kzak@redhat.com>
Date: Mon Jun 9 12:18:26 2008 +0200
po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
po/hu.po | 852 +++++++++++++++++++++++++++++++++++++++++++-------------------
1 files changed, 597 insertions(+), 255 deletions(-)
commit 568ea3a7f1516f86769230ccdb2682479be326e9
Author: Gabor Kelemen <kelemeng@gnome.hu>
Date: Mon Jun 9 12:02:00 2008 +0200
po: update hu.po (from translationproject.org)
po/hu.po | 1542 +++++++++++++++++++++++---------------------------------------
1 files changed, 559 insertions(+), 983 deletions(-)
commit 0eab17b95d813c93c8e7b5e7f5943f0940420f00
Author: Volker Schatz <oss@volkerschatz.com>
Date: Tue Jun 3 23:52:04 2008 +0200
ddate: 11th, 12th and 13th of month
the Discordian date utility ddate gives the 11th, 12th and 13th of the month as
the "11st", "12nd" and "13rd". Unless this is a religious thing, please apply
the patch below.
Signed-off-by: Volker Schatz <oss@volkerschatz.com>
misc-utils/ddate.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit 47bf8ef7f1d084befe2efcdd37a5f7c7c9d9da70
Author: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Date: Mon Jun 9 11:35:59 2008 +0200
rtcwake: fix the default mode to "standby"
Writing "suspend" to /sys/power/state does nothing.
Even "man rtcwake" says that default should be "standby" :)
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/rtcwake.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
commit eaf58a8697926711efec9e494e810d3f6bfd3938
Author: Christophe Blaess <Christophe@Blaess.fr>
Date: Mon Jun 9 11:32:19 2008 +0200
mount: fix a small typo in mount.8
While working on french translation of the Linux Man Pages, I've found a
small typo in mount.8.
Only one wrong letter : the option "osyncis_o_sync" for XFS filesystem
is erroneously replaced by "osyncis_d_sync" (the previous option).
Signed-off-by: Christophe Blaess <Christophe@Blaess.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
mount/mount.8 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

418
v2.14-ReleaseNotes Normal file
View File

@ -0,0 +1,418 @@
Util-linux-ng 2.14 Release Notes (09-Jun-2008)
==============================================
Release highlights
------------------
mount(8) supports new "nofail" mount option.
mount(8) supports auto-destruction of loop devices.
losetup(8) supports new command line option "-j" to show status of all
loop devices associated with given file.
losetup(8) supports unlimited number of loop devices.
losetup(8) supports new command line option "--sizelimit" to set data end.
ldattach(8) command has been added to util-linux-ng. The ldattach
daemon opens the specified device file and attaches the line discipline
to it for processing of the sent and/or received data.
setterm(8) supports new command line option "-blank [force|poke]" for
TIOCL_{BLANKED,BLANK}SCREEN.
tailf(8) has been reimplemented to use inotify.
tailf(8) supports new command line option "-n" to specifying output lines.
mkswap(8) supports new command line option "-U" to set UUID explicitly.
fdisk(8) has been fixed to calculate partition size in 2^N.
cal(8) supports highlighting an arbitrary date.
agetty(8) makes username-in-uppercase feature optional (off by default).
Users who use uppercase-only terminals need to use the option "-U" now.
losetup(8), mount(8), umount(8), fdisk(8) and sfdisk(8) support static
linking when compiled with --enable-static-programs.
hwclock(8) supports new command line option "adjfile" to override
the default /etc/adjtime.
scriptreplay(1) command has been re-written from Perl to C.
Deprecated
----------
The losetup(8) '-s' option (introduced by util-linux-ng-2.13) is deprecated
now. This short form of the option '--show' could be in collision with
Loop-AES losetup implementation where the same option is used for the loop
sizelimit.
Fixed security issues
---------------------
CVE-2008-1926 - audit log injection via login
The problem was originally reported for OpenSSH few months
ago (CVE-2007-3102). The login(1) is affected by the same
bug when built with the option "--with-audit".
Stable maintenance releases between v2.13 and v2.14
---------------------------------------------------
util-linux-ng 2.13.1.1 [22-Apr-2008]
* ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ReleaseNotes
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1.1-ChangeLog
util-linux-ng 2.13.1 [16-Jan-2008]
* ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ReleaseNotes
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.13/v2.13.1-ChangeLog
ChangeLog between v2.13 and v2.14
---------------------------------
For more details see ChangeLog files at:
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/v2.14/
agetty:
- cleanup MAXHOSTNAMELEN [Karel Zak]
- make username-in-uppercase feature optional (off by default.) [Hamish Coleman]
- non-linux support (use pathnames.h) [Karel Zak]
- replace termio with termios interface [Samuel Thibault]
- ungettextize several debugging messages. [Benno Schulenberg]
blockdev:
- add --getsz to blockdev.8 [Karel Zak]
- add missing description about option --report in manpage [Li Zefan]
- fix opened file leaving unclosed [lizf]
- use lib/blkdev.c, fix --report [Karel Zak]
build-sys:
- add --enable-static-programs [Stepan Kasal, Karel Zak]
- add AC_CANONICAL_HOST [Miklos Szeredi]
- add VARSUFFIX to UTIL_CHECK_LIB [Karel Zak]
- add err.h check [Karel Zak]
- add support ionice for Super-H architecture [Karel Zak]
- add v2.14 to NEWS [Karel Zak]
- autogen.sh reports versions of autotools now [Karel Zak]
- build arch(1) during distcheck [Stepan Kasal]
- cleanup "x$foo" usage [Karel Zak]
- cleanup disk-utils/Makefile.am (use $utils_common) [Karel Zak]
- cleanup usage of linux/major.h [Samuel Thibault]
- disable syscall fallbacks for non-linux systems [Karel Zak]
- do not add -luuid to BLKID_LIBS [Stepan Kasal]
- fix missing deps for swapon [Matthias Koenig]
- ignore a bunch of generated files, mostly binaries [James Youngman]
- nls/locale handling in util-linux-ng general [Mike Frysinger]
- non-linux support [Samuel Thibault]
- release++ [Karel Zak]
- remove errs.h [Karel Zak]
- remove files that are no longer delivered from git [LaMont Jones]
- remove hardcoded _GNU_SOURCE [Karel Zak]
- remove unnecessary check-local target from login-utils/ [Karel Zak]
- set AC_PREREQ to 2.60, increment version to 2.14 [Karel Zak]
- simplify code around RDEV_LINKS and SETARCH_LINKS [Stepan Kasal]
- unify method for checking system calls and fallback handling [Mike Frysinger, Stepan Kasal]
- update .gitignore files [Karel Zak]
- use dist_man_MANS instead of man_MANS [Stepan Kasal]
- use ncursesw (wide version) when possibe [Karel Zak, Mike Frysinger]
- use pkg-config to find the libs for static build [Stepan Kasal]
- use portable $(VAR =) instead of gmake-specific $(addsuffix) [Stepan Kasal]
cal:
- add description about option -V to manpage [Li Zefan]
- add support for highlighting an arbitrary date [Pádraig Brady]
- avoid -Wformat warnings [Jim Meyering]
- fix weekday alignment for certain locales [Pádraig Brady]
- replace errs.h with libc err.h [Karel Zak]
- use HAVE_LIB{NCURSES,NCURSESW} instead HAVE_NCURSES [Karel Zak]
cfdisk:
- define portable {DEFAULT,ALTERNATE}_DEVICE [Samuel Thibault]
- display cylinders beyond 1024 [Peter Breitenlohner]
- slightly increase the size of menu buttons [Benno Schulenberg]
- translate partition-type names when they are printed. [Benno Schulenberg]
chfn:
- add pam_end() call and cleanup PAM code [Karel Zak]
- fix compiler warnings in selinux stuff [Karel Zak]
chfn, chsh, login:
- collapsing three similar messages into a single one [Benno Schulenberg]
chsh:
- should use pam_end function to terminate the PAM transaction [Yu Zhiguo, Karel Zak]
column:
- replace errs.h with libc err.h [Karel Zak]
ddate:
- 11th, 12th and 13th of month [Volker Schatz]
docs:
- add a note about minix v3 to TODO file [Karel Zak]
- add info about .bugfix releases and branches [Karel Zak]
- add note about incorrect tag 2.13.1 [Karel Zak]
- add note about losetup --sizelimit to ReleaseNotes [Karel Zak]
- add note about static linking [Karel Zak]
- add v2.14 ReleaseNotes [Karel Zak]
- cleanup DEPRECATED file [Karel Zak]
- cleanup README.devel, add note about coding style and Signed-off-by [Karel Zak]
- fix ChangeLog URL [Pascal Terjan]
- fix stable branche name in README.devel [Karel Zak]
- mark vipw(1) is deprecated in favor of vipw from shadow-utils [Karel Zak]
- refresh TODO list [Karel Zak]
- remove date from ReleasNotes [Karel Zak]
- tweak a few messages for clarity [Benno Schulenberg]
- update AUTHORS file [Karel Zak]
- update TODO file [Karel Zak]
- update v2.14 ReleaseNotes [Karel Zak]
- we already rewrote the scriptreplay script; remove that TODO entry [James Youngman]
elvtune:
- use get_linux_version() [Karel Zak]
fdformat:
- install to /usr/sbin instead to /usr/bin [Karel Zak]
fdisk:
- better fallback for get_random_id() [H. Peter Anvin]
- calculate +size{K,M,G} in 2^N [Karel Zak]
- cleanup BLK* ioctls usage [Karel Zak]
- doesn't recognize the VMware ESX partitions [Karel Zak]
- doing useless ioctl when editing an image [Pascal Terjan]
- fix building for AVR32 and CRIS [Imre Kaloz]
- fix typo [Karel Zak]
- message tweak [Karel Zak]
- non-linux support (MAXPATHLEN) [Karel Zak]
- non-linux support (use standard uintxy_t instead __uxy) [Samuel Thibault]
- use more readable "GPT" name rather than "EFI GPT" [Robert Millan]
- use swab macros from bitops.h [Karel Zak]
flock:
- typo in man page [A. Costa]
fsck.cramfs:
- clean up gcc warnings [Randy Dunlap]
fsck.minix:
- correct the error message given when we can't open the device [James Youngman]
- reset the terminal state if we are killed by a fatal signal [James Youngman]
getopt:
- fix path to examples in getopt.1 [Karel Zak]
- install example scripts as SCRIPTS, not DATA [Peter Breitenlohner]
hwclock:
- add --adjfile=path option [Karel Zak]
- check for ENODEV [David Woodhouse]
- do not create a zero adjfile [Alain Guibert]
- fix --rtc option [Matthias Koenig, Karel Zak]
include:
- <stdint.h> provides everything [Samuel Thibault]
- add bitops.h with swab{16,32,64} macros [Karel Zak]
- add mount paths to pathnames.h [Karel Zak]
- cleanup pathnames.h [Karel Zak]
ionice:
- add a note about permissions to ionice.1 [Karel Zak]
- update man page to reflect IDLE class change in 2.6.25 [Karel Zak]
ipcs:
- add information about POSIX compatibility to ipcs.1 [Karel Zak]
kill:
- man page is missing a description of "kill -0" [Karel Zak]
ldattach:
- add NLS support [Karel Zak]
- new command [Tilman Schmidt]
- use glibc termios [Karel Zak]
lib:
- add blkdev.{c,h} [Stefan Krah, Karel Zak]
- add linux_version.{c,h} [Stefan Krah]
login:
- audit log injection attack via login [Steve Grubb]
- fix a small memory leak and remove unnecessary zeroing [Karel Zak]
- login segfaults on EOF (rh#298461) [Karel Zak]
- replace termio with termios interface [Samuel Thibault]
- rewrite is_local() to remove limits on line length [James Youngman]
login-utils:
- cleanup strlen() and fgets() usage [James Youngman]
losetup:
- add --associated option [Karel Zak]
- add --sizelimit option [Shachar Shemesh]
- canonicalize loopfile name [Karel Zak, Matthias Koenig]
- clean up gcc warnings [Randy Dunlap]
- fix errno usage [Karel Zak]
- fix typo in losetup.8 [Karel Zak]
- mark the option -s as deprecated [Karel Zak]
- remove duplicate xstrdup() and error() [Karel Zak]
- split help message into two smaller parts [Benno Schulenberg]
- support unlimited number of loops [Karel Zak]
- use standard uintxy_t types (struct loop_info64) [Samuel Thibault]
mesg:
- replace errs.h with libc err.h [Karel Zak]
mkfs.cramfs:
- clean up gcc warnings [Randy Dunlap, Karel Zak]
- remove unused header file [lizf]
- switch on localization. [Benno Schulenberg]
mkfs.minix:
- add sectorsize check [Matthias Koenig]
- clean up gcc warnings [Karel Zak]
- clean up gcc warnings [Randy Dunlap]
- device size cleanup [Matthias Koenig]
mkswap:
- BLKGETSIZE cleanup [Karel Zak]
- cleanup kB vs. KiB usage in error messages [Karel Zak]
- fix compiler warnings [Karel Zak]
- linux_version() code consolidation [Karel Zak]
- possible to crash with SELinux relabeling support [KaiGai Kohei]
- set UUID for swap space (add -U option) [Martin Schulze]
- set errno=0 in write_all() [Karel Zak]
- when writing the signature page, handle EINTR returns [Karel Zak]
more:
- cleanup gcc warnings [Randy Dunlap]
- non-linux support [Samuel Thibault]
- replace CBAUD with cfgetispeed() [Samuel Thibault]
- use HAVE_WIDECHAR instead ENABLE_WIDECHAR [Karel Zak]
mount:
- "can't create lock file" message sometimes means failure, sometimes not [Mark McLoughlin]
- "nofail" mount option [Matthias Koenig, Karel Zak]
- -L|-U segfault when label or uuid doesn't exist [Karel Zak]
- add more details to the --version output [Karel Zak]
- add support for sizelimit= mount option (for loop mounts) [Shachar Shemesh]
- allow auto-destruction of loop devices [Bernardo Innocenti]
- chain of symlinks to fstab causes use of pointer after free [Norbert Buchmuller]
- clean up gcc warnings (mount_mntent.c) [Randy Dunlap]
- clean up global variables [Karel Zak]
- cleanup "none" fstype usage [Karel Zak]
- cleanup KERNEL_VERSION, remove my_dev_t.h [Karel Zak]
- cleanup canonicalize() usage [Karel Zak]
- cleanup error() and die() [Karel Zak]
- cleanup usage of _PATH_* [Karel Zak]
- doesn't drop privileges properly when calling helpers [Ludwig Nussel]
- don't call canonicalize(SPEC) for cifs, smbfs and nfs [Karel Zak]
- don't canonicalize LABEL= or UUID= spec [Karel Zak]
- drop the part always true from a while condition [Pascal Terjan]
- fix a small typo in mount.8 [Christophe Blaess]
- fix fd leak [Matthias Koenig]
- fix typo in mount.8 [Karel Zak]
- hint about helper program if device doesn't exist [Karel Zak]
- improve chmod & chown usage and clean up gcc warnings (fstab.c) [Karel Zak]
- improve error message when helper program not present [LaMont Jones]
- prevent loop mounting the same file twice [Karel Zak, Matthias Koenig]
- remount doesn't care about loop= [Karel Zak]
- remove MS_{REPLACE,AFTER,BEFORE,OVER} [Karel Zak]
- remove built-in support for background mounts [Karel Zak]
- remove redundant fflush [Karel Zak]
- remove set_proc_name() [Karel Zak]
- remove useless if-before-my_free, define my_free as a macro [Karel Zak]
- use MNTTYPE_SWAP (from mntent.h) [Karel Zak]
- use atexit() rather than (*at_die)() [Karel Zak]
- use blkdev_get_size() [Karel Zak]
- use canonicalize in getfs_by_devname [Karel Zak]
namei:
- add to identify FIFO (named pipe) and update manpage [Li Zefan]
- cleanup tailing white-spaces [Karel Zak]
- non-linux support (get_current_dir_name() and PATH_MAX) [Karel Zak, Samuel Thibault]
partx:
- fix compiler warnings [Karel Zak]
- use swab macros from bitops.h [Karel Zak]
pg:
- fix segfault on search [Rajeev V. Pillai]
po:
- add eu.po (from translationproject.org) [Mikel Olasagasti]
- add pl.po (from translationproject.org) [Andrzej Krzysztofowicz]
- fix typo in de.po [Karel Zak]
- merge changes [Karel Zak]
- update POTFILES.in [Karel Zak]
- update ca.po (from translationproject.org) [Josep Puigdemont]
- update cs.po (from translationproject.org) [Petr Pisar]
- update da.po (from translationproject.org) [Claus Hindsgaul]
- update de.po (from translationproject.org) [Michael Piefel]
- update es.po (from translationproject.org) [Santiago Vila Doncel]
- update et.po (from translationproject.org) [Meelis Roos]
- update fi.po (from translationproject.org) [Lauri Nurmi]
- update fr.po (from translationproject.org) [Michel Robitaille]
- update hu.po (from translationproject.org) [Gabor Kelemen]
- update id.po (from translationproject.org) [Arif E. Nugroho]
- update it.po (from translationproject.org) [Marco Colombo]
- update ja.po (from translationproject.org) [Daisuke Yamashita]
- update nl.po (from translationproject.org) [Benno Schulenberg]
- update po files [Karel Zak]
- update pt_BR.po (from translationproject.org) [Rodrigo Stulzer Lopes]
- update ru.po (from translationproject.org) [Pavel Maryanov]
- update sl.po (from translationproject.org) [Simon Mihevc]
- update sv.po (from translationproject.org) [Daniel Nylander]
- update tr.po (from translationproject.org) [Nilgün Belma Bugüner]
- update uk.po (from translationproject.org) [Maxim V. Dziumanenko]
- update vi.po (from translationproject.org) [Clytie Siddall]
rename:
- add description about option -V to manpage [Li Zefan]
- remove useless variable [Li Zefan]
renice:
- detect errors in arguments, add -v, -h and long options [LaMont Jones, Karel Zak]
rev:
- use warn() in errs.h [Li Zefan]
rtcwake:
- fix UTC time usage [David Brownell]
- fix the default mode to "standby" [Paulius Zaleckas]
- fix typo [Karel Zak]
- fix typo SATE -> STATE [Mike Frysinger]
- fix verbose message [Karel Zak]
- include libgen.h for basename prototype [Mike Frysinger]
- misc cleanups [David Brownell]
script:
- cleanup gcc warnings [Randy Dunlap]
- cleanup includes [Samuel Thibault]
- dies on SIGWINCH [Karel Zak]
- read returns a size_t [James Youngman]
scriptreplay:
- gettextize a forgotten messages [Karel Zak]
- rewrite in C [Karel Zak, James Youngman]
setarch:
- add fallback for linux/personality [Karel Zak]
- add long options to setarch and update manpage [Karel Zak, Li Zefan]
- add missing alpha subarchs [Oliver Falk]
- adding groff symlinks to setarch manual page [Arkadiusz Miskiewicz]
- fix compiler warning [LaMont Jones]
- generate groff links in a better way [Karel Zak]
- provide backwards compatibility [Dmitry V. Levin]
- tweak the help text, and gettextize a forgotten message [Benno Schulenberg]
setterm:
- add -blan [force|poke] options for TIOCL_{BLANKED,BLANK}SCREEN [Samuel Thibault, Karel Zak]
- dump by TIOCLINUX is deprecated since linux 1.1.92. [Karel Zak]
- opened file leaving unclosed [Karel Zak, lizf]
- remove unnecessaty ifndef TCGETS [Samuel Thibault]
sfdisk:
- allow partitioning drives of over 2^31 sectors. [Kunihiko IMAI]
- cleanup 83 gcc warnings [Randy Dunlap]
- opened files leaving unclosed [Karel Zak, Li Zefan]
- remove unnecessary linux/unistd.h [Samuel Thibault]
- use get_linux_version() [Karel Zak]
shutdown:
- use _PATH_MOUNTED instead of _PATH_MTAB [Stepan Kasal]
swapon:
- Reinitialize software suspend areas to avoid future corruption. [Kees Cook, Karel Zak]
- add sundries.h [Karel Zak]
- clean up gcc warnings [Randy Dunlap]
- cleanup usage output [Karel Zak]
- cleanup usage() [Karel Zak]
- fix swsuspend detection [Karel Zak]
- fix typo in usage() [Karel Zak]
- readjust the usage summaries [Benno Schulenberg]
- remove unnecessary myrealpath() call [Karel Zak]
sys-utils:
- correct setarch.8 manpage link creation [Frédéric Bothamy]
tailf:
- add option -n to specifying output lines [Li Zefan]
- clean up gcc warnings & fix use of errno [Karel Zak]
- inotify based reimplementation [Karel Zak]
- non-linux support [Samuel Thibault]
- opened file leaving unclosed [lizf]
- replace errs.h with libc err.h [Karel Zak]
tests:
- add "sort" to cramfs test [Karel Zak]
- add test for include/pathnames.h [Karel Zak]
- add ts-mount-noncanonical [Karel Zak]
- exactly define a time format in ls -l output [Karel Zak]
- fix blkid cache usage [Karel Zak]
- move test_bkdev to lib/ [Karel Zak]
- redirect libblkid cache to BLKID_FILE [Karel Zak]
- rename test_sysinfo, remove tailing white-spaces [Karel Zak]
- use losetup -s [Karel Zak]
umount:
- add hint about lsof & fuser [Karel Zak]
- don't print duplicate error messages [Karel Zak]
- use atexit() rather than (*at_die)() [Karel Zak]
wall:
- cleanup MAXHOSTNAMELEN [Karel Zak]