File authbind.spec of Package authbind

# spec file for package authbind
# Copyright (c) 2018 SUSE LINUX 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

%define args prefix="%{_prefix}" etc_dir="%{_sysconfdir}/authbind" lib_dir="%{_libdir}/authbind" libexec_dir="%{_libexecdir}/authbind"
Name:           authbind
Version:        2.1.2
Release:        0
Summary:        Authentication socket binding to priviledged ports without root
License:        GPL-2.0-or-later
Group:          Productivity/Networking/Security
Patch:          fix-Makefile.patch
# FIXME: use proper Requires(pre/post/preun/...)
PreReq:         permissions

Authbind allows a program which does not or should not run as
root to bind to low-numbered ports in a controlled way.

%setup -q -n authbind
%patch -p1

%define _lto_cflags %{nil}
%make_build OPTIMISE="%{optflags} -fPIE" LDFLAGS="-g -pie" LD="ld --build-id" %{args}

%make_install install_man %{args}

# the actual settings for helper will come from security whitelisting in the permissions package.
%set_permissions %{_libexecdir}/authbind/helper

%verify_permissions -e %{_libexecdir}/authbind/helper

%dir %{_libdir}/authbind
%dir %{_libexecdir}/authbind
%verify(not mode) %attr(4755,root,root) %{_libexecdir}/authbind/helper

%dir %{_sysconfdir}/authbind
%dir %{_sysconfdir}/authbind/byport
%dir %{_sysconfdir}/authbind/byaddr
%dir %{_sysconfdir}/authbind/byuid


openSUSE Build Service is sponsored by