Add PR_SET_NO_NEW_PRIVS call back to capng_lock

This commit is contained in:
sgrubb 2014-05-07 10:12:49 -04:00
parent c8b3078055
commit 75cf882f36
2 changed files with 4 additions and 17 deletions

View File

@ -1,14 +0,0 @@
diff -urp libcap-ng-0.7.5.orig/src/cap-ng.c libcap-ng-0.7.5/src/cap-ng.c
--- libcap-ng-0.7.5.orig/src/cap-ng.c 2014-04-30 21:44:23.000000000 -0400
+++ libcap-ng-0.7.5/src/cap-ng.c 2014-04-30 22:04:31.225062310 -0400
@@ -710,10 +710,6 @@ int capng_lock(void)
1 << SECURE_NOROOT_LOCKED |
1 << SECURE_NO_SETUID_FIXUP |
1 << SECURE_NO_SETUID_FIXUP_LOCKED, 0, 0, 0);
-#ifdef PR_SET_NO_NEW_PRIVS
- if (prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0))
- return -1;
-#endif
if (rc)
return -1;
#endif

View File

@ -3,12 +3,11 @@
Summary: An alternate posix capabilities library
Name: libcap-ng
Version: 0.7.4
Release: 2%{?dist}
Release: 3%{?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.7.5-no-no_new_privs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: kernel-headers >= 2.6.11
@ -51,7 +50,6 @@ lets you set the file system based capabilities.
%prep
%setup -q
%patch1 -p1
%build
%configure --libdir=/%{_lib}
@ -113,6 +111,9 @@ rm -rf $RPM_BUILD_ROOT
%attr(0644,root,root) %{_mandir}/man8/*
%changelog
* Wed May 07 2014 Steve Grubb <sgrubb@redhat.com> 0.7.4-3
- Add PR_SET_NO_NEW_PRIVS call back to capng_lock
* Wed Apr 30 2014 Steve Grubb <sgrubb@redhat.com> 0.7.4-2
- Remove PR_SET_NO_NEW_PRIVS call in capng_lock