SHA256
1
0
forked from pool/permissions
permissions/permissions.spec
Matthias Gerstner c1a2fada58 Accepting request 780264 from home:mkraus:branches:Base:System
- Update to version 20200228:
  * chkstat: fix readline() on platforms with unsigned char

- Update to version 20200227:
  * remove capability whitelisting for radosgw
  * whitelist ceph log directory (bsc#1150366)
  * adjust testsuite to post CVE-2020-8013 link handling
  * testsuite: add option to not mount /proc
  * do not follow symlinks that are the final path element: CVE-2020-8013
  * add a test for symlinked directories
  * fix relative symlink handling
  * include cpp compat headers, not C headers
  * Move permissions and permissions.* except .local to /usr/share/permissions
  * regtest: fix the static PATH list which was missing /usr/bin
  * regtest: also unshare the PID namespace to support /proc mounting
  * regtest: bindMount(): explicitly reject read-only recursive mounts
  * Makefile: force remove upon clean target to prevent bogus errors
  * regtest: by default automatically (re)build chkstat before testing
  * regtest: add test for symlink targets
  * regtest: make capability setting tests optional
  * regtest: fix capability assertion helper logic
  * regtests: add another test case that catches set*id or caps in world-writable sub-trees
  * regtest: add another test that catches when privilege bits are set for special files
  * regtest: add test case for user owned symlinks
  * regtest: employ subuid and subgid feature in user namespace
  * regtest: add another test case that covers unknown user/group config
  * regtest: add another test that checks rejection of insecure mixed-owner paths
  * regtest: add test that checks for rejection of world-writable paths
  * regtest: add test for detection of unexpected parent directory ownership
  * regtest: add further helper functions, allow access to main instance

OBS-URL: https://build.opensuse.org/request/show/780264
OBS-URL: https://build.opensuse.org/package/show/Base:System/permissions?expand=0&rev=252
2020-03-02 13:50:40 +00:00

134 lines
4.0 KiB
RPMSpec

#
# spec file for package permissions
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define VERSION_DATE 20200228
Name: permissions
Version: %{VERSION_DATE}.%{suse_version}
Release: 0
Summary: SUSE Linux Default Permissions
# Maintained in github by the security team.
License: GPL-2.0-or-later
Group: Productivity/Security
URL: http://github.com/openSUSE/permissions
Source: permissions-%{VERSION_DATE}.tar.xz
Source1: fix_version.sh
BuildRequires: gcc-c++
BuildRequires: libcap-devel
BuildRequires: libcap-progs
Requires: chkstat
Requires: permissions-config
Recommends: permissions-doc
Provides: aaa_base:%{_datadir}/permissions
%prep
%setup -q -n permissions-%{VERSION_DATE}
%build
make %{?_smp_mflags} CFLAGS="-W -Wall %{optflags}" FSCAPS_DEFAULT_ENABLED=0
%install
%make_install fillupdir=%{_fillupdir}
# regression tests disabled for the moment, needs adjustment for the new /usr/share world
#%check
#tests/regtest.py
%description
Permission settings of files and directories depending on the local
security settings. The local security setting ("easy", "secure", or "paranoid")
can be configured in /etc/sysconfig/security.
This package does not contain files, it just requires the necessary packages.
%files
%package doc
Summary: SUSE Linux Default Permissions documentation
Group: Documentation/Man
Version: %{suse_version}_%{VERSION_DATE}
Release: 0
%description doc
Documentation for the permission files /usr/share/permissions/permissions*.
%files doc
%{_mandir}/man5/permissions.5%{ext_man}
%package config
Summary: SUSE Linux Default Permissions config files
Group: Productivity/Security
Version: %{suse_version}_%{VERSION_DATE}
Release: 0
Requires(post): %fillup_prereq
Requires(post): chkstat
#!BuildIgnore: group(trusted)
Requires(pre): group(trusted)
%description config
The actual permissions configuration files, /usr/share/permissions/permission.*.
%files config
%defattr(644, root, root, 755)
%dir %{_datadir}/permissions
%{_datadir}/permissions/permissions
%{_datadir}/permissions/permissions.easy
%{_datadir}/permissions/permissions.secure
%{_datadir}/permissions/permissions.paranoid
%config(noreplace) %{_sysconfdir}/permissions.local
%{_fillupdir}/sysconfig.security
%post config
%{fillup_only -n security}
# apply all potentially changed permissions
%{_bindir}/chkstat --system || :
%package -n chkstat
Summary: SUSE Linux Default Permissions tool
Group: Productivity/Security
Version: %{suse_version}_%{VERSION_DATE}
Release: 0
%description -n chkstat
Tool to check and set file permissions.
%files -n chkstat
%{_bindir}/chkstat
%{_mandir}/man8/chkstat.8%{ext_man}
%package -n permissions-zypp-plugin
BuildArch: noarch
Requires: permissions = %{VERSION_DATE}.%{suse_version}
Requires: python3-zypp-plugin
Requires: libzypp(plugin:commit) = 1
Summary: A zypper commit plugin for calling chkstat
Group: Productivity/Security
%description -n permissions-zypp-plugin
This package contains a plugin for zypper that calls `chkstat --system` after
new packages have been installed. This is helpful for maintaining custom
entries in /etc/permissions.local.
%files -n permissions-zypp-plugin
%dir /usr/lib/zypp
%dir /usr/lib/zypp/plugins
%dir /usr/lib/zypp/plugins/commit
/usr/lib/zypp/plugins/commit/permissions.py
%changelog