- Update license tag

- Fix up O_CREAT opens with no mode
- Add gawk to buildrequires
This commit is contained in:
Eric Sandeen 2007-08-25 00:04:28 +00:00
parent 272539b5a0
commit c4f4944e39
2 changed files with 126 additions and 2 deletions

View File

@ -0,0 +1,120 @@
Index: xfsdump/inventory/inv_fstab.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_fstab.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xfsdump/inventory/inv_fstab.c 24 May 2006 06:08:55 -0000 1.8
+++ xfsdump/inventory/inv_fstab.c 24 Aug 2007 19:36:15 -0000 1.9
@@ -96,7 +96,7 @@
if ( errno != ENOENT ) {
return -1;
}
- if ((fd = open( INV_FSTAB, INV_OFLAG(forwhat) | O_CREAT ))
+ if ((fd = open( INV_FSTAB, INV_OFLAG(forwhat) | O_CREAT, S_IRUSR|S_IWUSR ))
< 0 ) {
INV_PERROR ( INV_FSTAB );
return -1;
Index: xfsdump/inventory/inv_idx.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_idx.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xfsdump/inventory/inv_idx.c 24 May 2006 06:08:55 -0000 1.8
+++ xfsdump/inventory/inv_idx.c 24 Aug 2007 19:36:15 -0000 1.9
@@ -257,7 +257,7 @@
the db for SEARCH_ONLY. */
ASSERT( forwhat != INV_SEARCH_ONLY );
- if ((fd = open ( fname , INV_OFLAG(forwhat) | O_CREAT ) ) < 0 ) {
+ if ((fd = open ( fname , INV_OFLAG(forwhat) | O_CREAT, S_IRUSR|S_IWUSR ) ) < 0 ) {
INV_PERROR ( fname );
return INV_TOKEN_NULL;
}
Index: xfsdump/inventory/inv_mgr.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_mgr.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- xfsdump/inventory/inv_mgr.c 24 May 2006 06:08:55 -0000 1.10
+++ xfsdump/inventory/inv_mgr.c 24 Aug 2007 19:36:15 -0000 1.11
@@ -692,7 +692,7 @@
{
if ( invlock_fd == -1 ) {
if (( invlock_fd = open( INV_LOCKFILE,
- O_RDONLY | O_CREAT )) < 0 ) {
+ O_RDONLY | O_CREAT, S_IRUSR|S_IWUSR )) < 0 ) {
INV_PERROR( INV_LOCKFILE );
return BOOL_FALSE;
}
Index: xfsdump/inventory/inv_oref.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_oref.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xfsdump/inventory/inv_oref.c 24 May 2006 06:08:55 -0000 1.8
+++ xfsdump/inventory/inv_oref.c 24 Aug 2007 19:36:15 -0000 1.9
@@ -429,7 +429,7 @@
int stobjfd, fd;
inv_idbtoken_t tok;
- if ((fd = open ( fname , O_RDWR | O_CREAT ) ) < 0 ) {
+ if ((fd = open ( fname , O_RDWR | O_CREAT, S_IRUSR|S_IWUSR ) ) < 0 ) {
INV_PERROR ( fname );
return INV_ERR;
}
Index: xfsdump/inventory/inv_stobj.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/inventory/inv_stobj.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- xfsdump/inventory/inv_stobj.c 24 May 2006 06:08:55 -0000 1.12
+++ xfsdump/inventory/inv_stobj.c 24 Aug 2007 19:36:15 -0000 1.13
@@ -527,7 +527,7 @@
#endif
/* create the new storage object */
- if (( fd = open( fname, INV_OFLAG(forwhat) | O_EXCL | O_CREAT )) < 0 ) {
+ if (( fd = open( fname, INV_OFLAG(forwhat) | O_EXCL | O_CREAT, S_IRUSR|S_IWUSR )) < 0 ) {
INV_PERROR ( fname );
memset( fname, 0, INV_STRLEN );
return -1;
@@ -1083,7 +1083,7 @@
#ifdef INVT_DELETION
{
- int tmpfd = open( "moids", O_RDWR | O_CREAT );
+ int tmpfd = open( "moids", O_RDWR | O_CREAT, S_IRUSR|S_IWUSR );
u_int j;
invt_mediafile_t *mmf = s->mfiles;
for (i=0; i< s->ses->s_cur_nstreams; i++ ) {
Index: xfsdump/invutil/invidx.c
===================================================================
RCS file: /cvs/xfs-cmds/xfsdump/invutil/invidx.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- xfsdump/invutil/invidx.c 24 May 2006 06:08:55 -0000 1.7
+++ xfsdump/invutil/invidx.c 24 Aug 2007 19:36:15 -0000 1.8
@@ -275,7 +275,7 @@
return 0;
}
- new_fd = open(dst_idxfile, O_CREAT|O_RDWR);
+ new_fd = open(dst_idxfile, O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
if(new_fd < 0) {
put_error("Error: unable to open inventory index file");
return 0;
@@ -616,7 +616,7 @@
invt_sescounter_t sescnt;
/* create the new storage object */
- if (( fd = open( fname, O_RDWR | O_EXCL | O_CREAT )) < 0 ) {
+ if (( fd = open( fname, O_RDWR | O_EXCL | O_CREAT, S_IRUSR|S_IWUSR )) < 0 ) {
return -1;
}

View File

@ -9,10 +9,11 @@ Group: System Environment/Base
URL: http://oss.sgi.com/projects/xfs/ URL: http://oss.sgi.com/projects/xfs/
Source0: ftp://oss.sgi.com/projects/xfs/download/cmd_tars/%{name}_%{version}-1.tar.gz Source0: ftp://oss.sgi.com/projects/xfs/download/cmd_tars/%{name}_%{version}-1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf, libtool, gettext BuildRequires: autoconf, libtool, gettext, gawk
BuildRequires: xfsprogs-devel, e2fsprogs-devel, libattr-devel ncurses-devel BuildRequires: xfsprogs-devel, e2fsprogs-devel, libattr-devel ncurses-devel
Requires: xfsprogs >= 2.6.30, attr >= 2.0.0 Requires: xfsprogs >= 2.6.30, attr >= 2.0.0
Patch1: fix-open-O_CREAT-perms.patch
%description %description
The xfsdump package contains xfsdump, xfsrestore and a number of The xfsdump package contains xfsdump, xfsrestore and a number of
@ -33,6 +34,7 @@ subtrees may be restored from full or partial backups.
%prep %prep
%setup -q %setup -q
%patch1 -p1
%build %build
autoconf autoconf
@ -62,8 +64,10 @@ rm -rf $RPM_BUILD_ROOT
/sbin/* /sbin/*
%changelog %changelog
* Thu Aug 16 2007 Eric Sandeen <sandeen@redhat.com> - 2.2.45-3 * Fri Aug 24 2007 Eric Sandeen <sandeen@redhat.com> - 2.2.45-3
- Update license tag - Update license tag
- Fix up O_CREAT opens with no mode
- Add gawk to buildrequires
* Tue Jun 19 2007 Eric Sandeen <sandeen@redhat.com> - 2.2.45-2 * Tue Jun 19 2007 Eric Sandeen <sandeen@redhat.com> - 2.2.45-2
- Remove readline-devel & libtermcap-devel BuildRequires - Remove readline-devel & libtermcap-devel BuildRequires