# # spec file for package uid_wrapper # # Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: uid_wrapper Version: 1.0.2 Release: 0 Summary: A wrapper for privilege seperation License: GPL-3.0+ Group: Development/Libraries/C and C++ Url: http://cwrap.org/ Source0: https://ftp.samba.org/pub/cwrap/%{name}-%{version}.tar.gz Patch0: uid_wrapper-1.0.2-fix_aarch64.patch BuildRequires: cmake BuildRequires: libcmocka-devel %description Some projects like a file server need privilege separation to be able to switch to the connnection user and do file operations. uid_wrapper convincingly lies to the application letting it believe it is operating as root and even switching betwen uids and gids as needed. To use it set the following environment variables: LD_PRELOAD=libuid_wrapper.so UID_WRAPPER=1 This package doesn't have a devel package cause this project is for development/testing. %prep %setup -q %patch0 -p1 -b .uid_wrapper-1.0.2-fix_aarch64.patch %build # CMAKE_SKIP_RPATH:BOOL=OFF is need to run the tests! %cmake \ -DCMAKE_SKIP_RPATH:BOOL=OFF \ -DUNIT_TESTING=ON \ %{_builddir}/%{name}-%{version} %__make %{?jobs:-j%jobs} VERBOSE=1 %install pushd build %makeinstall popd %check pushd build %__make test popd %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc AUTHORS README ChangeLog COPYING %{_libdir}/libuid_wrapper.so* %dir %{_libdir}/cmake %dir %{_libdir}/cmake/uid_wrapper %{_libdir}/cmake/uid_wrapper/uid_wrapper-config-version.cmake %{_libdir}/cmake/uid_wrapper/uid_wrapper-config.cmake %dir %{_libdir}/pkgconfig %{_libdir}/pkgconfig/uid_wrapper.pc %{_mandir}/man1/uid_wrapper.1* %changelog