⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 一个使用des加密传输的unix下的login程序的服务器端和客户端
💻
📖 第 1 页 / 共 2 页
字号:
## -DAIX necessary for txfr.c## -DONLCR necessary for tty.c#CC	  = gcc -ansi#CFLAGS	  = $(DEBUG) -DAIX#LDFLAGS  = $(DEBUG)#NSTCFLAGS= $(DEBUG) -DAIX -DONLCR=0x00000004# Gnu C++ compiler cannot handle old-style function argument declaratons # If you figure out how to make it accept them, please send mail to the author.## If you have to read this comment, send mail to barrett@asgard.cs.Colorado.EDU.# The file "Notes" includes some old notes I wrote which may help you.## Non-standard object files require special non-posix features be available in # order to compile and link.  NSTCFLAGS are flags to the compiler to make # non-posix symbols and features available.  ## Here are the problem areas in porting to new machines:##    log.c:   vsprintf must return an int.  If it doesn't, you have a#             non-ANSI machine.  It also needs ANSI's stdarg.h.#             The default source should work, since it tries to detect these.#             openlog doesn't return a value on some BSD machines.#    tty.c:   If you don't have POSIX termios, you're hosed.  This code is#             completely POSIX except:  The flag ONLCR is not part of POSIX.  #             Some machines require an ioctl to acquire the controlling terminal#             for the session leader.  See the function mkCtrlTty.#   txfr.c:   depends heavily upon the BSD select(2) semantics, which are#             only vaguely documented.  If the code runs incorrectly here, #             it's a bitch to diagnose and fix.#  socket.c:  Networking isn't POSIX yet.  This isolates all networking calls.#  posignal.h: The arguments to a signal handler are machine-specific.#     pty.c:  Many newer POSIX style machines do pty stuff completely#             differently from eachother. I've had to hack this a bit.## If any of the above files fail to compile, it's most likely because the# header files on your system require a compilation option to make non-posix# symbols visible.  For example, <sys/types.h> declares u_short which is# required to compile socket.c.  To get around this problem, I've not defined# _POSIX_SOURCE until *after* <sys/types.h> and <sys/time.h> are included,# which "fixes" the problem on most machines.  For the ONLCR problem, # grep for "ONLCR" in /usr/include{/sys}/termio*.h.  Once you find that # symbol, look for an #ifdef to enable it and add that flag to NSTCFLAGS# in this Makefile.## Make *SURE* to enable the compile options to not use shared libraries or# run-time procedure binding because it enables a serious trojan horse.# Many vendors enable dynmaic binding by default; so be careful.## The include files and source is constructed to make it easy to change some # of the default source in this makefile rather than hacking on the C source # directly.  This will make your life easier when new releases come out.# Just add a "-D<name>=<value>" to LOGINDFLAGS below.  For example see # the -DLOG_FILE=...below.  All these values have suitable defaults.  You # don't need to touch them unless you want to or I've set them incorrectly by # default.## deslogin.h:#    SETUP_TIMEOUT	ms for login sequence handshake#    LOGIN_TIMEOUT	seconds to wait for passphrase response#    INACTIVITY_TIMEOUT	seconds of no I/O activity before terminationg session#    DESLOGIN_PORT	"Well-known" Port to post listen to for deslogind#    SERVICE_NAME	The name of the deslogin service in /etc/services#    LOGIN_PROG		Full pathname of login program for -w option## deslogind.c:#    DEFAULT_UMASK	Passed to umask(2) upon login.#    TTY_MODE		Permissions for controlling terminal slave pty device#    USERPATH		Default path#    SYSTEMPATH		Default path for user id 0.#    DEFAULT_TERM	What to set the TERM envt variable to.#    USER_FILE		Path of file containing passphrase username pairs#    NOLOGIN_FILE	File which denies all logins containing denial message#    LOG_FILE		Where to output all logging messages## txfr.c:#    WRITE_RETRY_TIME	ms timeout for EAGAIN error on write attempt## Don't change anything below this line unless you are porting to a new# incompatable platform and the existing configuration fails to work.LOGINDFLAGS=-DUSER_FILE=$(USER_FILE) -DLOG_FILE=$(LOG_FILE) -DLOGIN_PROG=$(LOGIN_PROG)GWFLAGS=-DGW_LOG_FILE=$(GW_LOG_FILE)DESSRC	= desblock.c deskey.c descfb.c sboxp.cDESBINSRC = cipher.c getkey.cDESBINOBJ = $(DESBINSRC:.c=.o)DESOBJ	= $(DESSRC:.c=.o)DESHDR	= cipher.h des.h desdefs.hDESMAN	= cipher.1DIST	= desloginCLIHDR	= posignal.h tty.h auth.h txfr.h socket.h log.h deslogin.h utmp.hSERHDR  = $(CLIHDR) pty.h  group.hHDR	= $(SERHDR)CSRC	= deslogin.c deslogind.c deslogingw.c log.c pty.c socket.c txfr.c \          group.c tty.c posignal.c utmp.c auth.c gendeskd.cMANSRC	= deslogin.1 deslogind.1NSTOBJ	= socket.o txfr.o group.oOBJS	= $(DESSRC:.c=.o) $(DESBINSRC:.c=.o) $(CSRC:.c=.o)BINS	= deslogin deslogingw cipher deslogind gendeskd $(TERMBIN)SRC	= README Makefile deslogind.users Notes	keymsg \	  $(HDR) $(CSRC) $(MANSRC)COMOBJ  = tty.o posignal.o auth.o log.o $(DESOBJ)all:		$(BINS)deslogin:	deslogin.o $(COMOBJ) socket.o txfr.o utmp.o		$(CC) $(LDFLAGS) -o $@ $@.o $(COMOBJ) socket.o txfr.o utmp.o $(LIBS)$(TERMBIN) dummy: deslogin.o $(COMOBJ) termsocket.o txfr.o utmp.o		$(CC) $(LDFLAGS) -o $@ deslogin.o $(COMOBJ) termsocket.o \		txfr.o utmp.o $(TERMLIBS)		mv $@ $(TERMBIN)deslogind:	deslogind.o $(COMOBJ) pty.o utmp.o $(NSTOBJ) defkey.o		$(CC) $(LDFLAGS) -o $@ $@.o $(COMOBJ) pty.o utmp.o defkey.o \		$(NSTOBJ) $(LIBS)		cat deslogind.o >defkey.o		rm defkey.odeslogingw:	deslogingw.o $(COMOBJ) socket.o txfr.o 		$(CC) $(LDFLAGS) -o $@ $@.o $(COMOBJ) socket.o txfr.o $(LIBS)deslogind.o:	deslogind.c $(SERHDR) $(DESHDR)		$(CC) $(LOGINDFLAGS) $(CFLAGS) -c deslogind.cdeslogingw.o:	deslogingw.c $(SERHDR) $(DESHDR)		$(CC) $(GWFLAGS) $(CFLAGS) -c deslogingw.cdeslogin.o:	deslogin.c $(CLIHDR) $(DESHDR)		$(CC) $(CFLAGS) -c deslogin.ccipher:		$(DESBINOBJ) $(DESOBJ)		$(CC) $(LDFLAGS) -o $@ $(DESBINOBJ) $(DESOBJ)gendeskd:	gendeskd.o getkey.o $(DESOBJ)		$(CC) $(LDFLAGS) -o $@ $@.o getkey.o $(DESOBJ)defkey.o:	defkey.c		$(CC) $(CFLAGS) -c defkey.c		cat deslogin.h >defkey.c		rm defkey.c# Force symlinks to be created before attempting to compile $(DESOBJ)cipher.h:	linksdefkey.c:	gendeskd		@if [ ! -f keymsg-ok ]; then cat keymsg; touch keymsg-ok; fi		@./gendeskd > $@.tmp		@mv $@.tmp $@socket.o:	socket.c		$(CC) $(NSTCFLAGS) -c socket.ctermsocket.o:	termsocket.c		$(CC) $(NSTCFLAGS) $(TERMDEFINES) -c termsocket.ctermsocket.c:	socket.c		rm -f $@		ln socket.c $@txfr.o:		txfr.c		$(CC) $(NSTCFLAGS) -c txfr.cgroup.o:	group.c		$(CC) $(NSTCFLAGS) -c group.cgetkey.o:	getkey.c		$(CC) $(NSTCFLAGS) -c getkey.clog.o:		log.c		$(CC) $(NSTCFLAGS) -c log.ctty.o:		tty.c		$(CC) $(NSTCFLAGS) -c tty.cman:		$(MANSRC)		nroff -man <$(MANSRC)# No changes needed below hereinstall:	# $(BINS) $(MANSRC) 	@echo	@echo You must install by hand.  Running automatic installation	@echo scripts \(especially as root\) is extremely dangerous.	@echo	@echo It's more secure if $(BINS) are 	@echo stripped, linked statically, and not readable or writeable by 	@echo users other than owner.  They should *NOT* be setuid but 	@echo they can and should be executable by anyone.	@echo 	@echo The following two commands should work:	@echo "   strip $(BINS)	@echo "   chmod 111 $(BINS)"	@echo	@echo --- For system-wide installations ---	@echo Deslogind should be owned by root.	@echo Add to /etc/services:	@echo "   deslogin 3005/tcp"	@echo "   deslogingw 3006/tcp"	@echo Add to /etc/inetd.conf: 	@echo "   deslogin stream tcp nowait root $(BINDIR)/deslogind deslogind -c"	@echo "   deslogingw stream tcp nowait root $(BINDIR)/deslogingw deslogingw -c"	@echo Make sure $(USER_FILE) exists. 	@echo "   If you use deslogind with -c, make sure the file is encrypted"	@echo with cipher using the same passphrase you specifed when building 	@echo deslogind.  See the deslogind man page for details.	@echo	@echo Install the executables with the following commands:	@echo "   cp $(BINS) $$(BINDIR)"	@echo "   cp $(MANSRC) $(MANDIR)"	@echolinks:		$(DESDIR)		if [ ! -f  "$(DESDIR)/des.h" ]; then \		   echo get cipher source code and install in $(DESDIR); \		   exit 1; \		else \		   for i in $(DESSRC) $(DESBINSRC) $(DESHDR); do \		      if [ ! -r $$i ]; then ln -s $(DESDIR)/$$i .; fi; \		   done \		fi		touch linkscleanlinks:	$(DESDIR)		for i in $(DESSRC) $(DESBINSRC) $(DESHDR); do \		   if [ -r $$i ]; then rm -f $$i; fi; \		done		rm termsocket.c		rm -f links$(DIST).tar:	$(SRC)		tar -cvhf - $(SRC) >$(DIST).tartar:		$(DIST).tar		touch tar	tar.Z:		tar		compress <$(DIST).tar >$(DIST).tar.Ztar.gz:		tar		gzip <$(DIST).tar >$(DIST).tar.gzdist:		tar		@set -x; \		VERS=`grep version deslogind.c | \		sed -e 's/^.*version \([0-9.]\{1,3\}\).*$$/\1/'`; \		NAME=$(DIST)-$${VERS}; \		echo "$${NAME}"; \		if [ -d "$${NAME}" ]; then \		   rm -f $${NAME}/*; rmdir $${NAME}; \		fi; \		mkdir $${NAME}; \		cd $${NAME}; \		tar -xf ../$(DIST).tar; \		cd ..; \		tar -cf - $${NAME} | gzip >$${NAME}.tar.gz;		touch distshar:		$(SRC)		shar $(SRC) >$(DIST).sharbtoa:		tar		btoa <$(DIST).tar.Z >$(DIST).btoaclean:		rm -f $(OBJS) termsocket.o defkey.c keymsg-ok $(BINS)clobber: 	clean cleanlinks

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -