on BSD systems.
--docdir=DIR
Install other sudo documentation in DIR [DATAROOTDIR/doc/sudo]
+ --with-exampledir=DIR
+ Install sudo example files in DIR [DATAROOTDIR/doc/sudo/examples]
+
--with-plugindir=DIR
Set the directory that sudo looks in to find the policy and I/O
logging plugins. Defaults to the LIBEXEC/sudo.
datarootdir = @datarootdir@
localedir = @localedir@
localstatedir = @localstatedir@
+exampledir = @exampledir@
docdir = @docdir@
mandir = @mandir@
rundir = @rundir@
mandir=$(mandir) \
localedir=$(localedir) \
docdir=$(docdir) \
+ exampledir=$(exampledir) \
sysconfdir=$(sysconfdir) \
sudoersdir=$(sudoersdir) \
sudoers_uid=$(sudoers_uid) \
vardir
rundir
iolog_dir
+exampledir
COMPAT_EXP
RC_LINK
INIT_DIR
with_interfaces
with_stow
with_askpass
+with_exampledir
with_plugindir
with_man
with_mdoc
--without-interfaces don't try to read the ip addr of ether interfaces
--with-stow deprecated
--with-askpass=PATH Fully qualified pathname of askpass helper
+ --with-exampledir=DIR path to install sudo examples in
--with-plugindir=DIR set directory to load plugins from
--with-man manual pages use man macros
--with-mdoc manual pages use mdoc macros
+
#
# End initial values for man page substitution
#
INSTALL_NOEXEC=
+exampledir='$(docdir)/examples'
devdir='$(srcdir)'
PROGS="sudo"
: ${MANDIRTYPE='man'}
# Check whether --with-vardir was given.
if test "${with_vardir+set}" = set; then :
withval=$with_vardir; case $with_vardir in
- yes) as_fn_error $? "\"must give --with-vardirdir an argument.\"" "$LINENO" 5
+ yes) as_fn_error $? "\"must give --with-vardir an argument.\"" "$LINENO" 5
;;
- no) as_fn_error $? "\"--without-vardirdir not supported.\"" "$LINENO" 5
+ no) as_fn_error $? "\"--without-vardir not supported.\"" "$LINENO" 5
;;
esac
fi
fi
+# Check whether --with-exampledir was given.
+if test "${with_exampledir+set}" = set; then :
+ withval=$with_exampledir; case $with_exampledir in
+ yes) as_fn_error $? "\"must give --with-exampledir an argument.\"" "$LINENO" 5
+ ;;
+ no) as_fn_error $? "\"--without-exampledir not supported.\"" "$LINENO" 5
+ ;;
+ *) exampledir="$with_exampledir"
+esac
+fi
+
+
+
# Check whether --with-plugindir was given.
if test "${with_plugindir+set}" = set; then :
withval=$with_plugindir; case $with_plugindir in
CHECKSHADOW="false"
test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
: ${with_logincap='maybe'}
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-*openbsd*)
# OpenBSD-specific initialization
fi
fi
: ${with_logincap='maybe'}
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-*netbsd*)
# NetBSD has a real setreuid(2) starting with 1.3.2
CHECKSHADOW="false"
test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
: ${with_logincap='maybe'}
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-dragonfly*)
OSDEFS="${OSDEFS} -D_BSD_SOURCE"
CHECKSHADOW="false"
test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
: ${with_logincap='yes'}
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-*bsd*)
CHECKSHADOW="false"
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-darwin*)
# Darwin has a real setreuid(2) starting with 9.0
RTLD_PRELOAD_ENABLE_VAR="DYLD_FORCE_FLAT_NAMESPACE"
fi
RTLD_PRELOAD_VAR="DYLD_INSERT_LIBRARIES"
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-nextstep*)
# lockf() is broken on the NeXT -- use flock instead
AC_SUBST([INIT_DIR])
AC_SUBST([RC_LINK])
AC_SUBST([COMPAT_EXP])
+AC_SUBST([exampledir])
dnl
dnl Variables that get substituted in docs (not overridden by environment)
dnl
dnl May be overridden by environment variables..
dnl
INSTALL_NOEXEC=
+exampledir='$(docdir)/examples'
devdir='$(srcdir)'
PROGS="sudo"
: ${MANDIRTYPE='man'}
AC_ARG_WITH(vardir, [AS_HELP_STRING([--with-vardir=DIR], [path to the sudo var dir])],
[case $with_vardir in
- yes) AC_MSG_ERROR(["must give --with-vardirdir an argument."])
+ yes) AC_MSG_ERROR(["must give --with-vardir an argument."])
;;
- no) AC_MSG_ERROR(["--without-vardirdir not supported."])
+ no) AC_MSG_ERROR(["--without-vardir not supported."])
;;
esac])
SUDO_DEFINE_UNQUOTED(_PATH_SUDO_ASKPASS, NULL)
fi
+AC_ARG_WITH(exampledir, [AS_HELP_STRING([--with-exampledir=DIR], [path to install sudo examples in])],
+[case $with_exampledir in
+ yes) AC_MSG_ERROR(["must give --with-exampledir an argument."])
+ ;;
+ no) AC_MSG_ERROR(["--without-exampledir not supported."])
+ ;;
+ *) exampledir="$with_exampledir"
+esac])
+
AC_ARG_WITH(plugindir, [AS_HELP_STRING([--with-plugindir=DIR], [set directory to load plugins from])],
[case $with_plugindir in
no) AC_MSG_ERROR(["illegal argument: --without-plugindir."])
CHECKSHADOW="false"
test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
: ${with_logincap='maybe'}
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-*openbsd*)
# OpenBSD-specific initialization
fi
fi
: ${with_logincap='maybe'}
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-*netbsd*)
# NetBSD has a real setreuid(2) starting with 1.3.2
CHECKSHADOW="false"
test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
: ${with_logincap='maybe'}
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-dragonfly*)
OSDEFS="${OSDEFS} -D_BSD_SOURCE"
CHECKSHADOW="false"
test -z "$with_pam" && AUTH_EXCL_DEF="PAM"
: ${with_logincap='yes'}
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-*bsd*)
CHECKSHADOW="false"
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-darwin*)
# Darwin has a real setreuid(2) starting with 9.0
RTLD_PRELOAD_ENABLE_VAR="DYLD_FORCE_FLAT_NAMESPACE"
fi
RTLD_PRELOAD_VAR="DYLD_INSERT_LIBRARIES"
+
+ # Examples go in share/examples/sudo
+ if test X"$with_exampledir" = X""; then
+ exampledir='$(datarootdir)/examples/$(PACKAGE_TARNAME)'
+ fi
;;
*-*-nextstep*)
# lockf() is broken on the NeXT -- use flock instead
.\" Agency (DARPA) and Air Force Research Laboratory, Air Force
.\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
.\"
-.Dd February 26, 2015
+.Dd March 24, 2015
.Dt SUDOERS @mansectform@
.Os Sudo @PACKAGE_VERSION@
.Sh NAME
.Em sudoers
without a leading path.
However, it may take command line arguments just as a normal command does.
+Wildcards used in
+.Em sudoedit
+command line arguments are expected to be path names, so a forward slash
+.Pq Ql /
+will not be matched by a wildcard.
+.Pp
+Unlike other
+.Nm sudo
+commands, the editor is run with the permissions of the invoking
+user and with the environment unmodified.
+More information may be found in the description of the
+.Fl e
+option in
+.Xr sudo @mansectsu@ .
+.Pp
For example, to allow user operator to edit the
.Dq message of the day
file:
srcdir = @srcdir@
docdir = @docdir@
-exampledir = $(docdir)/examples
+exampledir = @exampledir@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
# XXX - SuSE uses secure path but only for env_reset
configure_opts="--prefix=/usr
--libexecdir=/usr/$libexec
+ --docdir='$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
--with-logging=syslog
--with-logfac=auth
--with-all-insults
--with-sendmail=/usr/sbin/sendmail
$configure_opts"
- make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
+ #make_opts='docdir=$(datarootdir)/doc/packages/$(PACKAGE_TARNAME)'
;;
deb*|ubu*)
# Man pages should be compressed in .deb files
# For RedHat the doc dir is expected to include version and release
case "$pp_rpm_distro" in
centos*|rhel*)
- mv ${pp_destdir}/${docdir} ${pp_destdir}/${docdir}-${version}-${pp_rpm_release}
- docdir=${docdir}-${version}-${pp_rpm_release}
+ rhel_docdir="${docdir}-${pp_rpm_version}-${pp_rpm_release}"
+ if test "`dirname ${exampledir}`" = "${docdir}"; then
+ exampledir="${rhel_docdir}/`basename ${exampledir}`"
+ fi
+ mv "${pp_destdir}/${docdir}" "${pp_destdir}/${rhel_docdir}"
+ docdir="${rhel_docdir}"
;;
esac
if test "${prefix}" != "/usr"; then
extradirs=`echo ${pp_destdir}/${mandir}/[mc]* | sed "s#${pp_destdir}/##g"`
extradirs="$extradirs `dirname $docdir` `dirname $rundir` `dirname $vardir`"
+ test "`dirname $exampledir`" != "$docdir" && extradirs="$extradirs `dirname $exampledir`"
test -d ${pp_destdir}${localedir} && extradirs="$extradirs $localedir"
for dir in $bindir $sbindir $libexecdir $includedir $extradirs; do
while test "$dir" != "/"; do
$docdir/LICENSE ignore,ignore-others
$docdir/ChangeLog ignore,ignore-others
%endif
- $docdir/examples/ 0755 ignore-others
- $docdir/** 0644
+ $exampledir/ 0755 ignore-others
+ $exampledir/* 0644
+ $docdir/* 0644
$localedir/*/ - optional
$localedir/*/LC_MESSAGES/ - optional
$localedir/*/LC_MESSAGES/* 0644 optional