![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package util-linux
checked in at Wed Aug 29 22:46:50 CEST 2007.
--------
--- util-linux/util-linux.changes 2007-08-28 16:42:46.000000000 +0200
+++ /mounts/work_src_done/STABLE/util-linux/util-linux.changes 2007-08-29 12:26:28.000000000 +0200
@@ -1,0 +2,5 @@
+Wed Aug 29 12:22:21 CEST 2007 - mkoenig@suse.de
+
+- fix fd leaks in previous patch
+
+-------------------------------------------------------------------
New:
----
util-linux-2.13-mount_fd_leak.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ util-linux.spec ++++++
--- /var/tmp/diff_new_pack.j29520/_old 2007-08-29 22:46:27.000000000 +0200
+++ /var/tmp/diff_new_pack.j29520/_new 2007-08-29 22:46:27.000000000 +0200
@@ -21,7 +21,7 @@
Group: System/Base
Autoreqprov: on
Version: 2.12r+2.13rc2+git20070725
-Release: 14
+Release: 16
%define upver 2.13rc2+git20070725
Summary: A collection of basic system utilities
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-ng-%upver.tar.bz2
@@ -52,27 +52,28 @@
# add hostid
Patch1: util-linux-2.12-misc_utils_hostid.patch
# 104405 - mount -a doesn't work with hotpluggable devices
-Patch16: util-linux-mount_opt_nofail.patch
+Patch2: util-linux-mount_opt_nofail.patch
# 176582 - If the user doesn't specify -t <fstype> mount.fstype will never be called
#TODO: check alternative upstream fix
#Patch96: util-linux-2.12r-mount_external_prog_on_guess.patch
# 160822 - fix for 153657
-Patch29: util-linux-2.12r-fdisk_cyl.patch
+Patch3: util-linux-2.12r-fdisk_cyl.patch
# 238687 - let mkfs tools open block devices with O_EXCL
-Patch34: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch
+Patch4: util-linux-2.12r-disk_utils_mkfs_open_exclusive.patch
# 241372 - remove legacy warnings from fdisk
-Patch35: util-linux-2.12r-fdisk_remove_bogus_warnings.patch
+Patch5: util-linux-2.12r-fdisk_remove_bogus_warnings.patch
# 254437 - swapon should automatically reset the suspend signature
# TODO: Needs to be ported to new version
Patch38: util-linux-2.12r-mount_swapon_swsuspend_resume.patch
# suse48633 - util-linux on x86_64 does not contain "rdev" and "vidmode"
-Patch45: util-linux-2.13-sys_utils_build_rdev_x86_64.patch
+Patch6: util-linux-2.13-sys_utils_build_rdev_x86_64.patch
# 297172 - mount does not free loop devices if it fails
-Patch46: util-linux-2.13-loop.patch
-Patch47: util-linux-2.13-mount_create_mtab.patch
-Patch48: util-linux-2.13-schedutils_error_handling.patch
+Patch7: util-linux-2.13-loop.patch
+Patch8: util-linux-2.13-mount_create_mtab.patch
+Patch9: util-linux-2.13-schedutils_error_handling.patch
# 304861 - support password hashing and key length
-Patch49: cryptsetup-2.13-crypto.diff
+Patch10: cryptsetup-2.13-crypto.diff
+Patch11: util-linux-2.13-mount_fd_leak.patch
##
##
## adjtimex
@@ -108,19 +109,17 @@
%prep
%setup -q -a 9 -b 10 -b 11 -b 12 -b 13 -n %name-ng-%upver
%patch1 -p1
-%patch16 -p1
-#%patch26
-%patch29 -p1
-#%patch30 -p1
-#%patch32 -p1
-%patch34 -p1
-%patch35 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
#%patch38 -p1
-%patch45 -p1
-%patch46 -p1
-%patch47 -p1
-%patch48 -p1
-%patch49 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
#
cd adjtimex-*
%patch50 -p1
@@ -561,6 +560,8 @@
#%endif
%changelog
+* Wed Aug 29 2007 - mkoenig@suse.de
+- fix fd leaks in previous patch
* Tue Aug 28 2007 - lnussel@suse.de
- add support for specifying the key length and password hash
algorithm [#304861]
++++++ cryptsetup-2.13-crypto.diff ++++++
--- /var/tmp/diff_new_pack.j29520/_old 2007-08-29 22:46:27.000000000 +0200
+++ /var/tmp/diff_new_pack.j29520/_new 2007-08-29 22:46:27.000000000 +0200
@@ -130,7 +130,7 @@
mode = (*loopro ? O_RDONLY : O_RDWR);
if ((ffd = open(file, mode)) < 0) {
-@@ -297,15 +331,39 @@ set_loop(const char *device, const char
+@@ -297,15 +331,43 @@ set_loop(const char *device, const char
memset(&loopinfo64, 0, sizeof(loopinfo64));
@@ -143,6 +143,8 @@
+ // a hint for suse users
+ if(!strcmp(encryption, "twofishSL92")) {
+ fprintf(stderr, _("twofishSL92 is not supported via cryptoloop, please use dm-crypt to access the volume\n"));
++ close(fd);
++ close(ffd);
+ return 1;
+ }
if (digits_only(encryption)) {
@@ -167,13 +169,15 @@
+ fprintf(stderr, _("please either specify '%s%d' or -e '%s' -k '%d'\n"),
+ loopinfo64.lo_crypt_name, loopinfo64.lo_encrypt_key_size<<3,
+ loopinfo64.lo_crypt_name, keysz);
++ close(fd);
++ close(ffd);
+ return 1;
+ }
+ loopinfo64.lo_encrypt_type = LO_CRYPT_CRYPTOAPI;
}
}
-@@ -325,20 +383,57 @@ set_loop(const char *device, const char
+@@ -325,20 +387,64 @@ set_loop(const char *device, const char
}
#endif
@@ -194,8 +198,11 @@
- xstrncpy(loopinfo64.lo_encrypt_key, pass, LO_KEY_SIZE);
+
+ pass = xgetpass(pfd, _("Password: "));
-+ if(!pass)
++ if(!pass) {
++ close(fd);
++ close(ffd);
+ return 1;
++ }
+
+ // set default hash functions, loop-AES compatible
+ if(loopinfo64.lo_encrypt_type == LO_CRYPT_CRYPTOAPI) {
@@ -211,6 +218,8 @@
+ if(!keysz) {
+ if(verbose)
+ fprintf(stderr, _("please specify a key length\n"));
++ close(fd);
++ close(ffd);
+ return 1;
+ }
+ loopinfo64.lo_encrypt_key_size = keysz>>3;
@@ -229,6 +238,8 @@
+ hfunc = phash_none;
+ } else {
+ fprintf(stderr, _("unsupported hash method '%s'\n"), phash);
++ close(fd);
++ close(ffd);
+ return 1;
+ }
+ }
@@ -243,7 +254,7 @@
}
if (ioctl(fd, LOOP_SET_FD, ffd) < 0) {
-@@ -416,8 +511,8 @@ mutter(void) {
+@@ -416,8 +522,8 @@ mutter(void) {
}
int
@@ -254,7 +265,7 @@
mutter();
return 1;
}
-@@ -456,7 +551,13 @@ usage(void) {
+@@ -456,7 +562,13 @@ usage(void) {
" %1$s [ options ] {-f|--find|loop_device} file # setup\n"
"\nOptions:\n"
" -e | --encryption <type> enable data encryption with specified
participants (1)
-
root@Hilbert.suse.de