#*
-#* CU sudo version 1.3.1 (based on Root Group sudo version 1.1)
+#* CU sudo version 1.3 (based on Root Group sudo version 1.1)
#*
#* This software comes with no waranty whatsoever, use at your own risk.
#*
INSTALL = @INSTALL@
# Libraries
-LIBS = @LIBS@ @LEXLIB@
+LIBS = @LIBS@
# Usually -g or -O
CFLAGS = -O @INC_FLAGS@
owner = root
group = staff
-# See sudo.h for a list of options
+# XXX - rmeove this entirely???
+################################################################################
+# The following macros can be defined when compiling.
+#
+# FQDN - if you have fully qualified hostnames
+# in your SUDOERS files
+#
+# SYSLOG - if you want to use syslog instead
+# of a log file
+# ( This is a nice feature. You can
+# collect all your sudo logs at a
+# single host)
+#
+# NO_ROOT_SUDO - sudo will exit if called by root
+#
+# SOLARIS - define if using Solaris 2.x
+#
+# SEND_MAIL_WHEN_NOT_OK - if you want a message sent to ALERTMAIL
+# when the user is in the SUDOERS but
+# does not have permission to execute
+# the command entered
+# ( This can be used at paranoid sites )
+#
+# SEND_MAIL_WHEN_NO_USER - if you want a message sent to ALERTMAIL
+# when the user is not in the SUDOERS file
+# ( This is generally the case )
+#
+# TIMEDIR the directory where the timestamp
+# files are kept.
+#
+# TIMEOUT the number of minutes that can elapse
+# before sudo will ask for a passwd again
+#
+# TRIES_FOR_PASSWORD the number of times sudo will let you
+# guess are you password before screaming
+#
+# INCORRECT_PASSWORD the message that is displayed if you
+# incorrectly enter your password
+#
+# MAILSUBJECT the subject of the mail sent to ALERTMAIL
+#
+# ALERTMAIL the recipient of mail from sudo
+#
+# SUDOERS the location of the sudoers file
+#
+# TMPSUDOERS the location of the lock file for visudo
+#
+# EDITOR the location of the editor
+#
+# ENV_EDITOR if this variable is defined then the
+# EDITOR and VISUAL envariables are consulted
+#
+# LOGFILE log file location IF NOT USING SYSLOG
+#
+# SECURE_PATH if this variable is set, its value is
+# used as the PATH variable
+#
+# UMASK umask that sudo should use, comment out
+# of sudo.h to preserve umask of the caller,
+# default is 022
+#
+# BROKEN_GETPASS if using a os with a broken getpass()
+# hpux,aix,irix need this, sudo.h has details
+#
+# HAVE_STRDUP if your os has strdup(3)
+#
+# HAVE_CWD if you have getcwd(3)
+#
+# USE_TERMIO if you have sysV terminal control
+# (defined by default for hpux and irix)
+#
+# SHORT_MESSAGE if you don't want the full copyright message
+# with the "we expect you have..." banner
+#
+# USE_INSULTS if you want to be insulted for typing an
+# incorrect password like the original sudo(8)
+#
+# HAL if you want lines from 2001 instead of
+# insults (must define USE_INSULTS too)
+#
+# STDC_HEADERS if you have ansi-compliant header files
+#
+# USE_EXECV if you want to use execv() instead of
+# execvp()
+#
+# Macro: Default:
+# Syslog_ident "sudo"
+# Syslog_options LOG_PID
+# Syslog_facility LOG_LOCAL2
+# Syslog_priority_OK LOG_NOTICE
+# Syslog_priority_NO LOG_ALERT
+################################################################################
+
OPTIONS = @OPTIONS@
#### End of system configuration section. ####
HDRS = sudo.h insults.h
-DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES COPYING INSTALL Makefile.in PORTING \
- README README.v1.3.1 SUPPORTED TODO aclocal.m4 \
- config.h.in configure configure.in indent.pro installbsd \
- pathnames.h.in sample.sudoers sudo.man sudoers \
- visudoers/Makefile.in visudoers/config.h visudoers/pathnames.h \
- visudoers/sudo.h visudoers/visudo.c visudoers/visudo.lex \
- visudoers/visudo.yacc
-
all: $(PROGS)
.c.o:
install-man:
$(INSTALL) -o $(owner) -g $(group) -m 0644 sudo.man $(mandir)/sudo.$(manext)
-tags: $(SRCS)
- ctags $(SRCS)
-
-TAGS: $(SRCS)
- etags $(SRCS)
-
clean:
-rm -f lex.yy.* y.tab.* *.o $(PROGS) core
( cd visudoers && make $@ )
mostlyclean: clean
distclean: clean
- rm -f Makefile config.h pathnames.h config.status
+ rm -f Makefile config.status
( cd visudoers && make $@ )
realclean: distclean
- rm -f TAGS tags
+ rm -f TAGS
( cd visudoers && make $@ )
-dist: $(DISTFILES)
- rm -f ../cu-sudo.v1.3.1.tar.Z
- ( cd .. ; TF="/tmp/sudo.dist$$" ; rm -f $$TF ; for i in $(DISTFILES) ; \
- do echo sudo.v1.3.1/$$i >> $$TF ; done ; tar cf cu-sudo.v1.3.1.tar \
- `cat $$TF` && compress cu-sudo.v1.3.1.tar )
- ls -l ../cu-sudo.v1.3.1.tar.Z
+TAGS:
+ etags ${srcdir}/*.m4 ${srcdir}/*.sh ${srcdir}/[a-z]*.in ${srcdir}/*.texi
+
+# Prevent GNU make v3 from overflowing arg limit on SysV.
+.NOEXPORT:
dnl Process this file with autoconf to produce a configure script.
-echo Configuring cu sudo version 1.3.1
+echo Configuring CU Sudo version 1.3.1
AC_INIT(sudo.h)
+AC_CONFIG_HEADER(config.h pathnames.h)
dnl
dnl Variables that get substituted in the Makefile
dnl
AC_SUBST(PROGS)dnl
STATIC_FLAGS=""
AC_SUBST(STATIC_FLAGS)dnl
-SENDMAIL=""
-AC_SUBST(SENDMAIL)dnl
+INC_FLAGS=""
+AC_SUBST(INC_FLAGS)dnl
OPTIONS=""
AC_SUBST(OPTIONS)dnl
dnl
dnl
dnl what architecture are we on?
dnl
-AC_HEADER_CHECK(elf.h, AC_DEFINE(SVR4))
-SUDO_AIX([if test -n "$GCC"; then
+AC_HEADER_CHECK(elf.h, AC_DEFINE(SVR4) [SVR4="1"])
+SUDO_AIX(AC_DEFINE(BROKEN_GETPASS) [if test -n "$GCC"; then
STATIC_FLAGS="-static"
else
STATIC_FLAGS="-bnoso -bI:/lib/syscalls.exp"
fi
])dnl
dnl
+dnl do we need to add -I/usr/ucbinclude to $CPP?
+dnl
+if test -n "$SVR4"; then
+ echo checking for /usr/ucbinclude
+ if test -d "/usr/ucbinclude"; then
+ INC_FLAGS="${INC_FLAGS} -I/usr/ucbinclude"
+ CPP="${CPP} -I/usr/ucbinclude"
+ fi
+fi
+dnl
if test -z "$SVR4"; then
SUDO_SUNOS([if test -n "$GCC"; then
STATIC_FLAGS="-static"
])dnl
fi
dnl
-SUDO_HPUX([if test -n "$GCC"; then
+SUDO_HPUX(AC_DEFINE(BROKEN_GETPASS) [if test -n "$GCC"; then
STATIC_FLAGS="-static"
else
STATIC_FLAGS="-Wl,-a,archive"
fi
])dnl
dnl
+SUDO_IRIX(AC_DEFINE(BROKEN_GETPASS))
+dnl
SUDO_LINUX([STATIC_FLAGS="-static"])
dnl
SUDO_CONVEX()
AC_PROG_LEX
SUDO_PROG_INSTALL
SUDO_PROG_SENDMAIL
+SUDO_PROG_VI
dnl
dnl Header file checks
dnl
AC_HAVE_HEADERS(strings.h)
AC_HAVE_HEADERS(unistd.h)
AC_HAVE_HEADERS(malloc.h)
+AC_HAVE_HEADERS(paths.h)
+AC_HAVE_HEADERS(termio.h)
+AC_HAVE_HEADERS(termios.h)
dnl
dnl typedef checks
dnl
dnl
AC_HAVE_FUNCS(getcwd)
AC_HAVE_FUNCS(strdup)
+AC_HAVE_FUNCS(strchr)
+AC_HAVE_FUNCS(strrchr)
dnl
dnl library checks
dnl
AC_IRIX_SUN
-AC_HAVE_LIBRARY(ucb)
AC_HAVE_LIBRARY(bsd)
AC_HAVE_LIBRARY(BSD)
AC_HAVE_LIBRARY(socket)
AC_HAVE_LIBRARY(elf)
AC_HAVE_LIBRARY(malloc)
AC_HAVE_LIBRARY(shadow)
+AC_HAVE_LIBRARY(ucb)
+dnl SVR4 (or at least solaris 2.x) has -lucb in /usr/ucblib
+if test -n "$SVR4"; then
+ echo checking for /usr/ucblib
+ if test -d "/usr/ucblib"; then
+ LIBS="-L/usr/ucblib ${LIBS}"
+ if test -r "/usr/ucblib/libucb.a" -a ! -r "/lib/libucb.a"; then
+ LIBS="${LIBS} -lucb"
+ fi
+ fi
+fi
dnl
dnl Makefiles to substitute
dnl