mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-03 07:45:47 +00:00
Add ldap "flavor" for debian, controlled by the SUDO_FLAVOR environment
variable.
This commit is contained in:
@@ -62,10 +62,11 @@ DOCS = sudo.man visudo.man sudoers.man sudoers.ldap.man sudoers.man \
|
|||||||
@DEV@ $(srcdir)/sudo_plugin.man.in $(srcdir)/sudo_plugin.cat \
|
@DEV@ $(srcdir)/sudo_plugin.man.in $(srcdir)/sudo_plugin.cat \
|
||||||
@DEV@ $(srcdir)/HISTORY $(srcdir)/LICENSE
|
@DEV@ $(srcdir)/HISTORY $(srcdir)/LICENSE
|
||||||
|
|
||||||
OTHER_DOCS= $(top_srcdir)/ChangeLog $(top_srcdir)/README* \
|
OTHER_DOCS= $(top_srcdir)/ChangeLog $(top_srcdir)/README \
|
||||||
$(top_srcdir)/WHATSNEW $(srcdir)/HISTORY $(srcdir)/LICENSE \
|
$(top_srcdir)/WHATSNEW $(srcdir)/HISTORY $(srcdir)/LICENSE \
|
||||||
$(srcdir)/TROUBLESHOOTING $(srcdir)/UPGRADE $(srcdir)/sample.* \
|
$(srcdir)/TROUBLESHOOTING $(srcdir)/UPGRADE $(srcdir)/sample.*
|
||||||
$(srcdir)/schema.*
|
|
||||||
|
OTHER_DOCS_LDAP= $(top_srcdir)/README.LDAP $(srcdir)/schema.*
|
||||||
|
|
||||||
VERSION = @PACKAGE_VERSION@
|
VERSION = @PACKAGE_VERSION@
|
||||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
@@ -149,6 +150,7 @@ install-includes:
|
|||||||
|
|
||||||
install-doc: install-dirs
|
install-doc: install-dirs
|
||||||
for f in $(OTHER_DOCS); do $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $$f $(DESTDIR)$(docdir); done
|
for f in $(OTHER_DOCS); do $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $$f $(DESTDIR)$(docdir); done
|
||||||
|
@LDAP@for f in $(OTHER_DOCS_LDAP); do $(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 $$f $(DESTDIR)$(docdir); done
|
||||||
$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
|
$(INSTALL) -O $(install_uid) -G $(install_gid) -M 0444 @mansrcdir@/sudo.$(mantype) $(DESTDIR)$(mandirsu)/sudo.$(mansectsu)
|
||||||
@rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
|
@rm -f $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
|
||||||
ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
|
ln $(DESTDIR)$(mandirsu)/sudo.$(mansectsu) $(DESTDIR)$(mandirsu)/sudoedit.$(mansectsu)
|
||||||
|
10
mkpkg
10
mkpkg
@@ -3,7 +3,6 @@
|
|||||||
# Build a binary package using polypkg
|
# Build a binary package using polypkg
|
||||||
# Usage: mkpkg
|
# Usage: mkpkg
|
||||||
#
|
#
|
||||||
# TODO: add flavors (e.g. LDAP)
|
|
||||||
|
|
||||||
IFS=
|
IFS=
|
||||||
|
|
||||||
@@ -147,14 +146,16 @@ case "$platform" in
|
|||||||
deb[456].*)
|
deb[456].*)
|
||||||
# XXX - create sudo group like debian does
|
# XXX - create sudo group like debian does
|
||||||
# debian now has a %sudo entry in its sample sudoers
|
# debian now has a %sudo entry in its sample sudoers
|
||||||
# XXX - debian has separate ldap and non-ldap packages
|
|
||||||
# Note, must indent with tabs, not spaces due to IFS trickery
|
# Note, must indent with tabs, not spaces due to IFS trickery
|
||||||
configure_opts="
|
if test "${SUDO_FLAVOR:-vanilla}" == "ldap"; then
|
||||||
|
configure_opts="--with-ldap
|
||||||
|
--with-ldap-conf-file=/etc/sudo-ldap.conf"
|
||||||
|
fi
|
||||||
|
configure_opts="$configure_opts
|
||||||
--prefix=/usr
|
--prefix=/usr
|
||||||
--with-all-insults
|
--with-all-insults
|
||||||
--with-exempt=sudo
|
--with-exempt=sudo
|
||||||
--with-pam
|
--with-pam
|
||||||
--with-ldap
|
|
||||||
--with-fqdn
|
--with-fqdn
|
||||||
--with-logging=syslog
|
--with-logging=syslog
|
||||||
--with-logfac=authpriv
|
--with-logfac=authpriv
|
||||||
@@ -167,7 +168,6 @@ case "$platform" in
|
|||||||
--disable-root-mailer
|
--disable-root-mailer
|
||||||
--disable-setresuid
|
--disable-setresuid
|
||||||
--with-sendmail=/usr/sbin/sendmail
|
--with-sendmail=/usr/sbin/sendmail
|
||||||
--with-ldap-conf-file=/etc/ldap/ldap.conf
|
|
||||||
--mandir=/usr/share/man
|
--mandir=/usr/share/man
|
||||||
--libexecdir=/usr/lib/sudo
|
--libexecdir=/usr/lib/sudo
|
||||||
--with-secure-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
|
--with-secure-path=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin"
|
||||||
|
14
sudo.pp
14
sudo.pp
@@ -1,5 +1,9 @@
|
|||||||
%set
|
%set
|
||||||
name="sudo"
|
if test -n "$SUDO_FLAVOR"; then
|
||||||
|
name="sudo-$SUDO_FLAVOR"
|
||||||
|
else
|
||||||
|
name="sudo"
|
||||||
|
fi
|
||||||
summary="Provide limited super-user priveleges to specific users"
|
summary="Provide limited super-user priveleges to specific users"
|
||||||
description="Sudo is a program designed to allow a sysadmin to give \
|
description="Sudo is a program designed to allow a sysadmin to give \
|
||||||
limited root privileges to users and log root activity. \
|
limited root privileges to users and log root activity. \
|
||||||
@@ -150,6 +154,14 @@ still allow people to get their work done."
|
|||||||
# installs it 0640 when sudo requires 0440
|
# installs it 0640 when sudo requires 0440
|
||||||
chmod %{sudoers_mode} %{sudoersdir}/sudoers
|
chmod %{sudoers_mode} %{sudoersdir}/sudoers
|
||||||
|
|
||||||
|
# create symlink to ease transition to new path for ldap config
|
||||||
|
# if old config file exists and new one doesn't
|
||||||
|
if test X"%{SUDO_FLAVOR}" = X"ldap"; then
|
||||||
|
if test -r /etc/ldap/ldap.conf -a ! -r /etc/sudo-ldap.conf; then
|
||||||
|
ln -s /etc/ldap/ldap.conf /etc/sudo-ldap.conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Debian uses a sudo group in its default sudoers file
|
# Debian uses a sudo group in its default sudoers file
|
||||||
perl -e '
|
perl -e '
|
||||||
exit 0 if getgrnam("sudo");
|
exit 0 if getgrnam("sudo");
|
||||||
|
Reference in New Issue
Block a user