1
0
forked from pool/util-linux
OBS User unknown 2007-11-09 00:05:51 +00:00 committed by Git OBS Bridge
parent a685642dab
commit e68493f4c1
7 changed files with 122 additions and 236 deletions

View File

@ -1,70 +0,0 @@
commit 5d1f6bae3b298809ecd63b3e55f6ab30caaa4dbf
Author: Matthias Koenig <mkoenig@suse.de>
Date: Thu Sep 20 11:11:18 2007 +0200
hwclock: fix --rtc option
The --rtc option does not set the name of the device correctly.
It still uses /dev/rtc even if the --rtc option is given.
Testcase:
$ mv /dev/rtc /dev/foo
$ hwclock --show --debug --rtc=/dev/foo
hwclock from util-linux-2.13-rc2
Using /dev interface to clock.
Last drift adjustment done at 1190198135 seconds after 1969
Last calibration done at 1190198135 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
hwclock: open() of /dev/rtc failed, errno=2: No such file or directory.
...got clock tick
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
diff --git a/hwclock/rtc.c b/hwclock/rtc.c
index f8e626e..724daf9 100644
--- a/hwclock/rtc.c
+++ b/hwclock/rtc.c
@@ -104,24 +104,21 @@ open_rtc(void) {
"/dev/misc/rtc",
NULL
};
- char **p = fls;
- char *fname = rtc_dev_name ? : *p;
-
- do {
- int fd = open(fname, O_RDONLY);
-
- if (fd < 0 && errno == ENOENT) {
- if (fname == rtc_dev_name)
- break;
- fname = *++p;
- } else {
- rtc_dev_name = *p;
- return fd;
- }
- } while(fname);
-
- if (!rtc_dev_name)
- rtc_dev_name = *fls;
+ char **p;
+
+ /* --rtc option has been given */
+ if (rtc_dev_name)
+ return open(rtc_dev_name, O_RDONLY);
+
+ for (p=fls; *p; ++p) {
+ int fd = open(*p, O_RDONLY);
+
+ if (fd < 0 && errno == ENOENT)
+ continue;
+ rtc_dev_name = *p;
+ return fd;
+ }
+ rtc_dev_name = *fls; /* default */
return -1;
}

View File

