This commit is contained in:
Todd C. Miller
1994-03-12 18:37:58 +00:00
parent e5bcdc9156
commit f654f06576
3 changed files with 158 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
#*
#* 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.
#*
@@ -38,7 +38,7 @@ YACC = @YACC@
INSTALL = @INSTALL@
# Libraries
LIBS = @LIBS@ @LEXLIB@
LIBS = @LIBS@
# Usually -g or -O
CFLAGS = -O @INC_FLAGS@
@@ -65,7 +65,99 @@ manext = 8
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. ####
@@ -82,14 +174,6 @@ OBJS = check.o find_path.o getpass.o logging.o parse.o sudo.o y.tab.o \
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:
@@ -127,12 +211,6 @@ install-sudoers:
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 $@ )
@@ -140,16 +218,15 @@ clean:
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:

View File

@@ -47,12 +47,24 @@
# define __svr4__
#endif /* SVR4 */
/* Define if you have getcwd. */
/* Define if you have getcwd(3). */
#undef HAVE_GETCWD
/* Define if you have strdup. */
/* Define if you have strdup(3). */
#undef HAVE_STRDUP
/* Define if you have strchr(3). */
#undef HAVE_STRCHR
#ifndef HAVE_STRCHR
# define strchr index
#endif
/* Define if you have strrchr(3). */
#undef HAVE_STRRCHR
#ifndef HAVE_STRRCHR
# define strrchr rindex
#endif
/* Define if you have the <malloc.h> header file. */
#undef HAVE_MALLOC_H
@@ -67,3 +79,9 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the <termio.h> header file. */
#undef HAVE_TERMIO_H
/* Define if you have the <termios.h> header file. */
#undef HAVE_TERMIOS_H

View File

@@ -1,6 +1,7 @@
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
@@ -8,8 +9,8 @@ PROGS="sudo visudo"
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
@@ -25,14 +26,24 @@ AC_PROG_CPP
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"
@@ -42,7 +53,7 @@ fi
])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"
@@ -56,6 +67,8 @@ STATIC_FLAGS="-non_shared"
fi
])dnl
dnl
SUDO_IRIX(AC_DEFINE(BROKEN_GETPASS))
dnl
SUDO_LINUX([STATIC_FLAGS="-static"])
dnl
SUDO_CONVEX()
@@ -69,6 +82,7 @@ AC_PROG_YACC
AC_PROG_LEX
SUDO_PROG_INSTALL
SUDO_PROG_SENDMAIL
SUDO_PROG_VI
dnl
dnl Header file checks
dnl
@@ -77,6 +91,9 @@ AC_HAVE_HEADERS(string.h)
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
@@ -89,11 +106,12 @@ dnl function checks
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)
@@ -101,6 +119,17 @@ AC_HAVE_LIBRARY(nsl)
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