# # CU sudo version 1.5.8 # Copyright (c) 1996, 1998, 1999 Todd C. Miller # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 1, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # Please send bugs, changes, problems to sudo-bugs@courtesan.com # # @configure_input@ # # $Sudo$ # #### Start of system configuration section. #### srcdir = @srcdir@ VPATH = @srcdir@ # Compiler & tools to use CC = @CC@ LEX = flex YACC = @YACC@ NROFF = nroff # Which install program? INSTALL = $(srcdir)/install-sh -c # Libraries SUDO_LIBS = @SUDO_LIBS@ @AFS_LIBS@ VISUDO_LIBS = @VISUDO_LIBS@ # C preprocessor flags CPPFLAGS = -I. -I$(srcdir) @CPPFLAGS@ # Usually -g or -O CFLAGS = @CFLAGS@ # Flags to pass to the link stage SUDO_LDFLAGS = @SUDO_LDFLAGS@ VISUDO_LDFLAGS = @VISUDO_LDFLAGS@ # Where to install things... prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ sysconfdir = @sysconfdir@ mandir = @mandir@ # Directory in which to install sudo. sudodir = $(bindir) # Directory in which to install visudo visudodir = $(sbindir) # Directory in which to install the sudoers file sudoersdir = $(sysconfdir) # Directory in which to install the man page # set mansect5 to 4 on sysV machines. mantype = @MANTYPE@ mansect8 = 8 mansect5 = 5 mandir8 = $(mandir)/$(mantype)$(mansect8) mandir5 = $(mandir)/$(mantype)$(mansect5) # User and group ids the installed files should be "owned" by install_uid = 0 install_gid = 0 # User, group, and mode the sudoers file should be "owned" by (configure) sudoers_uid = @SUDOERS_UID@ sudoers_gid = @SUDOERS_GID@ sudoers_mode = @SUDOERS_MODE@ # Pass in paths and uid/gid + OS dependent defined DEFS = @OSDEFS@ -D_PATH_SUDO_SUDOERS=\"$(sudoersdir)/sudoers\" -D_PATH_SUDO_STMP=\"$(sudoersdir)/stmp\" -DSUDOERS_UID=$(sudoers_uid) -DSUDOERS_GID=$(sudoers_gid) -DSUDOERS_MODE=$(sudoers_mode) #### End of system configuration section. #### SHELL = /bin/sh PROGS = @PROGS@ SRCS = check.c getspwuid.c find_path.c logging.c parse.c sudo.c secureware.c \ goodpath.c sudo_setenv.c parse.yacc parse.lex visudo.c interfaces.c \ check_sia.c alloc.c PARSEOBJS = sudo.tab.o lex.yy.o alloc.o SUDOBJS = check.o getspwuid.o find_path.o logging.o parse.o sudo.o \ secureware.o goodpath.o sudo_setenv.o interfaces.o \ check_sia.o @DCE_OBJS@ @TGETPASS@ VISUDOBJS = visudo.o TESTOBJS = interfaces.o testsudoers.o LIBOBJS = @LIBOBJS@ @ALLOCA@ HDRS = sudo.h compat.h version.h insults.h \ ins_2001.h ins_classic.h ins_goons.h ins_csops.h sudo.tab.h VERSION = 1.5.8 DISTFILES = $(SRCS) $(HDRS) BUGS CHANGES COPYING HISTORY INSTALL \ INSTALL.configure TODO PORTING README RUNSON \ FAQ TROUBLESHOOTING Makefile.in acsite.m4 aixcrypt.exp \ config.h.in configure configure.in config.guess config.sub \ pathnames.h.in getcwd.c strdup.c indent.pro install-sh \ mkinstalldirs lsearch.c putenv.c sudo.tab.c tgetpass.c \ emul/search.h emul/utime.h utime.c fnmatch.c emul/fnmatch.h \ fnmatch.3 testsudoers.c sample.pam sample.sudoers \ sudo.pod sudo.man sudo.cat visudo.pod visudo.man \ visudo.cat sudoers.pod sudoers.man sudoers.cat lex.yy.c \ sudoers dce_pwent.c alloca.c VERSIONFILES = emul/utime.h check.c compat.h config.h.in dce_pwent.c \ find_path.c getspwuid.c getcwd.c goodpath.c ins_2001.h \ ins_classic.h ins_csops.h ins_goons.h insults.h interfaces.c \ logging.c parse.c parse.lex parse.yacc pathnames.h.in \ putenv.c strdup.c sudo.c sudo.h sudo_setenv.c testsudoers.c \ tgetpass.c utime.c visudo.c secureware.c check_sia.c alloc.c all: $(PROGS) .SUFFIXES: .o .c .h .lex .yacc .man .cat .c.o: $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(OPTIONS) $< .man.cat: @rm -f $(srcdir)/$@ $(NROFF) -man $< > $(srcdir)/$@ sudo: $(PARSEOBJS) $(SUDOBJS) $(LIBOBJS) $(CC) -o $@ $(PARSEOBJS) $(SUDOBJS) $(LIBOBJS) $(SUDO_LDFLAGS) $(SUDO_LIBS) visudo: $(PARSEOBJS) $(VISUDOBJS) $(LIBOBJS) $(CC) -o $@ $(PARSEOBJS) $(VISUDOBJS) $(LIBOBJS) $(VISUDO_LDFLAGS) $(VISUDO_LIBS) testsudoers: $(PARSEOBJS) $(TESTOBJS) $(CC) -o $@ $(PARSEOBJS) $(TESTOBJS) $(VISUDO_LDFLAGS) $(VISUDO_LIBS) # Uncomment the following if you intend to modify parse.yacc #sudo.tab.c sudo.tab.h: parse.yacc # rm -f sudo.tab.h sudo.tab.c # $(YACC) -d -b sudo $(srcdir)/parse.yacc sudo.tab.o: $(HDRS) config.h pathnames.h sudo.tab.c # Uncomment the following if you intend to modify parse.lex #lex.yy.c: parse.lex # rm -f lex.yy.c # $(LEX) $(srcdir)/parse.lex lex.yy.o: lex.yy.c $(HDRS) $(SUDOBJS) $(LIBOBJS) : $(HDRS) config.h sudo.html: $(srcdir)/sudo.pod @rm -f $(srcdir)/$@ pod2html --title="Sudo Manual" --infile=$< --outfile=$(srcdir)/$@ sudo.man: $(srcdir)/sudo.pod @rm -f $(srcdir)/$@ pod2man --section=$(mansect8) --release=$(VERSION) --center="MAINTENANCE COMMANDS" $< > $(srcdir)/$@ sudo.cat: $(srcdir)/sudo.man visudo.html: $(srcdir)/visudo.pod @rm -f $(srcdir)/$@ pod2html --title="Visudo Manual" --infile=$< --outfile=$(srcdir)/$@ visudo.man: $(srcdir)/visudo.pod @rm -f $(srcdir)/$@ pod2man --section=$(mansect8) --release=$(VERSION) --center="MAINTENANCE COMMANDS" $< > $(srcdir)/$@ visudo.cat: $(srcdir)/visudo.man sudoers.html: $(srcdir)/sudoers.pod @rm -f $(srcdir)/$@ pod2html --title="Sudoers Manual" --infile=$< --outfile=$(srcdir)/$@ sudoers.man: $(srcdir)/sudoers.pod @rm -f $(srcdir)/$@ pod2man --section=$(mansect5) --release=$(VERSION) --center="FILE FORMATS" $< > $(srcdir)/$@ sudoers.cat: $(srcdir)/sudoers.man install: install-dirs install-binaries install-sudoers install-man install-dirs: $(srcdir)/mkinstalldirs $(sudodir) $(visudodir) $(sudoersdir) $(mandir8) $(mandir5) install-binaries: $(PROGS) $(INSTALL) -o $(install_uid) -g $(install_gid) -m 4111 -s sudo $(sudodir)/sudo $(INSTALL) -o $(install_uid) -g $(install_gid) -m 0111 -s visudo $(visudodir)/visudo install-sudoers: @ if [ -f $(sudoersdir)/sudoers ]; then \ echo "Setting user/group and mode on existing $(sudoersdir)/sudoers file."; \ chown $(sudoers_uid) $(sudoersdir)/sudoers; \ chgrp $(sudoers_gid) $(sudoersdir)/sudoers; \ chmod $(sudoers_mode) $(sudoersdir)/sudoers; \ else \ $(INSTALL) -o $(sudoers_uid) -g $(sudoers_gid) -m $(sudoers_mode) \ $(srcdir)/sudoers $(sudoersdir)/sudoers; \ fi install-man: $(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 $(srcdir)/sudo.$(mantype) $(mandir8)/sudo.$(mansect8) $(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 $(srcdir)/visudo.$(mantype) $(mandir8)/visudo.$(mansect8) $(INSTALL) -o $(install_uid) -g $(install_gid) -m 0444 $(srcdir)/sudoers.$(mantype) $(mandir5)/sudoers.$(mansect5) @MAN_POSTINSTALL@ tags: $(SRCS) ctags $(SRCS) TAGS: $(SRCS) etags $(SRCS) clean: -rm -f *.o $(PROGS) testsudoers core sudo.core visudo.core mostlyclean: clean distclean: clean rm -f Makefile pathnames.h config.h config.status config.cache config.log clobber: distclean realclean: distclean rm -f TAGS tags cleandir: realclean dist: $(DISTFILES) rm -f ../cu-sudo.v$(VERSION).tar.Z ( cd .. ; TF="/tmp/sudo.dist$$$$" ; rm -f $$TF ; for i in $(DISTFILES) ; \ do echo sudo.v$(VERSION)/$$i >> $$TF ; done ; \ tar Ocf cu-sudo.v$(VERSION).tar \ `cat $$TF` && compress cu-sudo.v$(VERSION).tar && rm -f $$TF) ls -l ../cu-sudo.v$(VERSION).tar.Z # Update version strings based on version specified in version.h # This is ugly but it works... update_version: for f in Makefile.in $(VERSIONFILES); do \ VERSION=`sed -n 's/static const char version\[\] = "\([^"]*\)".*$$/\1/p' < version.h`; \ sed -e 's/\(VERSION =\) [^ ,:][^ ,:]*/\1 '$$VERSION'/' -e 's/\(CU sudo version\) [^ ,:][^ ,:]*/\1 '$$VERSION'/' < $$f > $$f.$$$$; \ mv -f $$f.$$$$ $$f; \ chmod 644 $$f; \ done