rpms/libcap-ng/F-13 libcap-ng-0.6.5-device.patch, NONE, 1.1 libcap-ng.spec, 1.14, 1.15
Steve Grubb
sgrubb at fedoraproject.org
Tue Jul 27 16:24:56 UTC 2010
Author: sgrubb
Update of /cvs/pkgs/rpms/libcap-ng/F-13
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv31934
Modified Files:
libcap-ng.spec
Added Files:
libcap-ng-0.6.5-device.patch
Log Message:
* Tue July 27 2010 Steve Grubb <sgrubb at redhat.com> 0.6.4-2
- filecap should only check regular files
libcap-ng-0.6.5-device.patch:
filecap.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--- NEW FILE libcap-ng-0.6.5-device.patch ---
diff -urp libcap-ng-0.6.5.orig/utils/filecap.c libcap-ng-0.6.5/utils/filecap.c
--- libcap-ng-0.6.5.orig/utils/filecap.c 2010-06-17 13:19:21.000000000 -0400
+++ libcap-ng-0.6.5/utils/filecap.c 2010-06-17 14:25:07.000000000 -0400
@@ -41,12 +41,15 @@ static void usage(void)
exit(1);
}
-static int check_file(const char *file,
- const struct stat *sb_unused __attribute__ ((unused)),
- int flag_unused __attribute__ ((unused)),
+static int check_file(const char *fpath,
+ const struct stat *sb,
+ int typeflag_unused __attribute__ ((unused)),
struct FTW *s_unused __attribute__ ((unused)))
{
- int fd = open(file, O_RDONLY);
+ if (S_ISREG(sb->st_mode) == 0)
+ return FTW_CONTINUE;
+
+ int fd = open(fpath, O_RDONLY);
if (fd >= 0) {
capng_results_t rc;
@@ -58,7 +61,7 @@ static int check_file(const char *file,
header = 1;
printf("%-20s capabilities\n", "file");
}
- printf("%s ", file);
+ printf("%s ", fpath);
if (rc == CAPNG_FULL)
printf("full");
else
@@ -68,7 +71,7 @@ static int check_file(const char *file,
}
close(fd);
}
- return 0;
+ return FTW_CONTINUE;
}
Index: libcap-ng.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libcap-ng/F-13/libcap-ng.spec,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- libcap-ng.spec 18 May 2010 19:06:48 -0000 1.14
+++ libcap-ng.spec 27 Jul 2010 16:24:56 -0000 1.15
@@ -3,11 +3,12 @@
Summary: An alternate posix capabilities library
Name: libcap-ng
Version: 0.6.4
-Release: 1%{?dist}
+Release: 2%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
URL: http://people.redhat.com/sgrubb/libcap-ng
Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
+Patch1: libcap-ng-0.6.5-device.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: kernel-headers >= 2.6.11
BuildRequires: libattr-devel
@@ -50,6 +51,7 @@ lets you set the file system based capab
%prep
%setup -q
+%patch1 -p1
%build
%configure --libdir=/%{_lib}
@@ -108,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT
%attr(0644,root,root) %{_mandir}/man8/*
%changelog
+* Tue July 27 2010 Steve Grubb <sgrubb at redhat.com> 0.6.4-2
+- filecap should only check regular files
+
* Tue May 18 2010 Steve Grubb <sgrubb at redhat.com> 0.6.4-1
- New upstream release fixing multi-threading issue
More information about the scm-commits
mailing list