commit 630eced9a782b7d572a85c253ccc61e052128775 Author: ultra_planet Date: Fri Nov 29 16:59:34 2019 +0800 package init diff --git a/uid_wrapper-1.2.4.tar.gz b/uid_wrapper-1.2.4.tar.gz new file mode 100644 index 0000000..c1fe0e2 Binary files /dev/null and b/uid_wrapper-1.2.4.tar.gz differ diff --git a/uid_wrapper.spec b/uid_wrapper.spec new file mode 100644 index 0000000..65b5423 --- /dev/null +++ b/uid_wrapper.spec @@ -0,0 +1,65 @@ +Name: uid_wrapper +Version: 1.2.4 +Release: 4 +Summary: A wrapper for privilege separation +License: GPLv3+ +URL: http://cwrap.org/ +Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz + +BuildRequires: cmake libcmocka-devel + +%description +Some projects, such as a file server, need privilege separation to be able to switch +to the user who owns the files and do file operations on their behalf. uid_wrapper +convincingly lies to the application, letting it believe it is operating as root and +even switching between UIDs and GIDs as needed. You can start any application making +it believe it is running as root. + +If you load the uid_wrapper and enable it with setting UID_WRAPPER=1 all setuid() and +setgid() calls will work, even as a normal user. + +It is possible to start your application as fake root with setting UID_WRAPPER_ROOT=1. + +Enable debugging of uid_wrapper itself by setting the UID_WRAPPER_DEBUGLEVEL variable. + +%package help +Summary: Help package for %{name} + +%description help +This package contains some man help files for %{name}. + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build +install -d obj +cd obj +%cmake -DUNIT_TESTING=ON %{_builddir}/%{name}-%{version} +%make_build VERBOSE=1 + +%install +cd obj +%make_install + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%check +cd obj +make test || find Testing -name "*.log" | xargs cat + +%files +%doc AUTHORS README ChangeLog COPYING +%{_libdir}/libuid_wrapper.so* +%{_libdir}/cmake/uid_wrapper/* +%{_libdir}/pkgconfig/uid_wrapper.pc + +%files help +%{_mandir}/man1/uid_wrapper.1* + +%changelog +* Wed Nov 20 2019 lingsheng - 1.2.4-4 +- Package init