summaryrefslogtreecommitdiff
path: root/source/a/util-linux/0001-mount-old-fix-encryption-usage.patch
diff options
context:
space:
mode:
authorPatrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committerEric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/a/util-linux/0001-mount-old-fix-encryption-usage.patch
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/a/util-linux/0001-mount-old-fix-encryption-usage.patch')
-rw-r--r--source/a/util-linux/0001-mount-old-fix-encryption-usage.patch88
1 files changed, 0 insertions, 88 deletions
diff --git a/source/a/util-linux/0001-mount-old-fix-encryption-usage.patch b/source/a/util-linux/0001-mount-old-fix-encryption-usage.patch
deleted file mode 100644
index afe6e5c9..00000000
--- a/source/a/util-linux/0001-mount-old-fix-encryption-usage.patch
+++ /dev/null
@@ -1,88 +0,0 @@
---- ./mount/mount.c.orig 2012-05-25 04:44:58.993195438 -0500
-+++ ./mount/mount.c 2012-08-02 12:04:52.455435631 -0500
-@@ -41,6 +41,7 @@
- #include "nls.h"
- #include "blkdev.h"
- #include "strutils.h"
-+#include "xgetpass.h"
-
- #define DO_PS_FIDDLING
-
-@@ -1238,6 +1239,8 @@
- int looptype;
- uintmax_t offset = 0, sizelimit = 0;
- struct loopdev_cxt lc;
-+ char *pwd = NULL;
-+ int ret = EX_FAIL;
-
- /*
- * In the case of a loop mount, either type is of the form lo@/dev/loop5
-@@ -1317,8 +1320,18 @@
- return EX_FAIL;
- }
-
-+ if (opt_encryption) {
-+#ifdef MCL_FUTURE
-+ if (mlockall(MCL_CURRENT | MCL_FUTURE)) {
-+ error(_("mount: couldn't lock into memory"));
-+ return EX_FAIL;
-+ }
-+#endif
-+ pwd = xgetpass(pfd, _("Password: "));
-+ }
-+
- loopcxt_init(&lc, 0);
-- /* loopcxt_enable_debug(&lc, 1); */
-+ /*loopcxt_enable_debug(&lc, 1);*/
-
- if (*loopdev && **loopdev)
- loopcxt_set_device(&lc, *loopdev); /* use loop=<devname> */
-@@ -1343,6 +1356,8 @@
- rc = loopcxt_set_offset(&lc, offset);
- if (!rc && sizelimit)
- rc = loopcxt_set_sizelimit(&lc, sizelimit);
-+ if (!rc && opt_encryption && pwd)
-+ loopcxt_set_encryption(&lc, opt_encryption, pwd);
- if (!rc)
- loopcxt_set_flags(&lc, loop_opts);
-
-@@ -1358,8 +1373,7 @@
- break; /* success */
-
- if (rc != -EBUSY) {
-- if (verbose)
-- printf(_("mount: failed setting up loop device\n"));
-+ error(_("mount: %s: failed setting up loop device: %m"), *loopfile);
- if (!opt_loopdev) {
- my_free(*loopdev);
- *loopdev = NULL;
-@@ -1399,9 +1413,15 @@
- }
- }
-
-- return 0;
-+ ret = 0;
- err:
-- return EX_FAIL;
-+ if (pwd) {
-+ char *p = pwd;
-+ while (*p)
-+ *p++ = '\0';
-+ free(pwd);
-+ }
-+ return ret;
- }
-
-
---- ./mount/Makefile.am.orig 2012-05-25 04:44:58.000000000 -0500
-+++ ./mount/Makefile.am 2012-08-02 12:04:14.958439138 -0500
-@@ -23,7 +23,8 @@
- $(top_srcdir)/lib/at.c \
- $(top_srcdir)/lib/sysfs.c \
- $(top_srcdir)/lib/loopdev.c \
-- $(top_srcdir)/lib/strutils.c
-+ $(top_srcdir)/lib/strutils.c \
-+ $(top_srcdir)/lib/xgetpass.c
-
- # generic flags for all programs
- # -- note that pkg-config autoconf macros (pkg.m4) does not differentiate