[Pkg-sssd-devel] [Git][sssd-team/sssd][master] 3 commits: d/libnss-sss.nss: Update to `database-add`
Timo Aaltonen (@tjaalton)
gitlab at salsa.debian.org
Mon Feb 20 08:06:54 GMT 2023
Timo Aaltonen pushed to branch master at Debian SSSD packaging / sssd
Commits:
b08bfaa1 by Gioele Barabucci at 2023-02-18T01:06:31+01:00
d/libnss-sss.nss: Update to `database-add`
The `database` directive is called `database-add` since dh-nss 1.7.
- - - - -
becf043d by Gioele Barabucci at 2023-02-18T01:06:31+01:00
d/libsss-sudo.nss: Install `sss` service for sudoers via dh-nss
- - - - -
28b2b997 by Gioele Barabucci at 2023-02-18T01:06:31+01:00
d/libsss-sudo.post{inst,rm}: Remove now that the services are installed via dh-nss
- - - - -
5 changed files:
- debian/control
- debian/libnss-sss.nss
- + debian/libsss-sudo.nss
- − debian/libsss-sudo.postinst
- − debian/libsss-sudo.postrm
Changes:
=====================================
debian/control
=====================================
@@ -354,7 +354,7 @@ Description: SID based lookups library for SSSD -- development files
Package: libsss-sudo
Section: libs
Architecture: any
-Depends: ${misc:Depends}, ${shlibs:Depends}
+Depends: libnss-sudo, ${misc:Depends}, ${shlibs:Depends}
Description: Communicator library for sudo
Utility library to allow communication between sudo and SSSD for caching
sudo rules by SSSD.
=====================================
debian/libnss-sss.nss
=====================================
@@ -1,4 +1,4 @@
-automount database
+automount database-add
passwd last sss
group last sss
=====================================
debian/libsss-sudo.nss
=====================================
@@ -0,0 +1,3 @@
+sudoers database-require
+
+sudoers last sss
=====================================
debian/libsss-sudo.postinst deleted
=====================================
@@ -1,40 +0,0 @@
-#!/bin/sh
-
-set -e
-
-#DEBHELPER#
-
-# This code was taken from libnss-myhostname, which got it from nss-mdns:
-
-log() {
- echo "$*"
-}
-
-# try to insert sss entries to the sudoers line in /etc/nsswitch.conf to
-# automatically enable libsss-sudo support; do not change the configuration
-# if the lines already references some sss lookups
-insert_nss_entry() {
- log "Checking NSS setup..."
- # abort if /etc/nsswitch.conf does not exist
- if ! [ -e /etc/nsswitch.conf ]; then
- log "Could not find /etc/nsswitch.conf."
- return
- fi
-
- if grep -q ^sudoers /etc/nsswitch.conf; then
- # append 'sss' to the end of the line if it's not found already
- sed -i --regexp-extended '
- /^(sudoers):/ {
- /\bsss\b/! s/$/ sss/
- }
- ' /etc/nsswitch.conf
- else
- echo "sudoers: files sss" >> /etc/nsswitch.conf
- fi
-}
-
-if [ "$1" = configure ] && [ -z "$2" ]; then
- insert_nss_entry
-fi
-
-exit 0
=====================================
debian/libsss-sudo.postrm deleted
=====================================
@@ -1,43 +0,0 @@
-#!/bin/sh
-set -e
-
-#DEBHELPER#
-
-# This code was taken from libnss-myhostname, which got it from nss-mdns:
-
-log() {
- echo "$*"
-}
-
-remove_nss_entry() {
- log "Checking NSS setup..."
- # abort if /etc/nsswitch.conf does not exist
- if ! [ -e /etc/nsswitch.conf ]; then
- log "Could not find /etc/nsswitch.conf."
- return
- fi
- sed -i --regexp-extended '
- /^(sudoers):/ {
- s/\bsss\b//g
- s/[[:space:]]+$//
- }
- ' /etc/nsswitch.conf
-
- # delete sudoers line if only default entry left"
- if ! [ -z "grep \"^sudoers: files$\" /etc/nsswitch.conf" ]; then
- sed -i /^sudoers:/d /etc/nsswitch.conf
- fi
-}
-
-case "$1" in
- remove|purge)
- remove_nss_entry
- ;;
- upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
View it on GitLab: https://salsa.debian.org/sssd-team/sssd/-/compare/083934b4824e48bb6c1649f847e16f5621bf9770...28b2b9976414935e0a233da381bdf6b572916708
--
View it on GitLab: https://salsa.debian.org/sssd-team/sssd/-/compare/083934b4824e48bb6c1649f847e16f5621bf9770...28b2b9976414935e0a233da381bdf6b572916708
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-sssd-devel/attachments/20230220/d4d06130/attachment-0001.htm>
More information about the Pkg-sssd-devel
mailing list