@ -1,50 +0,0 @@
commit ebbeb2c7ac1b00b6083905957837a271e80b187e
Author: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Thu Sep 20 14:57:20 2007 +0200
mount: doesn't drop privileges properly when calling helpers
{,u}mount calls setuid() and setgid() in the wrong order and doesn't checking
the return value of set{u,g}id(() when running helpers like mount.nfs.
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
diff --git a/mount/mount.c b/mount/mount.c
index 40699f3..5bc2b30 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -634,8 +634,12 @@ check_special_mountprog(const char *spec, const char *node, const char *type, in
char *oo, *mountargs[10];
int i = 0;
- setuid(getuid());
- setgid(getgid());
+ if(setgid(getgid()) < 0)
+ die(EX_FAIL, _("mount: cannot set group id: %s"), strerror(errno));
+
+ if(setuid(getuid()) < 0)
+ die(EX_FAIL, _("mount: cannot set user id: %s"), strerror(errno));
+
oo = fix_opts_string (flags, extra_opts, NULL);
mountargs[i++] = mountprog; /* 1 */
mountargs[i++] = (char *) spec; /* 2 */
diff --git a/mount/umount.c b/mount/umount.c
index b3100c9..3221619 100644
--- a/mount/umount.c
+++ b/mount/umount.c
@@ -102,8 +102,12 @@ check_special_umountprog(const char *spec, const char *node,
char *umountargs[8];
int i = 0;
- setuid(getuid());
- setgid(getgid());
+ if(setgid(getgid()) < 0)
+ die(EX_FAIL, _("umount: cannot set group id: %s"), strerror(errno));
+
+ if(setuid(getuid()) < 0)
+ die(EX_FAIL, _("umount: cannot set user id: %s"), strerror(errno));
+
umountargs[i++] = umountprog;
umountargs[i++] = xstrdup(node);
if (nomtab)

View File

@ -4,10 +4,10 @@
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Index: util-linux-ng-2.13rc2+git20070725/mount/Makefile.am
Index: util-linux-ng-2.13.0.1+git20071106/mount/Makefile.am
===================================================================
--- util-linux-ng-2.13rc2+git20070725.orig/mount/Makefile.am
+++ util-linux-ng-2.13rc2+git20070725/mount/Makefile.am
--- util-linux-ng-2.13.0.1+git20071106.orig/mount/Makefile.am
+++ util-linux-ng-2.13.0.1+git20071106/mount/Makefile.am
@@ -12,7 +12,7 @@ headers_common = fstab.h linux_fs.h moun
mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \
getusername.h loop.h sundries.h
@ -21,15 +21,15 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/Makefile.am
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 rmd160.c sha512.c
-losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \
+losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c rmd160.c sha512.c \
loop.h lomount.h xmalloc.h sundries.h realpath.h
losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS)
mount_LDADD = $(LDADD_common)
Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.h
Index: util-linux-ng-2.13.0.1+git20071106/mount/rmd160.h
===================================================================
--- /dev/null
+++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.h
+++ util-linux-ng-2.13.0.1+git20071106/mount/rmd160.h
@@ -0,0 +1,11 @@
+#ifndef RMD160_H
+#define RMD160_H
@ -42,11 +42,11 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.h
+#endif /*RMD160_H*/
+
+
Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
Index: util-linux-ng-2.13.0.1+git20071106/mount/lomount.c
===================================================================
--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.c
+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.c
@@ -20,9 +20,15 @@
--- util-linux-ng-2.13.0.1+git20071106.orig/mount/lomount.c
+++ util-linux-ng-2.13.0.1+git20071106/mount/lomount.c
@@ -20,12 +20,18 @@
#include "loop.h"
#include "lomount.h"
@ -54,20 +54,23 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
+#include "sha512.h"
#include "xstrncpy.h"
#include "nls.h"
#include "sundries.h"
#include "xmalloc.h"
#include "realpath.h"
+#ifndef MAX
+#define MAX(a,b) ((a>b)?(a):(b))
+#endif
+
extern int verbose;
extern char *progname;
extern char *xstrdup (const char *s); /* not: #include "sundries.h" */
@@ -95,12 +101,22 @@ show_loop(char *device) {
#define SIZE(a) (sizeof(a)/sizeof(a[0]))
#ifdef LOOP_SET_FD
@@ -93,12 +99,22 @@ show_loop(char *device) {
if (loopinfo64.lo_encrypt_type ||
loopinfo64.lo_crypt_name[0]) {
- char *e = loopinfo64.lo_crypt_name;
+ const char *e = (const char*)loopinfo64.lo_crypt_name;
- char *e = (char *)loopinfo64.lo_crypt_name;
+ const char *e = (const char *)loopinfo64.lo_crypt_name;
if (*e == 0 && loopinfo64.lo_encrypt_type == 1)
e = "XOR";
@ -88,7 +91,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
}
printf("\n");
close (fd);
@@ -259,7 +275,7 @@ xgetpass(int pfd, const char *prompt) {
@@ -353,7 +369,7 @@ xgetpass(int pfd, const char *prompt) {
}
if (pass == NULL)
@ -97,7 +100,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
pass[i] = 0;
return pass;
@@ -273,12 +289,30 @@ digits_only(const char *s) {
@@ -367,12 +383,30 @@ digits_only(const char *s) {
return 1;
}
@ -127,18 +130,15 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
int fd, ffd, mode, i;
- char *pass;
+ char *pass = NULL;
char *filename;
mode = (*loopro ? O_RDONLY : O_RDWR);
if ((ffd = open(file, mode)) < 0) {
@@ -297,15 +331,43 @@ set_loop(const char *device, const char
if (verbose) {
@@ -406,13 +440,41 @@ set_loop(const char *device, const char
filename = (char *) file;
xstrncpy((char *)loopinfo64.lo_file_name, filename, LO_NAME_SIZE);
memset(&loopinfo64, 0, sizeof(loopinfo64));
- xstrncpy(loopinfo64.lo_file_name, file, LO_NAME_SIZE);
+ xstrncpy((char*)loopinfo64.lo_file_name, file, LO_NAME_SIZE);
+
+ loopinfo64.lo_encrypt_key_size = 0;
+
if (encryption && *encryption) {
+ // a hint for suse users
+ if(!strcmp(encryption, "twofishSL92")) {
@ -151,7 +151,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
loopinfo64.lo_encrypt_type = atoi(encryption);
} else {
- 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
+ unsigned len = strlen(encryption);
+ snprintf((char*)loopinfo64.lo_crypt_name, LO_NAME_SIZE,
@ -177,7 +177,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
}
}
@@ -325,20 +387,64 @@ set_loop(const char *device, const char
@@ -432,20 +494,64 @@ set_loop(const char *device, const char
}
#endif
@ -195,7 +195,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
+ void (*hfunc)(const unsigned char*, size_t, unsigned char*, size_t) = NULL;
+
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: "));
+ if(!pass) {
@ -233,28 +233,28 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
+ } else if(!strcasecmp(phash, "sha256")) {
+ hfunc = sha256_hash_buffer;
+ } else if(!strcasecmp(phash, "rmd160")) {
+ hfunc = phash_rmd160;
+ } else if(!strcasecmp(phash, "none")) {
+ hfunc = phash_none;
+ } else {
+ fprintf(stderr, _("unsupported hash method '%s'\n"), phash);
+ close(fd);
+ close(ffd);
+ return 1;
+ }
+ }
+ hfunc = phash_rmd160;
+ } else if(!strcasecmp(phash, "none")) {
+ hfunc = phash_none;
+ } else {
+ fprintf(stderr, _("unsupported hash method '%s'\n"), phash);
+ close(fd);
+ close(ffd);
+ return 1;
+ }
+ }
+
+ if(hfunc) {
+ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size);
+ }
+ if(hfunc) {
+ hfunc((unsigned char*)pass, strlen(pass), loopinfo64.lo_encrypt_key, loopinfo64.lo_encrypt_key_size);
+ }
+
+ // zero buffer
+ // zero buffer
memset(pass, 0, strlen(pass));
- loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE;
}
if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
@@ -416,8 +522,8 @@ mutter(void) {
@@ -532,8 +638,8 @@ mutter(void) {
}
int
@ -265,7 +265,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
mutter();
return 1;
}
@@ -456,7 +562,13 @@ usage(void) {
@@ -569,7 +675,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"
@ -279,7 +279,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
" -o | --offset <num> start at offset <num> into file\n"
" -p | --pass-fd <num> read passphrase from file descriptor <num>\n"
" -r | --read-only setup read-only loop device\n"
@@ -497,11 +609,14 @@ error (const char *fmt, ...) {
@@ -582,11 +694,14 @@ usage(void) {
int
main(int argc, char **argv) {
char *p, *offset, *encryption, *passfd, *device, *file;
@ -294,7 +294,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
unsigned long long off;
struct option longopts[] = {
{ "all", 0, 0, 'a' },
@@ -509,6 +624,8 @@ main(int argc, char **argv) {
@@ -594,6 +709,8 @@ main(int argc, char **argv) {
{ "encryption", 1, 0, 'e' },
{ "find", 0, 0, 'f' },
{ "help", 0, 0, 'h' },
@ -303,7 +303,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
{ "offset", 1, 0, 'o' },
{ "pass-fd", 1, 0, 'p' },
{ "read-only", 0, 0, 'r' },
@@ -524,12 +641,13 @@ main(int argc, char **argv) {
@@ -609,12 +726,13 @@ main(int argc, char **argv) {
delete = find = all = 0;
off = 0;
offset = encryption = passfd = NULL;
@ -318,7 +318,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
longopts, NULL)) != -1) {
switch (c) {
case 'a':
@@ -548,6 +666,12 @@ main(int argc, char **argv) {
@@ -633,6 +751,12 @@ main(int argc, char **argv) {
case 'f':
find = 1;
break;
@ -331,7 +331,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
case 'o':
offset = optarg;
break;
@@ -611,8 +735,10 @@ main(int argc, char **argv) {
@@ -696,8 +820,10 @@ main(int argc, char **argv) {
usage();
if (passfd && sscanf(passfd, "%d", &pfd) != 1)
usage();
@ -343,11 +343,11 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.c
if (res == 2 && find) {
if (verbose)
printf("stolen loop=%s...trying again\n",
Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
Index: util-linux-ng-2.13.0.1+git20071106/mount/mount.c
===================================================================
--- util-linux-ng-2.13rc2+git20070725.orig/mount/mount.c
+++ util-linux-ng-2.13rc2+git20070725/mount/mount.c
@@ -93,6 +93,9 @@ static int suid = 0;
--- util-linux-ng-2.13.0.1+git20071106.orig/mount/mount.c
+++ util-linux-ng-2.13.0.1+git20071106/mount/mount.c
@@ -88,6 +88,9 @@ static int suid = 0;
/* Contains the fd to read the passphrase from, if any. */
static int pfd = -1;
@ -357,7 +357,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
/* Map from -o and fstab option strings to the flag argument to mount(2). */
struct opt_map {
const char *opt; /* option name */
@@ -190,6 +193,7 @@ static int opt_nofail = 0;
@@ -185,6 +188,7 @@ static int opt_nofail = 0;
static const char *opt_loopdev, *opt_vfstype, *opt_offset, *opt_encryption,
*opt_speed, *opt_comment, *opt_uhelper;
@ -365,7 +365,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
static int mounted (const char *spec0, const char *node0);
static int check_special_mountprog(const char *spec, const char *node,
@@ -204,6 +208,9 @@ static struct string_opt_map {
@@ -199,6 +203,9 @@ static struct string_opt_map {
{ "vfs=", 1, &opt_vfstype },
{ "offset=", 0, &opt_offset },
{ "encryption=", 0, &opt_encryption },
@ -375,7 +375,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
{ "speed=", 0, &opt_speed },
{ "comment=", 1, &opt_comment },
{ "uhelper=", 0, &opt_uhelper },
@@ -858,7 +865,7 @@ loop_check(const char **spec, const char
@@ -902,7 +909,7 @@ loop_check(const char **spec, const char
*type = opt_vfstype;
}
@ -384,7 +384,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
*loopfile = *spec;
if (*loop) {
@@ -879,9 +886,17 @@ loop_check(const char **spec, const char
@@ -928,9 +935,17 @@ 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);
@ -404,24 +404,15 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
if (res == 2) {
/* loop dev has been grabbed by some other process,
try again, if not given explicitly */
@@ -1184,7 +1199,7 @@ try_mount_one (const char *spec0, const
error (_("mount: %s not mounted already, or bad option"), node);
} else {
error (_("mount: wrong fs type, bad option, bad superblock on %s,\n"
- " missing codepage or other error"),
+ " missing codepage or helper program, or other error"),
spec);
if (stat(spec, &statbuf) == 0 && S_ISBLK(statbuf.st_mode)
@@ -1629,6 +1644,7 @@ static struct option longopts[] = {
@@ -1677,6 +1692,7 @@ static struct option longopts[] = {
{ "options", 1, 0, 'o' },
{ "test-opts", 1, 0, 'O' },
{ "pass-fd", 1, 0, 'p' },
+ { "keybits", 1, 0, 'k' },
{ "types", 1, 0, 't' },
{ "bind", 0, 0, 128 },
{ "replace", 0, 0, 129 },
@@ -1781,6 +1797,7 @@ main(int argc, char *argv[]) {
{ "move", 0, 0, 133 },
@@ -1823,6 +1839,7 @@ main(int argc, char *argv[]) {
char *options = NULL, *test_opts = NULL, *node;
const char *spec = NULL;
char *label = NULL;
@ -429,7 +420,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
char *uuid = NULL;
char *types = NULL;
char *p;
@@ -1811,7 +1828,7 @@ main(int argc, char *argv[]) {
@@ -1853,7 +1870,7 @@ main(int argc, char *argv[]) {
initproctitle(argc, argv);
#endif
@ -438,7 +429,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
longopts, NULL)) != -1) {
switch (c) {
case 'a': /* mount everything in fstab */
@@ -1829,6 +1846,9 @@ main(int argc, char *argv[]) {
@@ -1871,6 +1888,9 @@ main(int argc, char *argv[]) {
case 'i':
external_allowed = 0;
break;
@ -448,9 +439,9 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
case 'l':
list_with_volumelabel = 1;
break;
@@ -1975,6 +1995,9 @@ main(int argc, char *argv[]) {
create_mtab ();
}
@@ -2007,6 +2027,9 @@ main(int argc, char *argv[]) {
atexit(unlock_mtab);
+ if (keysize && sscanf(keysize,"%d",&keysz) != 1)
+ die (EX_USAGE, _("mount: argument to --keybits or -k must be a number"));
@ -458,23 +449,10 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/mount.c
switch (argc+specseen) {
case 0:
/* mount -a */
Index: util-linux-ng-2.13rc2+git20070725/mount/lomount.h
===================================================================
--- util-linux-ng-2.13rc2+git20070725.orig/mount/lomount.h
+++ util-linux-ng-2.13rc2+git20070725/mount/lomount.h
@@ -1,6 +1,6 @@
extern int verbose;
-extern int set_loop(const char *, const char *, unsigned long long,
- const char *, int, int *);
+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);
extern int del_loop(const char *);
extern int is_loop_device(const char *);
extern char * find_unused_loop_device(void);
Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.c
Index: util-linux-ng-2.13.0.1+git20071106/mount/rmd160.c
===================================================================
--- /dev/null
+++ util-linux-ng-2.13rc2+git20070725/mount/rmd160.c
+++ util-linux-ng-2.13.0.1+git20071106/mount/rmd160.c
@@ -0,0 +1,532 @@
+/* rmd160.c - RIPE-MD160
+ * Copyright (C) 1998 Free Software Foundation, Inc.
@ -1008,10 +986,10 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/rmd160.c
+ rmd160_final( &hd );
+ memcpy( outbuf, hd.buf, 20 );
+}
Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c
Index: util-linux-ng-2.13.0.1+git20071106/mount/sha512.c
===================================================================
--- /dev/null
+++ util-linux-ng-2.13rc2+git20070725/mount/sha512.c
+++ util-linux-ng-2.13.0.1+git20071106/mount/sha512.c
@@ -0,0 +1,432 @@
+/*
+ * sha512.c
@ -1132,7 +1110,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c
+ (((u_int32_t)(datap[2]))<<8 ) | ((u_int32_t)(datap[3]));
+ datap += 4;
+ } while(++j < 16);
+
+
+ /* initialize variables a...h */
+ a = ctx->sha_H[0];
+ b = ctx->sha_H[1];
@ -1219,7 +1197,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c
+ ctx->sha_out[62] = bitLength >> 8;
+ ctx->sha_out[63] = bitLength;
+ sha256_transform(ctx, &ctx->sha_out[0]);
+
+
+ /* return results in ctx->sha_out[0...31] */
+ datap = &ctx->sha_out[0];
+ j = 0;
@ -1289,7 +1267,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c
+ (((u_int64_t)(datap[6]))<<8 ) | ((u_int64_t)(datap[7]));
+ datap += 8;
+ } while(++j < 16);
+
+
+ /* initialize variables a...h */
+ a = ctx->sha_H[0];
+ b = ctx->sha_H[1];
@ -1386,7 +1364,7 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c
+ ctx->sha_out[126] = bitLength >> 8;
+ ctx->sha_out[127] = bitLength;
+ sha512_transform(ctx, &ctx->sha_out[0]);
+
+
+ /* return results in ctx->sha_out[0...63] */
+ datap = &ctx->sha_out[0];
+ j = 0;
@ -1445,10 +1423,10 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.c
+ memset(&ctx, 0, sizeof(ctx));
+}
+#endif
Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.h
Index: util-linux-ng-2.13.0.1+git20071106/mount/sha512.h
===================================================================
--- /dev/null
+++ util-linux-ng-2.13rc2+git20070725/mount/sha512.h
+++ util-linux-ng-2.13.0.1+git20071106/mount/sha512.h
@@ -0,0 +1,45 @@
+/*
+ * sha512.h
@ -1495,3 +1473,15 @@ Index: util-linux-ng-2.13rc2+git20070725/mount/sha512.h
+/* no sha384_write(), use sha512_write() */
+/* 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);
Index: util-linux-ng-2.13.0.1+git20071106/mount/lomount.h
===================================================================
--- util-linux-ng-2.13.0.1+git20071106.orig/mount/lomount.h
+++ util-linux-ng-2.13.0.1+git20071106/mount/lomount.h
@@ -1,5 +1,5 @@
-extern int set_loop(const char *, const char *, unsigned long long,
- const char *, int, int *);
+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);
extern int del_loop(const char *);
extern int is_loop_device(const char *);
extern char * find_unused_loop_device(void);

View File

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

View File

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

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Nov 6 16:11:02 CET 2007 - mkoenig@suse.de
- update to 2.13.0.1+git20071106
- prevent loop mounting the same file twice [#240653]
- merged upstream:
util-linux-2.13-mount_helper_fix.patch
util-linux-2.13-hwclock_rtc_option.patch
-------------------------------------------------------------------
Thu Oct 4 22:24:04 CEST 2007 - bg@suse.de

View File

@ -1,5 +1,5 @@
#
# spec file for package util-linux (Version 2.13)
# spec file for package util-linux (Version 2.13.0.1+git20071106)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@ -20,11 +20,10 @@ PreReq: %install_info_prereq permissions
License: BSD 3-Clause; GPL v2 or later
Group: System/Base
AutoReqProv: on
Version: 2.13
Release: 2
%define upver 2.13
Version: 2.13.0.1+git20071106
Release: 1
Summary: A collection of basic system utilities
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%version.tar.bz2
Source2: nologin.c
Source3: nologin.8
Source4: raw.init
@ -67,8 +66,6 @@ Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch
Patch10: util-linux-2.13-mount_losetup_crypto.patch
Patch11: util-linux-2.13-mount_fd_leak.patch
Patch12: util-linux-2.13-fdisk_cfdisk_ncursesw.patch
Patch13: util-linux-2.13-mount_helper_fix.patch
Patch14: util-linux-2.13-hwclock_rtc_option.patch
##
##
## adjtimex
@ -102,7 +99,7 @@ Authors:
Karel Zak <kzak@redhat.com>
%prep
%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%upver
%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%version
%patch1 -p1
%patch2 -p1
%patch3 -p1
@ -111,8 +108,6 @@ Authors:
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
#
cd adjtimex-*
%patch50 -p1
@ -176,8 +171,8 @@ make setctsid CFLAGS="$RPM_OPT_FLAGS"
CFLAGS=-DCONFIG_SMP
%endif
# Use autogen, when building from git tree
autoreconf -fi
#./autogen.sh
#autoreconf -fi
./autogen.sh
./configure --mandir=%{_mandir} \
--datadir=%{_datadir} \
--with-fsprobe=volume_id \
@ -277,6 +272,12 @@ rm -f $RPM_BUILD_ROOT/usr/bin/parisc
rm -f $RPM_BUILD_ROOT/usr/bin/parisc32
rm -f $RPM_BUILD_ROOT/usr/bin/parisc64
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/setarch.8
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/i386.8
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/x86_64.8
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/linux{32,64}.8
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ia64.8
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/s390{,x}.8
rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/ppc{,32,64}.8
# arch dependent
%ifarch s390 s390x
rm -f $RPM_BUILD_ROOT/etc/fdprm
@ -553,6 +554,12 @@ fi
#/usr/bin/ia64
#%endif
%changelog
* Tue Nov 06 2007 - mkoenig@suse.de
- update to 2.13.0.1+git20071106
- prevent loop mounting the same file twice [#240653]
- merged upstream:
util-linux-2.13-mount_helper_fix.patch
util-linux-2.13-hwclock_rtc_option.patch
* Thu Oct 04 2007 - bg@suse.de
- don't use parisc, parisc32 and parisc64.
* Mon Oct 01 2007 - mkoenig@suse.de