583ff2a367
This is a special library for creating testing environments. OBS-URL: https://build.opensuse.org/request/show/222160 OBS-URL: https://build.opensuse.org/package/show/devel:tools/uid_wrapper?expand=0&rev=1
84 lines
2.1 KiB
RPMSpec
84 lines
2.1 KiB
RPMSpec
#
|
|
# 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.1
|
|
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
|
|
|
|
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
|
|
|
|
%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
|
|
%{_libdir}/cmake/uid_wrapper-config-version.cmake
|
|
%{_libdir}/cmake/uid_wrapper-config.cmake
|
|
%dir %{_libdir}/pkgconfig
|
|
%{_libdir}/pkgconfig/uid_wrapper.pc
|
|
|
|
%changelog
|