Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mika/sssd
  • guillem/debian-pkg-sssd
  • john.veitch/sssd
  • jgullberg/sssd
  • gioele/sssd
  • oktay454/sssd
  • sergiodj/sssd
  • 3v1n0/sssd
  • jfalk-guest/sssd
  • sathieu/sssd
  • dpward/sssd
  • sssd-team/sssd
  • ahasenack/sssd
  • jbicha/sssd
  • yrro-guest/sssd
15 results
Show changes
Commits on Source (3)
......@@ -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.
......
automount database
automount database-add
passwd last sss
group last sss
......
sudoers database-require
sudoers last sss
#!/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
#!/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