From b9db19b71926ba1d2b0722a43cf538bf139fc0d9 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Mon, 10 May 2021 10:44:54 -0400 Subject: [PATCH] remote_cmds: All compiling --- remote_cmds/Makefile | 16 +++----- remote_cmds/logger.tproj/Makefile | 12 +----- remote_cmds/talk.tproj/Makefile | 18 +++------ remote_cmds/talkd.tproj/Makefile | 18 +++------ remote_cmds/telnet.tproj/Makefile | 26 ++++++------- remote_cmds/telnet.tproj/telnet.c | 2 +- remote_cmds/telnetd.tproj/Makefile | 56 ++++++---------------------- remote_cmds/telnetd.tproj/sys_term.c | 2 +- remote_cmds/tftp.tproj/Makefile | 14 ++----- remote_cmds/tftpd.tproj/Makefile | 19 +++------- remote_cmds/wall.tproj/Makefile | 18 ++------- 11 files changed, 56 insertions(+), 145 deletions(-) diff --git a/remote_cmds/Makefile b/remote_cmds/Makefile index 7347ea8..1ffac6f 100644 --- a/remote_cmds/Makefile +++ b/remote_cmds/Makefile @@ -1,12 +1,6 @@ -Project = remote_cmds +SUBDIR= \ + logger.tproj\ + talk.tproj talkd.tproj telnet.tproj telnetd.tproj tftp.tproj\ + tftpd.tproj wall.tproj -ifeq "$(RC_TARGET_CONFIG)" "iPhone" -SubProjects = telnetd.tproj -else -SubProjects = \ - logger.tproj\ - talk.tproj talkd.tproj telnet.tproj telnetd.tproj tftp.tproj\ - tftpd.tproj wall.tproj -endif - -include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make +.include diff --git a/remote_cmds/logger.tproj/Makefile b/remote_cmds/logger.tproj/Makefile index 002cb56..b913354 100644 --- a/remote_cmds/logger.tproj/Makefile +++ b/remote_cmds/logger.tproj/Makefile @@ -1,11 +1,3 @@ -Project = logger -Install_Dir = /usr/bin +PROG= logger -CFILES = logger.c -MANPAGES = logger.1 - -Extra_CC_Flags = -Wall -Werror -mdynamic-no-pic -Extra_CC_Flags += -D__FBSDID=__RCSID -Extra_LD_Flags = -dead_strip - -include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make +.include diff --git a/remote_cmds/talk.tproj/Makefile b/remote_cmds/talk.tproj/Makefile index 47e3631..ea9860e 100644 --- a/remote_cmds/talk.tproj/Makefile +++ b/remote_cmds/talk.tproj/Makefile @@ -1,14 +1,8 @@ -Project = talk -Install_Dir = /usr/bin +PROG= talk +SRCS= ctl_transact.c ctl.c display.c get_addrs.c \ + get_iface.c get_names.c init_disp.c invite.c \ + io.c look_up.c msgs.c talk.c -HFILES = talk.h talk_ctl.h -CFILES = ctl.c ctl_transact.c display.c get_addrs.c get_names.c\ - get_iface.c init_disp.c invite.c io.c look_up.c msgs.c talk.c -MANPAGES = talk.1 +LDADD=-lncursesw -Extra_CC_Flags = -Wall -Werror -fPIE -Extra_LD_Flags = -dead_strip -pie - -Extra_LD_Libraries = -lcurses - -include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make +.include diff --git a/remote_cmds/talkd.tproj/Makefile b/remote_cmds/talkd.tproj/Makefile index f67b40b..dd14031 100644 --- a/remote_cmds/talkd.tproj/Makefile +++ b/remote_cmds/talkd.tproj/Makefile @@ -1,14 +1,8 @@ -Project = ntalkd -Install_Dir = /usr/libexec +PROG= talkd +MAN= ntalkd.8 +SRCS= announce.c print.c process.c \ + table.c talkd.c ttymsg.c -HFILES = talkd.h -CFILES = announce.c print.c process.c table.c talkd.c ../wall.tproj/ttymsg.c -MANPAGES = ntalkd.8 -LAUNCHD_PLISTS = ntalk.plist +.PATH: ../wall.tproj -Extra_CC_Flags = -Wall -Werror -fPIE -Extra_LD_Flags = -dead_strip -pie - -Extra_CC_Flags += -D__FBSDID=__RCSID - -include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make +.include diff --git a/remote_cmds/telnet.tproj/Makefile b/remote_cmds/telnet.tproj/Makefile index dc8569b..281feaf 100644 --- a/remote_cmds/telnet.tproj/Makefile +++ b/remote_cmds/telnet.tproj/Makefile @@ -1,18 +1,14 @@ -Project = telnet -Install_Dir = /usr/local/bin +PROG= telnet +SRCS= authenc.c commands.c main.c network.c \ + ring.c sys_bsd.c telnet.c terminal.c tn3270.c \ + utilities.c genget.c auth.c misc.c -HFILES = externs.h fdset.h general.h krb4-proto.h ring.h types.h\ - defines.h misc.h misc-proto.h -CFILES = authenc.c commands.c main.c network.c ring.c sys_bsd.c\ - telnet.c terminal.c tn3270.c utilities.c +CFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK \ + -DAUTHENTICATION -DSKEY -DIPSEC -DINET6 -DFORWARD \ + -I${.CURDIR}/../../lib + # -DENCRYPTION -DKRB4 +LDADD=-lncursesw -lipsec -Extra_CC_Flags = -Wall -Werror -Wno-string-plus-int -fPIE -Extra_CC_Flags += -D__FBSDID=__RCSID -Extra_LD_Flags = -dead_strip -pie +.PATH: ../../lib/libtelnet -Extra_CC_Flags += -DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK \ - -DAUTHENTICATION -DKRB5 -DSKEY -DIPSEC -DINET6 -DFORWARD - # -DENCRYPTION -DKRB4 -Extra_LD_Libraries = -lcurses -lkrb4 -lkrb5 -lipsec -ltelnet - -include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make +.include diff --git a/remote_cmds/telnet.tproj/telnet.c b/remote_cmds/telnet.tproj/telnet.c index 541cf9b..2e63f8d 100644 --- a/remote_cmds/telnet.tproj/telnet.c +++ b/remote_cmds/telnet.tproj/telnet.c @@ -667,7 +667,7 @@ is_unique(char *name, char **as, char **ae) return (1); } -#ifdef TERMCAP +#ifndef TERMCAP char termbuf[1024]; /*ARGSUSED*/ diff --git a/remote_cmds/telnetd.tproj/Makefile b/remote_cmds/telnetd.tproj/Makefile index c3f7feb..356d977 100644 --- a/remote_cmds/telnetd.tproj/Makefile +++ b/remote_cmds/telnetd.tproj/Makefile @@ -1,50 +1,16 @@ -Project = telnetd -ifeq "$(RC_TARGET_CONFIG)" "iPhone" -Install_Dir = /usr/libexec -else -Install_Dir = /usr/local/libexec -endif +PROG= telnetd +MAN= telnetd.8 -HFILES = defs.h ext.h pathnames.h telnetd.h -CFILES = global.c slc.c state.c sys_term.c telnetd.c\ - termstat.c utility.c -ifeq "$(RC_TARGET_CONFIG)" "iPhone" -LAUNCHD_PLISTS = telnet.plist -endif +SRCS= global.c slc.c state.c sys_term.c telnetd.c \ + termstat.c utility.c getent.c -Extra_CC_Flags = -Wall -Werror -Wno-string-plus-int -fPIE -Extra_CC_Flags += -D__FBSDID=__RCSID -Extra_LD_Flags = -dead_strip -pie +BINDIR=/usr/libexec -Extra_CC_Flags += -DNO_UTMP -DLINEMODE -DKLUDGELINEMODE -DUSE_TERMIO \ - -DDIAGNOSTICS -DOLD_ENVIRON -DENV_HACK -DINET6 \ - # -DAUTHENTICATION -DENCRYPTION -Extra_LD_Libraries = -lcurses -ltelnet +CFLAGS+= -DNO_UTMP -DLINEMODE -DKLUDGELINEMODE -DUSE_TERMIO \ + -DDIAGNOSTICS -DOLD_ENVIRON -DENV_HACK -DINET6 \ + -I${.CURDIR}/../../lib +LDADD=-lncursesw -include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make +.PATH: ../../lib/libtelnet -after_install: -ifeq "$(RC_TARGET_CONFIG)" "iPhone" - /usr/libexec/PlistBuddy -x \ - -c "Delete :Disabled" \ - -c "Add :PosixSpawnType string Interactive" \ - -c "Delete :SessionCreate" \ - -c "Set :Sockets:Listeners:Bonjour false" \ - -c "Add :Sockets:Listeners:SockFamily string IPv4" \ - -c "Add :Sockets:Listeners:SockNodeName string localhost" \ - "$(DSTROOT)/System/Library/LaunchDaemons/telnet.plist" -ifeq "$(RC_PLATFORM_NAME)" "BridgeOS" - /usr/libexec/PlistBuddy -x \ - -c "Delete :Sockets:Listeners:SockNodeName" \ - -c "Delete :Sockets:Listeners:SockFamily" \ - "$(DSTROOT)/System/Library/LaunchDaemons/telnet.plist" -endif - plutil -convert binary1 "$(DSTROOT)/System/Library/LaunchDaemons/$(LAUNCHD_PLISTS)" -endif - /usr/bin/codesign --force --sign - --entitlements entitlements.plist $(DSTROOT)$(Install_Dir)/$(Project) - -# Install a special launchd plist for the DebugDiskImage (38885624) -ifeq "$(RC_TARGET_CONFIG)" "iPhone" - plutil -replace ProgramArguments -json '["/var/personalized_debug/usr/libexec/telnetd","-p","/var/personalized_debug/usr/bin/login"]' -o "$(DSTROOT)/System/Library/LaunchDaemons/telnet.debug.plist" "$(DSTROOT)/System/Library/LaunchDaemons/telnet.plist" - plutil -replace Label -string com.apple.telnetd.debug "$(DSTROOT)/System/Library/LaunchDaemons/telnet.debug.plist" -endif +.include diff --git a/remote_cmds/telnetd.tproj/sys_term.c b/remote_cmds/telnetd.tproj/sys_term.c index 23da55b..d47d541 100644 --- a/remote_cmds/telnetd.tproj/sys_term.c +++ b/remote_cmds/telnetd.tproj/sys_term.c @@ -423,7 +423,7 @@ spcset(int func, cc_t *valp, cc_t **valpp) * Returns the file descriptor of the opened pty. */ char alpha[] = "0123456789abcdefghijklmnopqrstuv"; -char line[16]; +//char line[16]; int getpty(int *ptynum __unused, int *slavepty) diff --git a/remote_cmds/tftp.tproj/Makefile b/remote_cmds/tftp.tproj/Makefile index 6ed62a0..b6ea090 100644 --- a/remote_cmds/tftp.tproj/Makefile +++ b/remote_cmds/tftp.tproj/Makefile @@ -1,12 +1,6 @@ -Project = tftp +PROG= tftp +SRCS= main.c tftp.c tftpsubs.c -HFILES = extern.h tftpsubs.h -CFILES = main.c tftp.c tftpsubs.c -MANPAGES = tftp.1 +LDADD=-ledit -Extra_CC_Flags = -Wall -Werror -fPIE -Extra_CC_Flags += -D__FBSDID=__RCSID -Extra_LD_Flags = -dead_strip -pie -Extra_LD_Flags += -ledit - -include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make +.include diff --git a/remote_cmds/tftpd.tproj/Makefile b/remote_cmds/tftpd.tproj/Makefile index e48f484..60b2853 100644 --- a/remote_cmds/tftpd.tproj/Makefile +++ b/remote_cmds/tftpd.tproj/Makefile @@ -1,16 +1,9 @@ -Project = tftpd -Install_Dir = /usr/libexec +PROG= tftpd +SRCS= tftpd.c tftpsubs.c +MAN= tftpd.8 -HFILES = tftpsubs.h -CFILES = tftpd.c ../tftp.tproj/tftpsubs.c -MANPAGES = tftpd.8 -LAUNCHD_PLISTS = tftp.plist +BINDIR=/usr/libexec -Extra_CC_Flags = -Wall -Werror -fPIE -Extra_CC_Flags += -D__FBSDID=__RCSID -Extra_LD_Flags = -dead_strip -pie +.PATH: ../tftp.tproj -include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make - -after_install: - $(MKDIR) "$(DSTROOT)/private/tftpboot" +.include diff --git a/remote_cmds/wall.tproj/Makefile b/remote_cmds/wall.tproj/Makefile index 08da621..06e0547 100644 --- a/remote_cmds/wall.tproj/Makefile +++ b/remote_cmds/wall.tproj/Makefile @@ -1,16 +1,4 @@ -Project = wall -Install_Dir = /usr/bin +PROG= wall +SRCS= ttymsg.c wall.c -HFILES = ttymsg.h -CFILES = ttymsg.c wall.c -MANPAGES = wall.1 - -Extra_CC_Flags = -Wall -Werror -mdynamic-no-pic -Extra_LD_Flags = -dead_strip - -Extra_CC_Flags += -D__FBSDID=__RCSID - -include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make - -#Install_Program_Mode = 02555 -#Install_Program_Group = tty +.include -- 2.47.1