diff options
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/libnss-tacplus.postinst | 15 | ||||
-rw-r--r-- | debian/libnss-tacplus.prerm | 13 |
3 files changed, 29 insertions, 8 deletions
diff --git a/debian/changelog b/debian/changelog index 6b20592..b24ac24 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +libnss-tacplus (1.0.3-2) unstable; urgency=low + * Fixed package remove to clean up plugin entries in nsswitch.conf + * New Disabled: added user_homedir config variable to allow per-user + home directories (unless per-command authorization is enabled) + * Fixed configuration files should automatically be reparsed + if they change, for long-lived programs and daemons that use NSS. + + -- Dave Olson <olson@cumulusnetworks.com> Fri, 30 Jun 2017 13:34:20 -0700 + libnss-tacplus (1.0.3-1) unstable; urgency=low * Added config variable "timeout" to limit time attempting to connect to non-responding TACACS server. diff --git a/debian/libnss-tacplus.postinst b/debian/libnss-tacplus.postinst index 9541608..77f16f4 100644 --- a/debian/libnss-tacplus.postinst +++ b/debian/libnss-tacplus.postinst @@ -7,6 +7,13 @@ set -e case "$1" in configure) + # Add tacplus to /etc/nsswitch.conf, since it's necessary + # for this package, and won't break anything else. Do nothing + # if tacplus is already present in the passwd line + if [ -e "/etc/nsswitch.conf" ]; then + sed -i -e '/tacplus\s/b' \ + -e '/^passwd:/s/compat/tacplus &/' /etc/nsswitch.conf + fi ;; abort-upgrade|abort-remove|abort-deconfigure) @@ -18,14 +25,6 @@ case "$1" in ;; esac -# Add tacplus to /etc/nsswitch.conf, since it's necessary -# for this package, and won't break anything else. Do nothing -# if tacplus is already present in the passwd line -if [ -e "/etc/nsswitch.conf" ]; then - sed -i -e '/tacplus/b' \ - -e '/^passwd/s/compat/tacplus &/' /etc/nsswitch.conf -fi - #DEBHELPER# diff --git a/debian/libnss-tacplus.prerm b/debian/libnss-tacplus.prerm new file mode 100644 index 0000000..c47a314 --- /dev/null +++ b/debian/libnss-tacplus.prerm @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +if [ "$1" = remove ]; then + # Undo the addition of the plugin + if [ -e "/etc/nsswitch.conf" ]; then + sed -i -e '/^passwd:.*tacplus\s/s/tacplus\s//' \ + /etc/nsswitch.conf || true # don't prevent remove on error + fi +fi + +#DEBHELPER# |