Browse Source

fake:


			
			
				rocklinux
			
			
		
fake 20 years ago
parent
commit
889f6bb927
7 changed files with 76 additions and 163 deletions
  1. +0
    -10
      package/base/util-linux/configure-tqueue_h.patch
  2. +36
    -47
      package/base/util-linux/cryptoloop-support.diff
  3. +8
    -8
      package/base/util-linux/disable_cramfs_tools.diff
  4. +0
    -12
      package/base/util-linux/hotfixes.patch
  5. +6
    -41
      package/base/util-linux/linux-compiler_h.patch
  6. +24
    -43
      package/base/util-linux/nice-mount-paths.patch
  7. +2
    -2
      package/base/util-linux/util-linux.desc

+ 0
- 10
package/base/util-linux/configure-tqueue_h.patch

@ -1,10 +0,0 @@
--- util-linux-2.12h/configure 2004-09-06 16:33:47.000000000 +0000
+++ util-linux-2.12h-comp/configure 2004-10-23 08:24:25.176815064 +0000
@@ -366,6 +366,7 @@
# 1. cytune.c may need struct tq_struct
#
echo "
+#include <linux/compiler.h>
#include <sys/types.h>
#include <linux/cyclades.h>
int main(){ exit(0); }

+ 36
- 47
package/base/util-linux/cryptoloop-support.diff

