From: Bdale Garbee Date: Mon, 31 Aug 2009 20:07:58 +0000 (-0600) Subject: make sure sudoers.d directories exist X-Git-Tag: debian/1.7.2p1-1~9 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=359403c400da513c87c268b78b80ef1438fc2940;p=debian%2Fsudo make sure sudoers.d directories exist move symlink fumbling before possible exit if group already exists --- diff --git a/debian/sudo-ldap.dirs b/debian/sudo-ldap.dirs index cde2069..83f817c 100644 --- a/debian/sudo-ldap.dirs +++ b/debian/sudo-ldap.dirs @@ -1,4 +1,5 @@ etc/pam.d +etc/sudoers.d usr/bin usr/share/man/man8 usr/share/man/man5 diff --git a/debian/sudo-ldap.postinst b/debian/sudo-ldap.postinst index c192b43..75c41f9 100644 --- a/debian/sudo-ldap.postinst +++ b/debian/sudo-ldap.postinst @@ -37,7 +37,13 @@ system ('chmod 440 /etc/sudoers'); # must do a remove first to un-do the "bad" links created by previous version system ('update-rc.d -f sudo remove >/dev/null 2>&1'); -system ('update-rc.d sudo start 75 2 3 4 5 S . >/dev/null'); +system ('update-rc.d sudo start 75 2 3 4 5 . >/dev/null'); + +# create symlink to ease transition to new path for ldap config +# if old config file exists and new one doesn't +if (-e "/etc/ldap/ldap.conf" && ! -e "/etc/sudo-ldap.conf") { + system("ln -s ldap/ldap.conf /etc/sudo-ldap.conf"); +} # make sure we have a sudo group @@ -65,10 +71,4 @@ if ($gid != 27) { print "Creating group 'sudo' with gid = $gid\n"; system("groupadd -g $gid sudo"); -# create symlink to ease transition to new path for ldap config -# if old config file exists and new one doesn't -if (-e "/etc/ldap/ldap.conf" && ! -e "/etc/sudo-ldap.conf") { - system("ln -s ldap/ldap.conf /etc/sudo-ldap.conf"); -} - print ""; diff --git a/debian/sudo.dirs b/debian/sudo.dirs index 79f694e..4d15db4 100644 --- a/debian/sudo.dirs +++ b/debian/sudo.dirs @@ -1,4 +1,5 @@ etc/pam.d +etc/sudoers.d usr/bin usr/share/man/man8 usr/share/man/man5