#*
-#* CU sudo version 1.3 (based on Root Group sudo version 1.1)
+#* CU sudo version 1.3.1 (based on Root Group sudo version 1.1)
#*
#* This software comes with no waranty whatsoever, use at your own risk.
#*
CC = @CC@
LEX = @LEX@
YACC = @YACC@
-SENDMAIL = @SENDMAIL@
# Which install program?
INSTALL = @INSTALL@
-DEFS = -DMAILER=\"$(SENDMAIL)\" @DEFS@
-LIBS = @LIBS@
+# Libraries
+LIBS = @LIBS@ @LEXLIB@
# Usually -g or -O
-CFLAGS = -O
+CFLAGS = -O @INC_FLAGS@
LDFLAGS = @STATIC_FLAGS@
prefix = /usr/local
# Directory in which to install visudo
visudodir = $(exec_prefix)/etc
+# Directory in which to install the sudoers file
+sudoersdir = /etc
+
# Directory in which to install the man page
-mandir = $(man_prefix)/man/man1
-manext = 1
+mandir = $(man_prefix)/man/man8
+manext = 8
# User and Group the installed file should be owned by
owner = root
group = staff
-################################################################################
-# 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 = -DSYSLOG -DSEND_MAIL_WHEN_NO_USER -DSyslog_options=0 @OPTIONS@
+# See sudo.h for a list of options
+OPTIONS = @OPTIONS@
#### End of system configuration section. ####
SHELL = /bin/sh
+PROGS = @PROGS@
+
SRCS = check.c find_path.c getpass.c logging.c parse.c sudo.c parse.yacc \
parse.lex
HDRS = sudo.h insults.h
-all: @PROGS@
+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:
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) -I$(srcdir) $<
$(INSTALL) -o $(owner) -g $(group) -m 0111 -s visudoers/visudo $(visudodir)/visudo
install-sudoers:
- @ if [ -f $(SUDOERSDIR)/sudoers ]; then \
- echo "Will not overwrite existing $(SUDOERSDIR)/sudoers file."; \
+ @ if [ -f $(sudoersdir)/sudoers ]; then \
+ echo "Will not overwrite existing $(sudoersdir)/sudoers file."; \
else \
- $(INSTALL) -o $(owner) -g $(group) -m 0400 sudoers $(SUDOERSDIR)/sudoers; \
+ $(INSTALL) -o $(owner) -g $(group) -m 0400 sudoers $(sudoersdir)/sudoers; \
fi
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.status
+ rm -f Makefile config.h pathnames.h config.status
( cd visudoers && make $@ )
realclean: distclean
- rm -f TAGS
+ rm -f TAGS tags
( cd visudoers && make $@ )
-TAGS:
- etags ${srcdir}/*.m4 ${srcdir}/*.sh ${srcdir}/[a-z]*.in ${srcdir}/*.texi
-
-# Prevent GNU make v3 from overflowing arg limit on SysV.
-.NOEXPORT:
+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