1
0
forked from pool/util-linux
OBS User unknown 2007-02-02 14:55:36 +00:00 committed by Git OBS Bridge
parent cd951ec78c
commit aa477c8c9f
3 changed files with 57 additions and 2 deletions

View File

@ -0,0 +1,39 @@
Index: util-linux-2.12r/disk-utils/mkswap.c
===================================================================
--- util-linux-2.12r.orig/disk-utils/mkswap.c
+++ util-linux-2.12r/disk-utils/mkswap.c
@@ -645,7 +645,7 @@ main(int argc, char ** argv) {
usage();
}
- DEV = open(device_name,O_RDWR);
+ DEV = open(device_name, O_RDWR | O_EXCL);
if (DEV < 0 || fstat(DEV, &statbuf) < 0) {
perror(device_name);
exit(1);
Index: util-linux-2.12r/disk-utils/mkfs.minix.c
===================================================================
--- util-linux-2.12r.orig/disk-utils/mkfs.minix.c
+++ util-linux-2.12r/disk-utils/mkfs.minix.c
@@ -699,7 +699,7 @@ main(int argc, char ** argv) {
tmp += dirsize;
*(short *)tmp = 2;
strcpy(tmp+2,".badblocks");
- DEV = open(device_name,O_RDWR );
+ DEV = open(device_name,O_RDWR | O_EXCL);
if (DEV<0)
die(_("unable to open %s"));
if (fstat(DEV,&statbuf)<0)
Index: util-linux-2.12r/disk-utils/mkfs.bfs.c
===================================================================
--- util-linux-2.12r.orig/disk-utils/mkfs.bfs.c
+++ util-linux-2.12r/disk-utils/mkfs.bfs.c
@@ -170,7 +170,7 @@ main(int argc, char *argv[]) {
if (!S_ISBLK(statbuf.st_mode))
fatal(_("%s is not a block special device"), device);
- fd = open(device, O_RDWR);
+ fd = open(device, O_RDWR | O_EXCL);
if (fd == -1) {
perror(device);
fatal(_("cannot open %s"), device);

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Feb 2 13:27:31 CET 2007 - mkoenig@suse.de
- do not use O_EXCL for mkfs.cramfs [#241466]
-------------------------------------------------------------------
Wed Jan 31 12:06:55 CET 2007 - mkoenig@suse.de
- let mkfs tools open with O_EXCL [#238687]
-------------------------------------------------------------------
Tue Dec 12 11:04:07 CET 2006 - mkoenig@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package util-linux (Version 2.12r)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -20,7 +20,7 @@ License: BSD License and BSD-like, GNU General Public License (GPL)
Group: System/Base
Autoreqprov: on
Version: 2.12r
Release: 64
Release: 70
Summary: A collection of basic system utilities
Source: ftp://ftp.kernel.org/pub/linux/utils/util-linux/%name-%version.tar.bz2
Source2: nologin.c
@ -108,6 +108,7 @@ Patch106: util-linux-2.12r-partx.patch
Patch107: util-linux-2.12r-mkswap_fix.patch
Patch108: util-linux-2.12r-nfs_remount_options.patch
Patch109: util-linux-2.12r-losetup_password.patch
Patch110: util-linux-2.12r-mkfs_open_exclusive.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq %fillup_prereq /bin/sed
@ -181,6 +182,7 @@ cd -
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
# setctsid
cp %{S:22} %{S:23} .
# nologin and guessfstype
@ -614,6 +616,10 @@ fi
%endif
%changelog -n util-linux
* Fri Feb 02 2007 - mkoenig@suse.de
- do not use O_EXCL for mkfs.cramfs [#241466]
* Wed Jan 31 2007 - mkoenig@suse.de
- let mkfs tools open with O_EXCL [#238687]
* Tue Dec 12 2006 - mkoenig@suse.de
- provide different return codes for losetup with encryption
for empty and too short passwords. [#197493]