[packages/gpart] Add missing third argument to open() (patch from Gentoo)

megabajt megabajt at pld-linux.org
Sat Feb 16 11:41:02 CET 2013


commit 29dd6e1d70a718acf0cdd2915c55e4a9ce78e8d3
Author: Marcin Banasiak <marcin.banasiak at gmail.com>
Date:   Sat Feb 16 11:38:18 2013 +0100

    Add missing third argument to open() (patch from Gentoo)

 gpart-openmode.patch | 11 +++++++++++
 gpart.spec           |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/gpart.spec b/gpart.spec
index bed0c26..485530a 100644
--- a/gpart.spec
+++ b/gpart.spec
@@ -16,6 +16,7 @@ Patch3:		gpart-0.1h-reiserfs-3.6.patch.gz
 # Patch3-md5:	ed479abcb1d7612669c4275a1c445085
 Patch4:		%{name}-x86_64.patch
 Patch5:		%{name}-l64seek.patch
+Patch6:		%{name}-openmode.patch
 URL:		http://www.stud.uni-hannover.de/user/76201/gpart/
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -43,6 +44,7 @@ ela esteja danificada.
 %patch3 -p2
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 %{__make} OPT="%{rpmcflags}"
diff --git a/gpart-openmode.patch b/gpart-openmode.patch
new file mode 100644
index 0000000..ca13cc9
--- /dev/null
+++ b/gpart-openmode.patch
@@ -0,0 +1,11 @@
+--- gpart.orig/src/gpart.c	2008-10-19 15:06:06.000000000 +0000
++++ gpart/src/gpart.c	2008-11-25 07:34:47.000000000 +0000
+@@ -1221,7 +1221,7 @@ static int make_mbr_backup(disk_desc *d,
+ {
+ 	int		fd, ret = 0;
+ 
+-	if ((fd = open(bfile,O_WRONLY|O_CREAT)) < 0)
++	if ((fd = open(bfile,O_WRONLY|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0)
+ 		return (ret);
+ 
+ 	if (write(fd,d->d_pt.t_boot,512) == 512)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gpart.git/commitdiff/29dd6e1d70a718acf0cdd2915c55e4a9ce78e8d3



More information about the pld-cvs-commit mailing list