forked from pool/util-linux
Accepting request 33360 from Base:System
Copy from Base:System/util-linux based on submit request 33360 from user msmeissn OBS-URL: https://build.opensuse.org/request/show/33360 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/util-linux?expand=0&rev=86
This commit is contained in:
commit
90cba39f17
@ -1,4 +1,4 @@
|
|||||||
From a062df268df66641ed94d5c0e968e92c67b585e4 Mon Sep 17 00:00:00 2001
|
From 2d5b9e07d5b8dd698d83a6702906eefc834a9af5 Mon Sep 17 00:00:00 2001
|
||||||
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||||
Date: Thu, 29 Nov 2007 17:46:36 +0100
|
Date: Thu, 29 Nov 2007 17:46:36 +0100
|
||||||
Subject: [PATCH] losetup: support password hashing and specifying the key length
|
Subject: [PATCH] losetup: support password hashing and specifying the key length
|
||||||
@ -22,23 +22,26 @@ sha512.c is from loop-AES.
|
|||||||
|
|
||||||
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
|
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
|
||||||
---
|
---
|
||||||
|
mount/Makefile.am | 3 +-
|
||||||
Makefile.am | 3
|
mount/lomount.c | 174 +++++++++++++++---
|
||||||
lomount.c | 174 +++++++++++++++++--
|
mount/lomount.h | 5 +-
|
||||||
lomount.h | 5
|
mount/losetup.8 | 11 +
|
||||||
losetup.8 | 11 +
|
mount/mount.8 | 13 ++
|
||||||
mount.8 | 13 +
|
mount/mount.c | 21 ++-
|
||||||
mount.c | 21 ++
|
mount/rmd160.c | 532 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
rmd160.c | 532 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
mount/rmd160.h | 11 +
|
||||||
rmd160.h | 11 +
|
mount/sha512.c | 432 +++++++++++++++++++++++++++++++++++++++++++
|
||||||
sha512.c | 432 ++++++++++++++++++++++++++++++++++++++++++++++++
|
mount/sha512.h | 45 +++++
|
||||||
sha512.h | 45 +++++
|
|
||||||
10 files changed, 1219 insertions(+), 28 deletions(-)
|
10 files changed, 1219 insertions(+), 28 deletions(-)
|
||||||
|
create mode 100644 mount/rmd160.c
|
||||||
|
create mode 100644 mount/rmd160.h
|
||||||
|
create mode 100644 mount/sha512.c
|
||||||
|
create mode 100644 mount/sha512.h
|
||||||
|
|
||||||
Index: util-linux-ng-2.16/mount/Makefile.am
|
diff --git a/mount/Makefile.am b/mount/Makefile.am
|
||||||
===================================================================
|
index c5f58aa..43ff01a 100644
|
||||||
--- util-linux-ng-2.16.orig/mount/Makefile.am
|
--- a/mount/Makefile.am
|
||||||
+++ util-linux-ng-2.16/mount/Makefile.am
|
+++ b/mount/Makefile.am
|
||||||
@@ -7,7 +7,8 @@ sbin_PROGRAMS = losetup swapon
|
@@ -7,7 +7,8 @@ sbin_PROGRAMS = losetup swapon
|
||||||
dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8
|
dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8
|
||||||
|
|
||||||
@ -49,10 +52,10 @@ Index: util-linux-ng-2.16/mount/Makefile.am
|
|||||||
|
|
||||||
# generic header for mount and umount
|
# generic header for mount and umount
|
||||||
hdrs_mount = fstab.h mount_mntent.h mount_constants.h \
|
hdrs_mount = fstab.h mount_mntent.h mount_constants.h \
|
||||||
Index: util-linux-ng-2.16/mount/lomount.c
|
diff --git a/mount/lomount.c b/mount/lomount.c
|
||||||
===================================================================
|
index 67712c6..a0b951c 100644
|
||||||
--- util-linux-ng-2.16.orig/mount/lomount.c
|
--- a/mount/lomount.c
|
||||||
+++ util-linux-ng-2.16/mount/lomount.c
|
+++ b/mount/lomount.c
|
||||||
@@ -23,6 +23,12 @@
|
@@ -23,6 +23,12 @@
|
||||||
#include "sundries.h"
|
#include "sundries.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
@ -64,9 +67,9 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
+#define MIN(a,b) ((a<b)?(a):(b))
|
+#define MIN(a,b) ((a<b)?(a):(b))
|
||||||
+#endif
|
+#endif
|
||||||
|
|
||||||
#define SIZE(a) (sizeof(a)/sizeof(a[0]))
|
#ifdef LOOP_SET_FD
|
||||||
|
|
||||||
@@ -392,12 +398,22 @@ show_loop_fd(int fd, char *device) {
|
@@ -390,12 +396,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]) {
|
||||||
@ -92,7 +95,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
return 0;
|
return 0;
|
||||||
@@ -646,7 +662,7 @@ xgetpass(int pfd, const char *prompt) {
|
@@ -644,7 +660,7 @@ xgetpass(int pfd, const char *prompt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pass == NULL)
|
if (pass == NULL)
|
||||||
@ -101,7 +104,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
|
|
||||||
pass[i] = 0;
|
pass[i] = 0;
|
||||||
return pass;
|
return pass;
|
||||||
@@ -660,6 +676,24 @@ digits_only(const char *s) {
|
@@ -658,6 +674,24 @@ digits_only(const char *s) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +129,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
/*
|
/*
|
||||||
* return codes:
|
* return codes:
|
||||||
* 0 - success
|
* 0 - success
|
||||||
@@ -668,10 +702,11 @@ digits_only(const char *s) {
|
@@ -666,10 +700,11 @@ digits_only(const char *s) {
|
||||||
*/
|
*/
|
||||||
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,
|
||||||
@ -140,7 +143,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
char *filename;
|
char *filename;
|
||||||
|
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
@@ -709,13 +744,37 @@ set_loop(const char *device, const char
|
@@ -707,13 +742,37 @@ set_loop(const char *device, const char *file, unsigned long long offset,
|
||||||
filename = (char *) file;
|
filename = (char *) file;
|
||||||
xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE);
|
xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE);
|
||||||
|
|
||||||
@ -180,7 +183,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -736,20 +795,70 @@ set_loop(const char *device, const char
|
@@ -734,20 +793,70 @@ set_loop(const char *device, const char *file, unsigned long long offset,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -263,7 +266,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
|
if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
|
||||||
@@ -897,7 +1006,13 @@ usage(void) {
|
@@ -895,7 +1004,13 @@ usage(void) {
|
||||||
|
|
||||||
fprintf(stderr, _("\nOptions:\n"
|
fprintf(stderr, _("\nOptions:\n"
|
||||||
" -e | --encryption <type> enable data encryption with specified <name/num>\n"
|
" -e | --encryption <type> enable data encryption with specified <name/num>\n"
|
||||||
@ -277,7 +280,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
" -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"
|
" --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"
|
||||||
@@ -910,11 +1025,14 @@ usage(void) {
|
@@ -908,11 +1023,14 @@ usage(void) {
|
||||||
int
|
int
|
||||||
main(int argc, char **argv) {
|
main(int argc, char **argv) {
|
||||||
char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc;
|
char *p, *offset, *sizelimit, *encryption, *passfd, *device, *file, *assoc;
|
||||||
@ -292,7 +295,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
unsigned long long off, slimit;
|
unsigned long long off, slimit;
|
||||||
struct option longopts[] = {
|
struct option longopts[] = {
|
||||||
{ "all", 0, 0, 'a' },
|
{ "all", 0, 0, 'a' },
|
||||||
@@ -923,6 +1041,8 @@ main(int argc, char **argv) {
|
@@ -921,6 +1039,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' },
|
||||||
@ -301,7 +304,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
{ "associated", 1, 0, 'j' },
|
{ "associated", 1, 0, 'j' },
|
||||||
{ "offset", 1, 0, 'o' },
|
{ "offset", 1, 0, 'o' },
|
||||||
{ "sizelimit", 1, 0, 128 },
|
{ "sizelimit", 1, 0, 128 },
|
||||||
@@ -941,12 +1061,13 @@ main(int argc, char **argv) {
|
@@ -939,12 +1059,13 @@ main(int argc, char **argv) {
|
||||||
off = 0;
|
off = 0;
|
||||||
slimit = 0;
|
slimit = 0;
|
||||||
assoc = offset = sizelimit = encryption = passfd = NULL;
|
assoc = offset = sizelimit = encryption = passfd = NULL;
|
||||||
@ -316,7 +319,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
longopts, NULL)) != -1) {
|
longopts, NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'a':
|
case 'a':
|
||||||
@@ -971,6 +1092,12 @@ main(int argc, char **argv) {
|
@@ -969,6 +1090,12 @@ main(int argc, char **argv) {
|
||||||
case 'j':
|
case 'j':
|
||||||
assoc = optarg;
|
assoc = optarg;
|
||||||
break;
|
break;
|
||||||
@ -329,7 +332,7 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
case 'o':
|
case 'o':
|
||||||
offset = optarg;
|
offset = optarg;
|
||||||
break;
|
break;
|
||||||
@@ -1056,8 +1183,11 @@ main(int argc, char **argv) {
|
@@ -1054,8 +1181,11 @@ main(int argc, char **argv) {
|
||||||
else {
|
else {
|
||||||
if (passfd && sscanf(passfd, "%d", &pfd) != 1)
|
if (passfd && sscanf(passfd, "%d", &pfd) != 1)
|
||||||
usage();
|
usage();
|
||||||
@ -342,10 +345,10 @@ Index: util-linux-ng-2.16/mount/lomount.c
|
|||||||
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.16/mount/lomount.h
|
diff --git a/mount/lomount.h b/mount/lomount.h
|
||||||
===================================================================
|
index 59108d4..07ab875 100644
|
||||||
--- util-linux-ng-2.16.orig/mount/lomount.h
|
--- a/mount/lomount.h
|
||||||
+++ util-linux-ng-2.16/mount/lomount.h
|
+++ b/mount/lomount.h
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
-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, unsigned long long,
|
||||||
- const char *, int, int *);
|
- const char *, int, int *);
|
||||||
@ -355,11 +358,11 @@ Index: util-linux-ng-2.16/mount/lomount.h
|
|||||||
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 int is_loop_autoclear(const char *device);
|
extern int is_loop_autoclear(const char *device);
|
||||||
Index: util-linux-ng-2.16/mount/losetup.8
|
diff --git a/mount/losetup.8 b/mount/losetup.8
|
||||||
===================================================================
|
index 8ccab6c..8566898 100644
|
||||||
--- util-linux-ng-2.16.orig/mount/losetup.8
|
--- a/mount/losetup.8
|
||||||
+++ util-linux-ng-2.16/mount/losetup.8
|
+++ b/mount/losetup.8
|
||||||
@@ -94,9 +94,18 @@ find the first unused loop device. If a
|
@@ -92,9 +92,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
|
||||||
@ -378,7 +381,7 @@ Index: util-linux-ng-2.16/mount/losetup.8
|
|||||||
.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
|
||||||
@@ -167,6 +176,8 @@ the command
|
@@ -165,6 +174,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.
|
||||||
@ -386,12 +389,12 @@ Index: util-linux-ng-2.16/mount/losetup.8
|
|||||||
+allowed to use them.
|
+allowed to use them.
|
||||||
|
|
||||||
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).
|
.BR cryptsetup (8).
|
||||||
Index: util-linux-ng-2.16/mount/mount.8
|
diff --git a/mount/mount.8 b/mount/mount.8
|
||||||
===================================================================
|
index 2888b46..582898a 100644
|
||||||
--- util-linux-ng-2.16.orig/mount/mount.8
|
--- a/mount/mount.8
|
||||||
+++ util-linux-ng-2.16/mount/mount.8
|
+++ b/mount/mount.8
|
||||||
@@ -782,6 +782,15 @@ Every time the inode is modified, the i_
|
@@ -826,6 +826,15 @@ Every time the inode is modified, the i_version field will be incremented.
|
||||||
.B noiversion
|
.B noiversion
|
||||||
Do not increment the i_version inode field.
|
Do not increment the i_version inode field.
|
||||||
.TP
|
.TP
|
||||||
@ -407,7 +410,7 @@ Index: util-linux-ng-2.16/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).
|
||||||
@@ -2390,6 +2399,10 @@ that are really options to
|
@@ -2525,6 +2534,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.)
|
||||||
@ -418,10 +421,10 @@ Index: util-linux-ng-2.16/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.16/mount/mount.c
|
diff --git a/mount/mount.c b/mount/mount.c
|
||||||
===================================================================
|
index efe1165..09006f7 100644
|
||||||
--- util-linux-ng-2.16.orig/mount/mount.c
|
--- a/mount/mount.c
|
||||||
+++ util-linux-ng-2.16/mount/mount.c
|
+++ b/mount/mount.c
|
||||||
@@ -95,6 +95,9 @@ struct mountargs {
|
@@ -95,6 +95,9 @@ struct mountargs {
|
||||||
void *data;
|
void *data;
|
||||||
};
|
};
|
||||||
@ -438,9 +441,9 @@ Index: util-linux-ng-2.16/mount/mount.c
|
|||||||
*opt_encryption, *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 is_readonly(const char *node);
|
||||||
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,
|
@@ -216,6 +220,8 @@ static struct string_opt_map {
|
||||||
@@ -215,6 +219,8 @@ static struct string_opt_map {
|
|
||||||
{ "offset=", 0, &opt_offset },
|
{ "offset=", 0, &opt_offset },
|
||||||
{ "sizelimit=", 0, &opt_sizelimit },
|
{ "sizelimit=", 0, &opt_sizelimit },
|
||||||
{ "encryption=", 0, &opt_encryption },
|
{ "encryption=", 0, &opt_encryption },
|
||||||
@ -449,7 +452,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
|||||||
{ "speed=", 0, &opt_speed },
|
{ "speed=", 0, &opt_speed },
|
||||||
{ "comment=", 1, &opt_comment },
|
{ "comment=", 1, &opt_comment },
|
||||||
{ "uhelper=", 0, &opt_uhelper },
|
{ "uhelper=", 0, &opt_uhelper },
|
||||||
@@ -1072,7 +1078,8 @@ loop_check(const char **spec, const char
|
@@ -1081,7 +1087,8 @@ loop_check(const char **spec, const char **type, int *flags,
|
||||||
*type = opt_vfstype;
|
*type = opt_vfstype;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,7 +462,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
|||||||
*loopfile = *spec;
|
*loopfile = *spec;
|
||||||
|
|
||||||
if (*loop) {
|
if (*loop) {
|
||||||
@@ -1104,7 +1111,7 @@ loop_check(const char **spec, const char
|
@@ -1113,7 +1120,7 @@ loop_check(const char **spec, const char **type, int *flags,
|
||||||
printf(_("mount: going to use the loop device %s\n"), *loopdev);
|
printf(_("mount: going to use the loop device %s\n"), *loopdev);
|
||||||
|
|
||||||
if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit,
|
if ((res = set_loop(*loopdev, *loopfile, offset, sizelimit,
|
||||||
@ -468,7 +471,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
|||||||
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 */
|
||||||
@@ -1865,6 +1872,7 @@ static struct option longopts[] = {
|
@@ -1920,6 +1927,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' },
|
||||||
@ -476,7 +479,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
|||||||
{ "types", 1, 0, 't' },
|
{ "types", 1, 0, 't' },
|
||||||
{ "bind", 0, 0, 'B' },
|
{ "bind", 0, 0, 'B' },
|
||||||
{ "move", 0, 0, 'M' },
|
{ "move", 0, 0, 'M' },
|
||||||
@@ -2026,6 +2034,7 @@ main(int argc, char *argv[]) {
|
@@ -2082,6 +2090,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;
|
||||||
@ -484,7 +487,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
|||||||
char *uuid = NULL;
|
char *uuid = NULL;
|
||||||
char *types = NULL;
|
char *types = NULL;
|
||||||
char *p;
|
char *p;
|
||||||
@@ -2056,7 +2065,7 @@ main(int argc, char *argv[]) {
|
@@ -2112,7 +2121,7 @@ main(int argc, char *argv[]) {
|
||||||
initproctitle(argc, argv);
|
initproctitle(argc, argv);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -493,7 +496,7 @@ Index: util-linux-ng-2.16/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 */
|
||||||
@@ -2077,6 +2086,9 @@ main(int argc, char *argv[]) {
|
@@ -2133,6 +2142,9 @@ main(int argc, char *argv[]) {
|
||||||
case 'i':
|
case 'i':
|
||||||
external_allowed = 0;
|
external_allowed = 0;
|
||||||
break;
|
break;
|
||||||
@ -503,7 +506,7 @@ Index: util-linux-ng-2.16/mount/mount.c
|
|||||||
case 'l':
|
case 'l':
|
||||||
list_with_volumelabel = 1;
|
list_with_volumelabel = 1;
|
||||||
break;
|
break;
|
||||||
@@ -2215,6 +2227,9 @@ main(int argc, char *argv[]) {
|
@@ -2280,6 +2292,9 @@ main(int argc, char *argv[]) {
|
||||||
|
|
||||||
atexit(unlock_mtab);
|
atexit(unlock_mtab);
|
||||||
|
|
||||||
@ -513,10 +516,11 @@ Index: util-linux-ng-2.16/mount/mount.c
|
|||||||
switch (argc+specseen) {
|
switch (argc+specseen) {
|
||||||
case 0:
|
case 0:
|
||||||
/* mount -a */
|
/* mount -a */
|
||||||
Index: util-linux-ng-2.16/mount/rmd160.c
|
diff --git a/mount/rmd160.c b/mount/rmd160.c
|
||||||
===================================================================
|
new file mode 100644
|
||||||
|
index 0000000..3430954
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ util-linux-ng-2.16/mount/rmd160.c
|
+++ b/mount/rmd160.c
|
||||||
@@ -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.
|
||||||
@ -1050,10 +1054,11 @@ Index: util-linux-ng-2.16/mount/rmd160.c
|
|||||||
+ rmd160_final( &hd );
|
+ rmd160_final( &hd );
|
||||||
+ memcpy( outbuf, hd.buf, 20 );
|
+ memcpy( outbuf, hd.buf, 20 );
|
||||||
+}
|
+}
|
||||||
Index: util-linux-ng-2.16/mount/rmd160.h
|
diff --git a/mount/rmd160.h b/mount/rmd160.h
|
||||||
===================================================================
|
new file mode 100644
|
||||||
|
index 0000000..4b2c61d
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ util-linux-ng-2.16/mount/rmd160.h
|
+++ b/mount/rmd160.h
|
||||||
@@ -0,0 +1,11 @@
|
@@ -0,0 +1,11 @@
|
||||||
+#ifndef RMD160_H
|
+#ifndef RMD160_H
|
||||||
+#define RMD160_H
|
+#define RMD160_H
|
||||||
@ -1066,10 +1071,11 @@ Index: util-linux-ng-2.16/mount/rmd160.h
|
|||||||
+#endif /*RMD160_H*/
|
+#endif /*RMD160_H*/
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
Index: util-linux-ng-2.16/mount/sha512.c
|
diff --git a/mount/sha512.c b/mount/sha512.c
|
||||||
===================================================================
|
new file mode 100644
|
||||||
|
index 0000000..f717c8b
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ util-linux-ng-2.16/mount/sha512.c
|
+++ b/mount/sha512.c
|
||||||
@@ -0,0 +1,432 @@
|
@@ -0,0 +1,432 @@
|
||||||
+/*
|
+/*
|
||||||
+ * sha512.c
|
+ * sha512.c
|
||||||
@ -1503,10 +1509,11 @@ Index: util-linux-ng-2.16/mount/sha512.c
|
|||||||
+ memset(&ctx, 0, sizeof(ctx));
|
+ memset(&ctx, 0, sizeof(ctx));
|
||||||
+}
|
+}
|
||||||
+#endif
|
+#endif
|
||||||
Index: util-linux-ng-2.16/mount/sha512.h
|
diff --git a/mount/sha512.h b/mount/sha512.h
|
||||||
===================================================================
|
new file mode 100644
|
||||||
|
index 0000000..4b57c01
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ util-linux-ng-2.16/mount/sha512.h
|
+++ b/mount/sha512.h
|
||||||
@@ -0,0 +1,45 @@
|
@@ -0,0 +1,45 @@
|
||||||
+/*
|
+/*
|
||||||
+ * sha512.h
|
+ * sha512.h
|
||||||
@ -1553,3 +1560,6 @@ Index: util-linux-ng-2.16/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);
|
||||||
|
--
|
||||||
|
1.6.4.2
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:a6365fcb2b34439faa52164e1a018086c2b6818f8a189c487c79e09dc3c62722
|
|
||||||
size 3470040
|
|
3
util-linux-ng-2.17.1.tar.bz2
Normal file
3
util-linux-ng-2.17.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e9c019ea3782dc20b82d27c1240009f9e194304a77ac36f51629a487a5181390
|
||||||
|
size 3801027
|
@ -1,24 +0,0 @@
|
|||||||
commit fdf08588af55d07a99b411708a08f4ebe6819706
|
|
||||||
Author: Theodore Ts'o <tytso@mit.edu>
|
|
||||||
Date: Sat Oct 3 12:50:06 2009 -0400
|
|
||||||
|
|
||||||
lib: fix file descriptor leak in is_mounted()
|
|
||||||
|
|
||||||
Remove an extraneous fopen() that leaks memory and a file descriptor.
|
|
||||||
|
|
||||||
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
|
|
||||||
|
|
||||||
diff --git a/lib/ismounted.c b/lib/ismounted.c
|
|
||||||
index 28ae325..fbe91f9 100644
|
|
||||||
--- a/lib/ismounted.c
|
|
||||||
+++ b/lib/ismounted.c
|
|
||||||
@@ -70,9 +70,6 @@ static int check_mntent_file(const char *mtab_file, const char *file,
|
|
||||||
char buf[1024], *device = 0, *mnt_dir = 0, *cp;
|
|
||||||
|
|
||||||
*mount_flags = 0;
|
|
||||||
- if ((f = fopen(mtab_file, "r")) == NULL)
|
|
||||||
- return errno;
|
|
||||||
-
|
|
||||||
if ((f = setmntent (mtab_file, "r")) == NULL)
|
|
||||||
return errno;
|
|
||||||
if (stat(file, &st_buf) == 0) {
|
|
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 23 12:46:07 UTC 2010 - lnussel@suse.de
|
||||||
|
|
||||||
|
- new version 2.17.1
|
||||||
|
- new commands: wipefs, unshare, fallocate
|
||||||
|
- fdisk: DOS-compatible mode marked deprecated
|
||||||
|
- honor nofail option in fsck
|
||||||
|
- libblkid overhaul
|
||||||
|
- lots of bug fixes
|
||||||
|
- fix self-obsoletes
|
||||||
|
- compile suid programs using -fpie
|
||||||
|
- drop -DCONFIG_SMP for s390 as it doesn't seem to be used anyways
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de
|
Sun Dec 13 15:19:16 CET 2009 - jengelh@medozas.de
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package util-linux (Version 2.16)
|
# spec file for package util-linux (Version 2.17.1)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -21,18 +21,16 @@ Name: util-linux
|
|||||||
BuildRequires: audit-devel gettext-devel pkg-config
|
BuildRequires: audit-devel gettext-devel pkg-config
|
||||||
BuildRequires: libselinux-devel libsepol-devel ncurses-devel pam-devel readline-devel zlib-devel
|
BuildRequires: libselinux-devel libsepol-devel ncurses-devel pam-devel readline-devel zlib-devel
|
||||||
Url: http://userweb.kernel.org/~kzak/util-linux-ng/
|
Url: http://userweb.kernel.org/~kzak/util-linux-ng/
|
||||||
Provides: util rawio raw base schedutils uuid-runtime
|
|
||||||
Obsoletes: util rawio raw base schedutils uuid-runtime
|
|
||||||
Supplements: filesystem(minix)
|
Supplements: filesystem(minix)
|
||||||
PreReq: %install_info_prereq permissions
|
PreReq: %install_info_prereq permissions
|
||||||
License: BSD3c(or similar) ; GPLv2+
|
License: BSD3c(or similar) ; GPLv2+
|
||||||
Group: System/Base
|
Group: System/Base
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 2.16
|
Version: 2.17.1
|
||||||
Release: 9
|
Release: 1
|
||||||
Requires: %name-lang = %{version}
|
Recommends: %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-ng/v%{version}/%name-ng-%{version}.tar.bz2
|
||||||
Source1: util-linux-rpmlintrc
|
Source1: util-linux-rpmlintrc
|
||||||
Source2: nologin.c
|
Source2: nologin.c
|
||||||
Source3: nologin.8
|
Source3: nologin.8
|
||||||
@ -43,33 +41,39 @@ Source7: baselibs.conf
|
|||||||
%define time_ver 1.7
|
%define time_ver 1.7
|
||||||
%define which_ver 2.19
|
%define which_ver 2.19
|
||||||
%define adjtimex_ver 1.20
|
%define adjtimex_ver 1.20
|
||||||
|
# XXX: post upstream?
|
||||||
Source9: adjtimex-%{adjtimex_ver}.tar.bz2
|
Source9: adjtimex-%{adjtimex_ver}.tar.bz2
|
||||||
|
# XXX: DROP?
|
||||||
Source10: freeramdisk.tar.bz2
|
Source10: freeramdisk.tar.bz2
|
||||||
|
# XXX: post upstream?
|
||||||
Source11: klogconsole.tar.bz2
|
Source11: klogconsole.tar.bz2
|
||||||
|
# TODO: split to separate package
|
||||||
Source12: which-%{which_ver}.tar.bz2
|
Source12: which-%{which_ver}.tar.bz2
|
||||||
|
# TODO: split to separate package
|
||||||
Source13: time-%{time_ver}.tar.bz2
|
Source13: time-%{time_ver}.tar.bz2
|
||||||
Source15: cryptoloop.txt
|
# XXX: needed?
|
||||||
Source22: setctsid.c
|
Source22: setctsid.c
|
||||||
Source23: setctsid.8
|
Source23: setctsid.8
|
||||||
Source26: README.raw
|
# XXX: ppc specific, still needed?
|
||||||
Source28: mkzimage_cmdline.8
|
Source28: mkzimage_cmdline.8
|
||||||
Source29: mkzimage_cmdline.c
|
Source29: mkzimage_cmdline.c
|
||||||
Source30: README.largedisk
|
|
||||||
Source31: addnote.c
|
Source31: addnote.c
|
||||||
|
#
|
||||||
|
Source26: README.raw
|
||||||
|
Source30: README.largedisk
|
||||||
Source50: uuidd.rc
|
Source50: uuidd.rc
|
||||||
Source51: blkid.conf
|
Source51: blkid.conf
|
||||||
##
|
##
|
||||||
## util-linux patches
|
## util-linux patches
|
||||||
##
|
##
|
||||||
# add hostid
|
# add hostid. FIXME: use the one from coreutils
|
||||||
Patch0: util-linux-2.12-misc_utils_hostid.patch
|
Patch0: util-linux-2.12-misc_utils_hostid.patch
|
||||||
# 241372 - remove legacy warnings from fdisk
|
# 241372 - remove legacy warnings from fdisk
|
||||||
Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch
|
Patch1: util-linux-2.12r-fdisk_remove_bogus_warnings.patch
|
||||||
# bnc#447036
|
# bnc#447036
|
||||||
Patch2: util-linux-2.14.1-mount_skip_sync.patch
|
Patch2: util-linux-2.14.1-mount_skip_sync.patch
|
||||||
# crypto patch
|
# crypto patch
|
||||||
Patch3: util-linux-mount_losetup_crypto.patch
|
Patch3: util-linux-2.17.1-mount_losetup_crypto.patch
|
||||||
Patch4: util-linux-ng-bnc503008.patch
|
|
||||||
##
|
##
|
||||||
## adjtimex
|
## adjtimex
|
||||||
##
|
##
|
||||||
@ -89,6 +93,9 @@ Patch60: time-1.7.dif
|
|||||||
Patch70: which-lib64.patch
|
Patch70: which-lib64.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
PreReq: %insserv_prereq %fillup_prereq /bin/sed
|
PreReq: %insserv_prereq %fillup_prereq /bin/sed
|
||||||
|
#
|
||||||
|
Provides: util = %{version}-%{release} rawio = %{version}-%{release} raw = %{version}-%{release} base = %{version}-%{release} schedutils = %{version}-%{release} uuid-runtime = %{version}-%{release}
|
||||||
|
Obsoletes: util < %{version}-%{release} rawio < %{version}-%{release} raw < %{version}-%{release} base < %{version}-%{release} schedutils < %{version}-%{release} uuid-runtime < %{version}-%{release}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This package contains a large variety of low-level system utilities
|
This package contains a large variety of low-level system utilities
|
||||||
@ -154,7 +161,6 @@ unique IDs (UUIDs).
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
|
||||||
#
|
#
|
||||||
cd adjtimex-*
|
cd adjtimex-*
|
||||||
%patch50 -p1
|
%patch50 -p1
|
||||||
@ -162,7 +168,7 @@ cd -
|
|||||||
# setctsid
|
# setctsid
|
||||||
cp %{S:22} %{S:23} .
|
cp %{S:22} %{S:23} .
|
||||||
# nologin
|
# nologin
|
||||||
cp %{S:2} %{S:3} %{S:15} %{S:26} %{S:30} .
|
cp %{S:2} %{S:3} %{S:26} %{S:30} .
|
||||||
cd ../klogconsole
|
cd ../klogconsole
|
||||||
%patch55 -p1 -b .quiet
|
%patch55 -p1 -b .quiet
|
||||||
%patch56 -p1
|
%patch56 -p1
|
||||||
@ -216,15 +222,10 @@ make %{?jobs:-j%jobs} setctsid CFLAGS="$RPM_OPT_FLAGS"
|
|||||||
#
|
#
|
||||||
# util-linux itself
|
# util-linux itself
|
||||||
#
|
#
|
||||||
%ifarch s390 s390x
|
|
||||||
CFLAGS=-DCONFIG_SMP
|
|
||||||
%endif
|
|
||||||
# architecture dependent builds
|
|
||||||
BUILD_ENABLE=
|
|
||||||
%ifarch %ix86 x86_64
|
|
||||||
BUILD_ENABLE="--enable-rdev"
|
|
||||||
%endif
|
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
|
export SUID_CFLAGS="-fpie"
|
||||||
|
export SUID_LDFLAGS="-pie"
|
||||||
|
CFLAGS="$RPM_OPT_FLAGS" \
|
||||||
./configure \
|
./configure \
|
||||||
--mandir=%{_mandir} \
|
--mandir=%{_mandir} \
|
||||||
--datadir=%{_datadir} \
|
--datadir=%{_datadir} \
|
||||||
@ -240,9 +241,12 @@ autoreconf -fi
|
|||||||
--enable-write \
|
--enable-write \
|
||||||
--disable-use-tty-group \
|
--disable-use-tty-group \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
$BUILD_ENABLE \
|
%ifarch %ix86 x86_64
|
||||||
CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
|
--enable-rdev \
|
||||||
|
%endif
|
||||||
|
#
|
||||||
make %{?jobs:-j%jobs}
|
make %{?jobs:-j%jobs}
|
||||||
|
#
|
||||||
gcc $RPM_OPT_FLAGS -o nologin nologin.c
|
gcc $RPM_OPT_FLAGS -o nologin nologin.c
|
||||||
gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29}
|
gcc $RPM_OPT_FLAGS -o mkzimage_cmdline %{S:29}
|
||||||
gcc $RPM_OPT_FLAGS -o chrp-addnote %{SOURCE31}
|
gcc $RPM_OPT_FLAGS -o chrp-addnote %{SOURCE31}
|
||||||
@ -361,7 +365,8 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
|
|
||||||
%post
|
%post
|
||||||
%{fillup_and_insserv raw}
|
%{fillup_and_insserv raw}
|
||||||
%install_info --entry="* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz
|
txt='* freeramdisk: (freeramdisk). tell kernel to free allocated memory for ramdisk'
|
||||||
|
%install_info --entry="$txt" --info-dir=%{_infodir} %{_infodir}/freeramdisk.info.gz
|
||||||
%install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz
|
%install_info --info-dir=%{_infodir} %{_infodir}/ipc.info.gz
|
||||||
%install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz
|
%install_info --entry="* time: (time). summarizing used system resources" --info-dir=%{_infodir} %{_infodir}/time.info.gz
|
||||||
%install_info --info-dir=%{_infodir} %{_infodir}/which.info.gz
|
%install_info --info-dir=%{_infodir} %{_infodir}/which.info.gz
|
||||||
@ -455,6 +460,7 @@ fi
|
|||||||
/sbin/findfs
|
/sbin/findfs
|
||||||
/sbin/fsck
|
/sbin/fsck
|
||||||
/sbin/switch_root
|
/sbin/switch_root
|
||||||
|
/sbin/wipefs
|
||||||
/usr/bin/ipcmk
|
/usr/bin/ipcmk
|
||||||
/bin/logger
|
/bin/logger
|
||||||
/usr/bin/cal
|
/usr/bin/cal
|
||||||
@ -464,6 +470,7 @@ fi
|
|||||||
/usr/bin/colrm
|
/usr/bin/colrm
|
||||||
/usr/bin/column
|
/usr/bin/column
|
||||||
/usr/bin/ddate
|
/usr/bin/ddate
|
||||||
|
/usr/bin/fallocate
|
||||||
/usr/bin/flock
|
/usr/bin/flock
|
||||||
/usr/bin/getopt
|
/usr/bin/getopt
|
||||||
/usr/bin/hexdump
|
/usr/bin/hexdump
|
||||||
@ -496,6 +503,7 @@ fi
|
|||||||
/usr/bin/tailf
|
/usr/bin/tailf
|
||||||
/usr/bin/taskset
|
/usr/bin/taskset
|
||||||
/usr/bin/time
|
/usr/bin/time
|
||||||
|
/usr/bin/unshare
|
||||||
/usr/bin/which
|
/usr/bin/which
|
||||||
/usr/sbin/addpart
|
/usr/sbin/addpart
|
||||||
/usr/sbin/delpart
|
/usr/sbin/delpart
|
||||||
@ -524,6 +532,7 @@ fi
|
|||||||
%{_mandir}/man1/column.1.gz
|
%{_mandir}/man1/column.1.gz
|
||||||
%{_mandir}/man1/ddate.1.gz
|
%{_mandir}/man1/ddate.1.gz
|
||||||
%{_mandir}/man1/dmesg.1.gz
|
%{_mandir}/man1/dmesg.1.gz
|
||||||
|
%{_mandir}/man1/fallocate.1.gz
|
||||||
%{_mandir}/man1/flock.1.gz
|
%{_mandir}/man1/flock.1.gz
|
||||||
%{_mandir}/man1/getopt.1.gz
|
%{_mandir}/man1/getopt.1.gz
|
||||||
%{_mandir}/man1/hexdump.1.gz
|
%{_mandir}/man1/hexdump.1.gz
|
||||||
@ -550,6 +559,7 @@ fi
|
|||||||
%{_mandir}/man1/tailf.1.gz
|
%{_mandir}/man1/tailf.1.gz
|
||||||
%{_mandir}/man1/taskset.1.gz
|
%{_mandir}/man1/taskset.1.gz
|
||||||
%{_mandir}/man1/ul.1.gz
|
%{_mandir}/man1/ul.1.gz
|
||||||
|
%{_mandir}/man1/unshare.1.gz
|
||||||
%{_mandir}/man1/wall.1.gz
|
%{_mandir}/man1/wall.1.gz
|
||||||
%{_mandir}/man1/whereis.1.gz
|
%{_mandir}/man1/whereis.1.gz
|
||||||
%{_mandir}/man1/write.1.gz
|
%{_mandir}/man1/write.1.gz
|
||||||
@ -592,6 +602,7 @@ fi
|
|||||||
%{_mandir}/man8/swapon.8.gz
|
%{_mandir}/man8/swapon.8.gz
|
||||||
%{_mandir}/man8/umount.8.gz
|
%{_mandir}/man8/umount.8.gz
|
||||||
%{_mandir}/man8/setctsid.8.gz
|
%{_mandir}/man8/setctsid.8.gz
|
||||||
|
%{_mandir}/man8/wipefs.8.gz
|
||||||
/usr/sbin/flushb
|
/usr/sbin/flushb
|
||||||
/usr/sbin/readprofile
|
/usr/sbin/readprofile
|
||||||
%dir /usr/share/getopt
|
%dir /usr/share/getopt
|
||||||
|
Loading…
Reference in New Issue
Block a user