@ -1,15 +1,6 @@
diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.c
--- util-linux-2.12h/mount/lomount.c 2004-09-22 18:26:02.000000000 +0000
+++ util-linux-2.12h-patch/mount/lomount.c 2004-10-23 03:37:44.541795904 +0000
@@ -10,7 +10,6 @@
* 2000-09-24 Marc Mutz <Marc@Mutz.com>
* - added -p option to pass passphrases via fd's to losetup/mount.
* Used for encryption in non-interactive environments.
- * The idea behind xgetpass() is stolen from GnuPG, v.1.0.3.
*/
#define LOOPMAJOR 7
@@ -24,12 +23,16 @@
--- ./mount/lomount.c.orig 2004-12-30 18:03:18.851539264 +0100
+++ ./mount/lomount.c 2004-12-30 18:17:14.617483528 +0100
@@ -11,12 +11,16 @@
#include <ctype.h>
#include <fcntl.h>
#include <errno.h>
@ -26,15 +17,15 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.
#include "loop.h"
#include "lomount.h"
@@ -38,6 +41,7 @@
@@ -26,6 +30,7 @@
extern int verbose;
extern char *progname;
extern char *xstrdup (const char *s); /* not: #include "sundries.h" */
+extern void *xmalloc (size_t size); /* idem */
extern void error (const char *fmt, ...); /* idem */
#ifdef LOOP_SET_FD
@@ -198,43 +202,113 @@
@@ -190,44 +195,115 @@
return 0;
}
@ -105,16 +96,17 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.
+ sscanf(s, "min keysize : %d", &min_size);
+ sscanf(s, "max keysize : %d", &max_size);
}
- if (read(pfd, pass+i, 1) != 1 || pass[i] == '\n')
- if (read(pfd, pass+i, 1) != 1 ||
- pass[i] == '\n' || pass[i] == 0)
- break;
}
- if (pass == NULL)
- return "";
- else {
- pass[i] = 0;
- return pass;
+ fclose(fp);
+
- pass[i] = 0;
- return pass;
+ if (!cipher_found) {
+ fprintf(stderr, _("Invalid cipher \"%s\"\n"), cipher_name);
+ retval = 0;
@ -125,7 +117,8 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.
+ loopinfo64->lo_encrypt_key_size, cipher_name);
+ retval = 0;
+ goto end;
}
+ }
+
+
+ retval = 1;
+end:
@ -179,7 +172,7 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.
}
static int
@@ -275,9 +349,40 @@
@@ -268,9 +344,40 @@
if (digits_only(encryption)) {
loopinfo64.lo_encrypt_type = atoi(encryption);
} else {
@ -221,19 +214,16 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.
}
}
@@ -308,10 +413,26 @@
strlen(loopinfo64.lo_encrypt_key);
break;
@@ -297,7 +404,27 @@
pass = getpass(_("Password: "));
goto gotpass;
default:
- pass = xgetpass(pfd, _("Password: "));
- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
- memset(pass, 0, strlen(pass));
- loopinfo64.lo_encrypt_key_size = LO_KEY_SIZE;
+ if (pfd == -1) {
+ pass = getpass(_("Password: "));
+ xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
+ if (pfd == -1) {
+ pass = getpass(_("Password: "));
+ xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
+ memset(pass, 0, strlen(pass));
+ } else {
+ } else {
+ /* If we're reading from an extenral program, *
+ * odds are good that a SIGCHLD will interrupt *
+ * this read(), and ruin our whole day. So we *
@ -249,10 +239,11 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.
+ }
+ sigprocmask(SIG_SETMASK, &oss, NULL);
+ }
}
if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
@@ -325,20 +446,44 @@
+ break;
gotpass:
memset(loopinfo64.lo_encrypt_key, 0, LO_KEY_SIZE);
xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
@@ -316,20 +443,45 @@
struct loop_info loopinfo;
int errsv = errno;
@ -265,6 +256,7 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.
+ }
+
+
+ i = loop_info64_to_old(&loopinfo64, &loopinfo);
i = loop_info64_to_old(&loopinfo64, &loopinfo);
if (i) {
errno = errsv;
@ -298,7 +290,7 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.
ioctl (fd, LOOP_CLR_FD, 0);
close (fd);
return 1;
@@ -420,6 +563,22 @@
@@ -412,6 +564,22 @@
exit(1);
}
@ -321,22 +313,19 @@ diff -dur util-linux-2.12h/mount/lomount.c util-linux-2.12h-patch/mount/lomount.
char *
xstrdup (const char *s) {
char *t;
Nur in util-linux-2.12h-patch/mount: lomount.c~.
diff -dur util-linux-2.12h/mount/mount.8 util-linux-2.12h-patch/mount/mount.8
--- util-linux-2.12h/mount/mount.8 2004-09-19 20:00:49.000000000 +0000
+++ util-linux-2.12h-patch/mount/mount.8 2004-10-23 03:36:52.385724832 +0000
@@ -1759,6 +1759,11 @@
.BR loop ", " offset " and " encryption ,
that are really options to
.BR losetup (8).
--- ./mount/mount.8.orig 2004-12-30 18:03:25.645506424 +0100
+++ ./mount/mount.8 2004-12-30 18:18:04.469904808 +0100
@@ -1847,6 +1847,10 @@
.BR \%losetup (8).
(These options can be used in addition to those specific
to the filesystem type.)
+You can also use the
+.BR keygen
+option to have mount call an external program from, which it will read the
+encryption key. Arguments to this program can be given, separated by semicolons.
+
If no explicit loop device is mentioned
(but just an option `\fB\-o loop\fP' is given), then
.B mount
diff -dur util-linux-2.12h/mount/mount.c util-linux-2.12h-patch/mount/mount.c
--- util-linux-2.12h/mount/mount.c 2004-10-13 20:54:39.000000000 +0000
+++ util-linux-2.12h-patch/mount/mount.c 2004-10-23 03:36:52.386724680 +0000

+ 8
- 8
package/base/util-linux/disable_cramfs_tools.diff

@ -1,6 +1,5 @@
diff -dur util-linux-2.12h/disk-utils/Makefile util-linux-2.12h-patch/disk-utils/Makefile
--- util-linux-2.12h/disk-utils/Makefile 2002-11-02 13:52:47.000000000 +0000
+++ util-linux-2.12h-patch/disk-utils/Makefile 2004-10-23 03:13:08.329214328 +0000
--- ./disk-utils/Makefile.orig 2004-12-30 17:55:07.774194368 +0100
+++ ./disk-utils/Makefile 2004-12-30 17:56:04.443579312 +0100
@@ -20,7 +20,7 @@
ETC= fdprm
@ -10,7 +9,7 @@ diff -dur util-linux-2.12h/disk-utils/Makefile util-linux-2.12h-patch/disk-utils
ifneq "$(HAVE_FDUTILS)" "yes"
USRBIN:=$(USRBIN) setfdprm
@@ -32,22 +32,8 @@
@@ -32,26 +32,12 @@
MAN8:=$(MAN8) raw.8
endif
@ -18,6 +17,10 @@ diff -dur util-linux-2.12h/disk-utils/Makefile util-linux-2.12h-patch/disk-utils
-SBIN:=$(SBIN) fsck.cramfs mkfs.cramfs
-endif
-
ifeq "$(HAVE_UUID)" "yes"
MKSWAP_LIBS=-luuid
endif
all: $(SBIN) $(USRBIN)
-fsck.cramfs: fsck.cramfs.o
@ -32,7 +35,4 @@ diff -dur util-linux-2.12h/disk-utils/Makefile util-linux-2.12h-patch/disk-utils
-
fsck.minix.o mkfs.minix.o: bitops.h minix.h
install: all
Nur in util-linux-2.12h-patch/disk-utils: Makefile~.
Nur in util-linux-2.12h-patch/: Makefile~.
Nur in util-linux-2.12h-patch/: Makefile.rej.
mkswap: mkswap.o $(LIB)/xstrncpy.o

+ 0
- 12
package/base/util-linux/hotfixes.patch

@ -66,18 +66,6 @@ diff -dur util-linux-2.12h/mount/mount.c util-linux-2.12h-patch/mount/mount.c
#ifdef DO_PS_FIDDLING
#include "setproctitle.h"
Nur in util-linux-2.12h-patch/mount: mount.c~.
diff -dur util-linux-2.12h/mount/swap.configure util-linux-2.12h-patch/mount/swap.configure
--- util-linux-2.12h/mount/swap.configure 1999-07-09 02:56:39.000000000 +0000
+++ util-linux-2.12h-patch/mount/swap.configure 2004-10-23 03:17:42.547526808 +0000
@@ -23,7 +23,7 @@
echo '#include <unistd.h>
main(){ exit(0); swapon("/dev/null", 0); }' >> conftest.c
eval $compile
-if test -s conftest && ./conftest 2>/dev/null; then
+if test -s conftest; then
echo "#define SWAPON_HAS_TWO_ARGS" > swapargs.h
echo $PAGEH >> swapargs.h
echo $SWAPH >> swapargs.h
diff -dur util-linux-2.12h/text-utils/Makefile util-linux-2.12h-patch/text-utils/Makefile
--- util-linux-2.12h/text-utils/Makefile 2003-03-02 23:32:04.000000000 +0000
+++ util-linux-2.12h-patch/text-utils/Makefile 2004-10-23 03:17:42.547526808 +0000

+ 6
- 41
package/base/util-linux/linux-compiler_h.patch

@ -1,6 +1,5 @@
diff -dur util-linux-2.12h/partx/addpart.c util-linux-2.12h-comp/partx/addpart.c
--- util-linux-2.12h/partx/addpart.c 1999-07-09 02:56:36.000000000 +0000
+++ util-linux-2.12h-comp/partx/addpart.c 2004-10-23 08:41:37.998802256 +0000
--- ./partx/addpart.c.orig 2004-12-30 18:27:39.994411784 +0100
+++ ./partx/addpart.c 2004-12-30 18:27:49.601951216 +0100
@@ -3,6 +3,7 @@
#include <fcntl.h>
#include <stdlib.h>
@ -9,31 +8,8 @@ diff -dur util-linux-2.12h/partx/addpart.c util-linux-2.12h-comp/partx/addpart.c
#include <linux/blkpg.h>
int
diff -dur util-linux-2.12h/disk-utils/fdformat.c util-linux-2.12h-patch/disk-utils/fdformat.c
--- util-linux-2.12h/disk-utils/fdformat.c 2002-07-07 12:38:24.000000000 +0000
+++ util-linux-2.12h-patch/disk-utils/fdformat.c 2004-10-23 03:07:43.330621624 +0000
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <linux/compiler.h>
#include <linux/fd.h>
#include "nls.h"
diff -dur util-linux-2.12h/disk-utils/setfdprm.c util-linux-2.12h-patch/disk-utils/setfdprm.c
--- util-linux-2.12h/disk-utils/setfdprm.c 2001-10-21 10:32:27.000000000 +0000
+++ util-linux-2.12h-patch/disk-utils/setfdprm.c 2004-10-23 03:07:43.331621472 +0000
@@ -13,6 +13,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
+#include <linux/compiler.h>
#include <linux/fd.h>
#include "nls.h"
diff -dur util-linux-2.12h/partx/delpart.c util-linux-2.12h-patch/partx/delpart.c
--- util-linux-2.12h/partx/delpart.c 1999-07-09 02:56:36.000000000 +0000
+++ util-linux-2.12h-patch/partx/delpart.c 2004-10-23 03:07:43.331621472 +0000
--- ./partx/delpart.c.orig 2004-12-30 18:28:55.711900976 +0100
+++ ./partx/delpart.c 2004-12-30 18:29:03.194763408 +0100
@@ -3,6 +3,7 @@
#include <fcntl.h>
#include <stdlib.h>
@ -42,9 +18,8 @@ diff -dur util-linux-2.12h/partx/delpart.c util-linux-2.12h-patch/partx/delpart.
#include <linux/blkpg.h>
int
diff -dur util-linux-2.12h/partx/partx.c util-linux-2.12h-patch/partx/partx.c
--- util-linux-2.12h/partx/partx.c 2004-08-23 20:13:27.000000000 +0000
+++ util-linux-2.12h-patch/partx/partx.c 2004-10-23 03:07:43.332621320 +0000
--- ./partx/partx.c.orig 2004-12-30 18:29:10.607636480 +0100
+++ ./partx/partx.c 2004-12-30 18:29:21.124037744 +0100
@@ -37,6 +37,7 @@
#include <getopt.h>
#include <unistd.h>
@ -53,13 +28,3 @@ diff -dur util-linux-2.12h/partx/partx.c util-linux-2.12h-patch/partx/partx.c
#include <linux/hdreg.h> /* HDIO_GETGEO */
#include <linux/blkpg.h>
#define BLKGETSIZE _IO(0x12,96) /* return device size */
--- util-linux-2.12h/sys-utils/cytune.c.orig 2004-11-13 17:28:02.949147420 +0100
+++ util-linux-2.12h/sys-utils/cytune.c 2004-11-13 17:28:25.514481234 +0100
@@ -58,6 +58,7 @@
#include <linux/tqueue.h> /* required for old kernels (for struct tq_struct) */
/* compilation errors on other kernels */
#endif
+#include <linux/compiler.h>
#include <linux/cyclades.h>
#if 0

+ 24
- 43
package/base/util-linux/nice-mount-paths.patch

@ -1,45 +1,26 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/util-linux/nice-mount-paths.patch
# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
--- ./mount/mount.c.orig Wed Mar 21 10:07:59 2001
+++ ./mount/mount.c Wed Mar 21 10:12:15 2001
@@ -1061,6 +1061,23 @@
/* Substitute values in opts, if required */
opts = usersubst(opts);
--- ./mount/mount.c.orig 2004-12-30 17:59:42.242468848 +0100
+++ ./mount/mount.c 2004-12-30 18:00:26.571729776 +0100
@@ -1159,6 +1159,23 @@
/* Substitute values in opts, if required */
opts = usersubst(opts);
+ /* make the node a nice absolute path name */
+ if (node[0] && node[0]!='/') {
+ char *thisdir=get_current_dir_name();
+ char *oldnode=node;
+ if (chdir(node) == 0) {
+ /* we will never free this variable ... */
+ node=get_current_dir_name();
+ chdir(thisdir);
+ if (verbose) printf("mount: change '%s' to '%s'\n",oldnode,node);
+ }
+ free(thisdir);
+ }
+ if (strlen(node)>=3 && node[strlen(node)-1]=='/') {
+ if (verbose) printf("mount: remove the leading '/' in '%s'\n",node);
+ node[strlen(node)-1]=0;
+ }
+ /* make the node a nice absolute path name */
+ if (node[0] && node[0]!='/') {
+ char *thisdir=get_current_dir_name();
+ char *oldnode=node;
+ if (chdir(node) == 0) {
+ /* we will never free this variable ... */
+ node=get_current_dir_name();
+ chdir(thisdir);
+ if (verbose) printf("mount: change '%s' to '%s'\n",oldnode,node);
+ }
+ free(thisdir);
+ }
+ if (strlen(node)>=3 && node[strlen(node)-1]=='/') {
+ if (verbose) printf("mount: remove the leading '/' in '%s'\n",node);
+ node[strlen(node)-1]=0;
+ }
+
/* Merge the fstab and command line options. */
if (opts == NULL)
opts = cmdlineopts;
/* Merge the fstab and command line options. */
if (opts == NULL)
opts = cmdlineopts;

+ 2
- 2
package/base/util-linux/util-linux.desc

@ -38,8 +38,8 @@
[L] GPL
[S] Stable
[V] 2.12h
[V] 2.12p
[P] X -1-3-----9 179.200
[D] 1373503241 util-linux-2.12h.tar.gz ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/
[D] 234540563 util-linux-2.12p.tar.gz ftp://ftp.win.tue.nl/pub/linux-local/utils/util-linux/

Loading…
Cancel
Save