tags -1 patch user debian-rele...@lists.debian.org usertags -1 + bsp-2018-12-ch-bern thanks
Find attached the fix for netkit-rsh. For a full explanation, see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=911154#44 Regards, Christoph
diff -Nru netkit-rsh-0.17/debian/compat netkit-rsh-0.17/debian/compat --- netkit-rsh-0.17/debian/compat 2018-03-10 12:09:02.000000000 +0100 +++ netkit-rsh-0.17/debian/compat 2018-03-10 12:09:02.000000000 +0100 @@ -1 +1 @@ -9 +10 diff -Nru netkit-rsh-0.17/debian/control netkit-rsh-0.17/debian/control --- netkit-rsh-0.17/debian/control 2018-03-10 12:09:02.000000000 +0100 +++ netkit-rsh-0.17/debian/control 2018-03-10 12:09:02.000000000 +0100 @@ -3,7 +3,7 @@ Priority: extra Maintainer: Alberto Gonzalez Iniesta <a...@inittab.org> Standards-Version: 3.8.4 -Build-Depends: debhelper (>= 7), libpam-dev +Build-Depends: debhelper (>= 10~), libpam-dev, cmake Package: rsh-client Architecture: any diff -Nru netkit-rsh-0.17/debian/not-installed netkit-rsh-0.17/debian/not-installed --- netkit-rsh-0.17/debian/not-installed 1970-01-01 01:00:00.000000000 +0100 +++ netkit-rsh-0.17/debian/not-installed 2018-03-10 12:09:02.000000000 +0100 @@ -0,0 +1,6 @@ +usr/bin/rexec +usr/share/man/man1/rexec.1 +usr/share/man/man8/in.rlogind.8 +usr/share/man/man8/rexecd.8 +usr/share/man/man8/rlogind.8 +usr/share/man/man8/rshd.8 diff -Nru netkit-rsh-0.17/debian/patches/debian-changes-0.17-17.patch netkit-rsh-0.17/debian/patches/debian-changes-0.17-17.patch --- netkit-rsh-0.17/debian/patches/debian-changes-0.17-17.patch 2018-03-10 12:09:02.000000000 +0100 +++ netkit-rsh-0.17/debian/patches/debian-changes-0.17-17.patch 2018-03-10 12:09:02.000000000 +0100 @@ -2,95 +2,17 @@ Author: Alberto Gonzalez Iniesta <a...@inittab.org> Last-Update: 2018-03-10 ---- netkit-rsh-0.17.orig/configure -+++ netkit-rsh-0.17/configure -@@ -200,64 +200,6 @@ rm -f __conftest* - - ################################################## - --echo -n 'Checking for ncurses... ' --cat <<EOF >__conftest.c --#include <stdio.h> --#include <curses.h> --#ifndef KEY_DOWN --syntax error. /* not ncurses */ --#endif --int main() { -- endwin(); -- return 0; --} -- --EOF --if ( -- $CC $CFLAGS __conftest.c -lncurses -o __conftest || exit 1 -- ) >/dev/null 2>&1; then -- echo 'yes' -- NCURSES=1 --else -- if ( -- $CC $CFLAGS -I/usr/include/ncurses __conftest.c -lncurses -o __conftest || exit 1 -- ) >/dev/null 2>&1; then -- echo '-I/usr/include/ncurses' -- CFLAGS="$CFLAGS -I/usr/include/ncurses" -- NCURSES=1 -- else -- echo 'no' -- fi --fi -- --if [ x$NCURSES != x ]; then -- LIBTERMCAP=-lncurses --else -- echo -n 'Checking for traditional termcap... ' --cat <<EOF >__conftest.c --#include <stdio.h> --#include <termcap.h> --int main() { -- tgetent(NULL, NULL); return 0; --} -- --EOF -- if ( -- $CC $CFLAGS __conftest.c -ltermcap -o __conftest || exit 1 -- ) >/dev/null 2>&1; then -- echo '-ltermcap' -- LIBTERMCAP=-ltermcap -- else -- echo 'not found' -- echo 'This package needs termcap to run.' -- rm -f __conftest* -- exit -- fi --fi --rm -f __conftest* -- --################################################## -- - echo -n 'Checking for GNU libc... ' - cat <<EOF >__conftest.c - #include <stdio.h> ---- netkit-rsh-0.17.orig/rcp/Makefile -+++ netkit-rsh-0.17/rcp/Makefile -@@ -7,7 +7,7 @@ rcp: rcp.o - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ - - install: rcp -- install -s -o root -m$(SUIDMODE) rcp $(INSTALLROOT)$(BINDIR) -+ install -o root -m$(SUIDMODE) rcp $(INSTALLROOT)$(BINDIR) - install -m$(MANMODE) rcp.1 $(INSTALLROOT)$(MANDIR)/man1 - - clean: ---- netkit-rsh-0.17.orig/rcp/pathnames.h -+++ netkit-rsh-0.17/rcp/pathnames.h +--- a/rcp/pathnames.h ++++ b/rcp/pathnames.h @@ -37,4 +37,4 @@ #include <paths.h> #define _PATH_CP "/bin/cp" -#define _PATH_RSH "/usr/bin/rsh" +#define _PATH_RSH "/usr/bin/netkit-rsh" ---- netkit-rsh-0.17.orig/rcp/rcp.c -+++ netkit-rsh-0.17/rcp/rcp.c -@@ -50,6 +50,9 @@ char rcsid[] = "$Id: rcp.c,v 1.15 2000/0 +--- a/rcp/rcp.c ++++ b/rcp/rcp.c +@@ -50,6 +50,9 @@ #include <sys/ioctl.h> #include <sys/socket.h> #include <sys/wait.h> @@ -100,7 +22,7 @@ #include <netinet/in.h> #include <netinet/ip.h> #include <dirent.h> -@@ -64,6 +67,7 @@ char rcsid[] = "$Id: rcp.c,v 1.15 2000/0 +@@ -64,6 +67,7 @@ #include <stdlib.h> #include <string.h> #include <ctype.h> @@ -108,7 +30,7 @@ #include "pathnames.h" #define OPTIONS "dfprt" -@@ -90,7 +94,7 @@ static void verifydir(const char *cp); +@@ -90,7 +94,7 @@ static int okname(const char *cp0); static int susystem(const char *s); static void source(int argc, char *argv[]); @@ -117,7 +39,7 @@ static void sink(int argc, char *argv[]); static BUF *allocbuf(BUF *bp, int fd, int blksize); static void nospace(void); -@@ -262,9 +266,15 @@ toremote(const char *targ, int argc, cha +@@ -262,9 +266,15 @@ nospace(); (void)snprintf(bp, len, "%s -t %s", cmd, targ); host = thost; @@ -135,7 +57,7 @@ if (rem < 0) exit(1); #ifdef IP_TOS -@@ -325,7 +335,14 @@ tolocal(int argc, char *argv[]) +@@ -325,7 +335,14 @@ if (!(bp = malloc(len))) nospace(); (void)snprintf(bp, len, "%s -f %s", cmd, src); @@ -151,7 +73,7 @@ (void)free(bp); if (rem < 0) { ++errs; -@@ -431,20 +448,20 @@ susystem(const char *s) +@@ -431,20 +448,20 @@ static void source(int argc, char *argv[]) { @@ -176,7 +98,7 @@ goto notreg; switch (stb.st_mode&S_IFMT) { -@@ -482,7 +499,8 @@ notreg: (void)close(f); +@@ -482,7 +499,8 @@ } } (void)snprintf(buf, sizeof(buf), @@ -186,7 +108,7 @@ (void)write(rem, buf, (int)strlen(buf)); if (response() < 0) { (void)close(f); -@@ -511,11 +529,11 @@ notreg: (void)close(f); +@@ -511,11 +529,11 @@ } static void @@ -200,7 +122,7 @@ if (!(dirp = opendir(name))) { error("rcp: %s: %s\n", name, strerror(errno)); -@@ -527,17 +545,22 @@ rsource(char *name, struct stat *statp) +@@ -527,17 +545,22 @@ else last++; if (pflag) { @@ -227,7 +149,7 @@ if (response() < 0) { closedir(dirp); return; -@@ -547,13 +570,13 @@ rsource(char *name, struct stat *statp) +@@ -547,13 +570,13 @@ continue; if (!strcmp(dp->d_name, ".") || !strcmp(dp->d_name, "..")) continue; @@ -244,7 +166,7 @@ } closedir(dirp); (void)write(rem, "E\n", 2); -@@ -610,15 +633,17 @@ sink(int argc, char *argv[]) +@@ -610,15 +633,17 @@ { register char *cp; static BUF buffer; @@ -265,7 +187,7 @@ char *np, *vect[1], buf[BUFSIZ]; #define atime tv[0] -@@ -637,7 +662,7 @@ sink(int argc, char *argv[]) +@@ -637,7 +662,7 @@ if (targetshouldbedirectory) verifydir(targ); (void)write(rem, "", 1); @@ -274,7 +196,7 @@ targisdir = 1; for (first = 1;; first = 0) { cp = buf; -@@ -731,7 +756,7 @@ sink(int argc, char *argv[]) +@@ -731,7 +756,7 @@ } else np = targ; @@ -283,7 +205,7 @@ if (buf[0] == 'D') { if (exists) { if ((stb.st_mode&S_IFMT) != S_IFDIR) { -@@ -752,7 +777,7 @@ sink(int argc, char *argv[]) +@@ -752,7 +777,7 @@ } continue; } @@ -292,7 +214,7 @@ bad: error("rcp: %s: %s\n", np, strerror(errno)); continue; } -@@ -793,7 +818,7 @@ bad: error("rcp: %s: %s\n", np, strerr +@@ -793,7 +818,7 @@ if (count != 0 && wrerr == NO && write(ofd, bp->buf, count) != count) wrerr = YES; @@ -301,7 +223,7 @@ error("rcp: can't truncate %s: %s\n", np, strerror(errno)); wrerr = DISPLAYED; -@@ -827,10 +852,10 @@ screwup: +@@ -827,10 +852,10 @@ static BUF * allocbuf(BUF *bp, int fd, int blksize) { @@ -314,40 +236,9 @@ error("rcp: fstat: %s\n", strerror(errno)); return(0); } ---- netkit-rsh-0.17.orig/rexec/Makefile -+++ netkit-rsh-0.17/rexec/Makefile -@@ -10,7 +10,7 @@ $(PROG): $(OBJS) - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ - - install: $(PROG) -- install -s -m $(BINMODE) $(PROG) $(INSTALLROOT)$(BINDIR) -+ install -m $(BINMODE) $(PROG) $(INSTALLROOT)$(BINDIR) - install -m $(MANMODE) $(PROG).1 $(INSTALLROOT)$(MANDIR)/man1 - - clean: ---- netkit-rsh-0.17.orig/rexecd/Makefile -+++ netkit-rsh-0.17/rexecd/Makefile -@@ -9,7 +9,7 @@ include ../MRULES - - ifeq ($(USE_PAM),1) - CFLAGS += -DUSE_PAM --LIBS += -ldl -lpam -+LIBS += -ldl -lpam -lpam_misc - endif - - ifeq ($(USE_SHADOW),1) -@@ -27,7 +27,7 @@ rexecd: rexecd.o - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ - - install: rexecd -- install -s -m$(DAEMONMODE) rexecd $(INSTALLROOT)$(SBINDIR)/in.rexecd -+ install -m$(DAEMONMODE) rexecd $(INSTALLROOT)$(SBINDIR)/in.rexecd - install -m$(MANMODE) rexecd.8 $(INSTALLROOT)$(MANDIR)/man8/in.rexecd.8 - ln -sf in.rexecd.8 $(INSTALLROOT)$(MANDIR)/man8/rexecd.8 - ifeq ($(USE_PAM),1) ---- netkit-rsh-0.17.orig/rexecd/rexecd.c -+++ netkit-rsh-0.17/rexecd/rexecd.c -@@ -89,6 +89,7 @@ char rcsid[] = +--- a/rexecd/rexecd.c ++++ b/rexecd/rexecd.c +@@ -89,6 +89,7 @@ #ifdef USE_PAM #include <security/pam_appl.h> @@ -355,7 +246,7 @@ #endif #define _PATH_FTPUSERS "/etc/ftpusers" -@@ -99,10 +100,6 @@ char rcsid[] = +@@ -99,10 +100,6 @@ struct from_host from_host; #endif @@ -366,7 +257,7 @@ /* * remote execute server: * username\0 -@@ -112,26 +109,36 @@ int deny_severity = LOG_WARNING; +@@ -112,26 +109,36 @@ */ static void fatal(const char *); @@ -407,7 +298,7 @@ openlog(argv[0], LOG_PID, LOG_DAEMON); #ifdef TCP_WRAPPER -@@ -142,28 +149,29 @@ main(int argc, char **argv) +@@ -142,28 +149,29 @@ remote = hosts_info(&from_host); #else { @@ -444,7 +335,7 @@ char **myenviron; #ifdef USE_PAM -@@ -178,6 +186,8 @@ static int PAM_conv (int num_msg, +@@ -178,6 +186,8 @@ struct pam_response *reply = NULL; int size = sizeof(struct pam_response); @@ -453,7 +344,7 @@ #define GET_MEM if (reply) realloc(reply, size); else reply = malloc(size); \ if (!reply) return PAM_CONV_ERR; \ size += sizeof(struct pam_response) -@@ -221,9 +231,9 @@ static struct pam_conv PAM_conversation +@@ -221,9 +231,9 @@ static void @@ -465,7 +356,7 @@ char user[16], pass[16]; struct passwd *pwd; int s = -1; -@@ -273,7 +283,13 @@ doit(struct sockaddr_in *fromp) +@@ -273,7 +283,13 @@ We must connect back to the client here if a port was provided. KRH */ if (port != 0) { @@ -480,7 +371,7 @@ if (s < 0) exit(1); -@@ -283,36 +299,43 @@ doit(struct sockaddr_in *fromp) +@@ -283,36 +299,43 @@ exit(1); #endif alarm(60); @@ -546,7 +437,7 @@ file, so put all authentication/priviledge checks before the corresponding #endif below. */ -@@ -375,10 +398,6 @@ doit(struct sockaddr_in *fromp) +@@ -375,10 +398,6 @@ /* Log successful attempts. */ syslog(LOG_INFO, "login from %.128s as %s", remote, user); @@ -557,7 +448,7 @@ write(2, "\0", 1); if (port) { /* If we have a port, dup STDERR on that port KRH */ -@@ -410,11 +429,32 @@ doit(struct sockaddr_in *fromp) +@@ -410,11 +429,32 @@ exit(1); } @@ -590,7 +481,7 @@ cp2 = strrchr(theshell, '/'); if (cp2) cp2++; else cp2 = theshell; -@@ -439,18 +479,46 @@ fatal(const char *msg) +@@ -439,18 +479,46 @@ exit(1); } @@ -646,19 +537,8 @@ + return buf; } ---- netkit-rsh-0.17.orig/rlogin/Makefile -+++ netkit-rsh-0.17/rlogin/Makefile -@@ -10,7 +10,7 @@ $(PROG): $(OBJS) - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ - - install: $(PROG) -- install -s -o root -m$(SUIDMODE) $(PROG) $(INSTALLROOT)$(BINDIR) -+ install -o root -m$(SUIDMODE) $(PROG) $(INSTALLROOT)$(BINDIR) - install -m $(MANMODE) $(PROG).1 $(INSTALLROOT)$(MANDIR)/man1 - - clean: ---- netkit-rsh-0.17.orig/rlogin/rlogin.1 -+++ netkit-rsh-0.17/rlogin/rlogin.1 +--- a/rlogin/rlogin.1 ++++ b/rlogin/rlogin.1 @@ -40,10 +40,11 @@ .Nd remote login .Sh SYNOPSIS @@ -673,7 +553,7 @@ .Ar host .Sh DESCRIPTION .Nm Rlogin -@@ -64,6 +65,19 @@ option allows an eight-bit input data pa +@@ -64,6 +65,19 @@ parity bits are stripped except when the remote side's stop and start characters are other than ^S/^Q . @@ -693,7 +573,7 @@ .It Fl E The .Fl E -@@ -74,7 +88,8 @@ option, this provides a completely trans +@@ -74,7 +88,8 @@ .It Fl K The .Fl K @@ -703,7 +583,7 @@ .It Fl L The .Fl L -@@ -94,25 +109,12 @@ option allows user specification of the +@@ -94,25 +109,12 @@ ``~'' by default. This specification may be as a literal character, or as an octal value in the form \ennn. @@ -734,7 +614,7 @@ .El .Pp A line of the form ``<escape char>.'' disconnects from the remote host. -@@ -129,35 +131,6 @@ the +@@ -129,35 +131,6 @@ is transparent. Flow control via ^S/^Q and flushing of input and output on interrupts are handled properly. @@ -770,7 +650,7 @@ .Sh ENVIRONMENT The following environment variable is utilized by .Nm rlogin : -@@ -166,10 +139,7 @@ The following environment variable is ut +@@ -166,10 +139,7 @@ Determines the user's terminal type. .El .Sh SEE ALSO @@ -782,9 +662,9 @@ .Sh HISTORY The .Nm rlogin ---- netkit-rsh-0.17.orig/rlogin/rlogin.c -+++ netkit-rsh-0.17/rlogin/rlogin.c -@@ -66,6 +66,9 @@ char rcsid[] = +--- a/rlogin/rlogin.c ++++ b/rlogin/rlogin.c +@@ -66,6 +66,9 @@ #include <stdlib.h> #include <unistd.h> #include <string.h> @@ -794,7 +674,7 @@ /* * rlogin has problems with urgent data when logging into suns which -@@ -180,9 +183,12 @@ main(int argc, char **argv) +@@ -180,9 +183,12 @@ long omask; int argoff, ch, dflag, one, uid; @@ -807,7 +687,7 @@ argoff = dflag = 0; one = 1; -@@ -193,7 +199,8 @@ main(int argc, char **argv) +@@ -193,7 +199,8 @@ else p = argv[0]; @@ -817,7 +697,7 @@ host = p; /* handle "rlogin host flags" */ -@@ -202,7 +209,9 @@ main(int argc, char **argv) +@@ -202,7 +209,9 @@ argoff = 1; } @@ -828,7 +708,7 @@ while ((ch = getopt(argc - argoff, argv + argoff, OPTIONS)) != EOF) switch(ch) { case '8': -@@ -222,9 +231,20 @@ main(int argc, char **argv) +@@ -222,9 +231,20 @@ case 'e': escapechar = getescape(optarg); break; @@ -849,7 +729,7 @@ case '?': default: usage(); -@@ -240,19 +260,33 @@ main(int argc, char **argv) +@@ -240,19 +260,33 @@ if (*argv) usage(); @@ -889,7 +769,7 @@ } t = getenv("TERM"); -@@ -279,7 +313,13 @@ main(int argc, char **argv) +@@ -279,7 +313,13 @@ /* will use SIGUSR1 for window size hack, so hold it off */ omask = sigblock(sigmask(SIGURG) | sigmask(SIGUSR1)); @@ -904,7 +784,7 @@ if (rem < 0) exit(1); -@@ -420,7 +460,7 @@ writeroob(int ignore) +@@ -420,7 +460,7 @@ void catch_child(int ignore) { @@ -913,7 +793,7 @@ int pid; (void)ignore; -@@ -431,7 +471,7 @@ catch_child(int ignore) +@@ -431,7 +471,7 @@ return; /* if the child (reader) dies, just quit */ if (pid < 0 || (pid == childpid && !WIFSTOPPED(status))) @@ -922,7 +802,7 @@ } /* NOTREACHED */ } -@@ -760,7 +800,11 @@ mode(int f) +@@ -760,7 +800,11 @@ break; case 1: /* turn off output mappings */ @@ -934,7 +814,7 @@ /* * turn off canonical processing and character echo; * also turn off signal checking -- ICANON might be -@@ -771,9 +815,11 @@ mode(int f) +@@ -771,9 +815,11 @@ tios.c_cc[VTIME] = 1; tios.c_cc[VMIN] = 1; if (eight) tios.c_iflag &= ~(ISTRIP); @@ -946,7 +826,7 @@ /* * restore current flow control state */ -@@ -830,8 +876,7 @@ static void +@@ -830,8 +876,7 @@ usage(void) { fprintf(stderr, @@ -956,19 +836,8 @@ exit(1); } ---- netkit-rsh-0.17.orig/rlogind/Makefile -+++ netkit-rsh-0.17/rlogind/Makefile -@@ -20,7 +20,7 @@ logwtmp.o: logwtmp.h - auth.o network.o: rlogind.h - - install: rlogind -- install -s -m$(DAEMONMODE) rlogind $(INSTALLROOT)$(SBINDIR)/in.rlogind -+ install -m$(DAEMONMODE) rlogind $(INSTALLROOT)$(SBINDIR)/in.rlogind - install -m$(MANMODE) rlogind.8 $(INSTALLROOT)$(MANDIR)/man8/in.rlogind.8 - ln -sf in.rlogind.8 $(INSTALLROOT)$(MANDIR)/man8/rlogind.8 - ---- netkit-rsh-0.17.orig/rlogind/auth.c -+++ netkit-rsh-0.17/rlogind/auth.c +--- a/rlogind/auth.c ++++ b/rlogind/auth.c @@ -33,6 +33,8 @@ #include <sys/types.h> @@ -978,7 +847,7 @@ #include "rlogind.h" -@@ -106,11 +108,12 @@ static int attempt_auth(void) { +@@ -106,11 +108,12 @@ * or return 0 on authentication success. Dying is discouraged. */ int auth_checkauth(const char *remoteuser, const char *host, @@ -993,7 +862,7 @@ int retval; retval = pam_start("rlogin", localuser, &conv, &pamh); -@@ -122,7 +125,7 @@ int auth_checkauth(const char *remoteuse +@@ -122,7 +125,7 @@ pam_set_item(pamh, PAM_USER, localuser); pam_set_item(pamh, PAM_RUSER, remoteuser); pam_set_item(pamh, PAM_RHOST, host); @@ -1002,7 +871,7 @@ network_confirm(); retval = attempt_auth(); -@@ -131,7 +134,8 @@ int auth_checkauth(const char *remoteuse +@@ -131,7 +134,8 @@ return -1; } @@ -1012,7 +881,7 @@ if (!ln || !*ln) { /* * Authentication wasn't adequate for requirements. -@@ -204,7 +208,7 @@ void auth_finish(void) {} +@@ -204,7 +208,7 @@ * or return 0 on authentication success. Dying is discouraged. */ int auth_checkauth(const char *remoteuser, const char *host, @@ -1021,7 +890,7 @@ { struct passwd *pwd; -@@ -236,7 +240,7 @@ int auth_checkauth(const char *remoteuse +@@ -236,7 +240,7 @@ _check_rhosts_file = use_rhosts; @@ -1030,8 +899,8 @@ } #endif /* PAM */ ---- netkit-rsh-0.17.orig/rlogind/network.c -+++ netkit-rsh-0.17/rlogind/network.c +--- a/rlogind/network.c ++++ b/rlogind/network.c @@ -34,6 +34,7 @@ #include <sys/param.h> /* for MAXHOSTNAMELEN */ #include <sys/socket.h> @@ -1178,7 +1047,7 @@ /* * Actually it might be null if we're out of memory, but -@@ -145,29 +130,42 @@ find_hostname(const struct sockaddr_in * +@@ -145,29 +130,42 @@ char * network_init(int f, int *hostokp) { @@ -1222,12 +1091,12 @@ - fromp = &from; + on = 1; + if (disable_nagle && -+ setsockopt(f, SOL_TCP, TCP_NODELAY, &on, sizeof(on)) < 0) ++ setsockopt(f, SOL_TCP, TCP_NODELAY, &on, sizeof(on)) < 0) + syslog(LOG_WARNING, "setsockopt (TCP_NODELAY): %m"); alarm(60); read(f, &c, 1); -@@ -177,18 +175,28 @@ network_init(int f, int *hostokp) +@@ -177,18 +175,28 @@ alarm(0); @@ -1264,8 +1133,8 @@ u_char optbuf[BUFSIZ/3], *cp; char lbuf[BUFSIZ]; int lboff; ---- netkit-rsh-0.17.orig/rlogind/rlogind.8 -+++ netkit-rsh-0.17/rlogind/rlogind.8 +--- a/rlogind/rlogind.8 ++++ b/rlogind/rlogind.8 @@ -40,7 +40,7 @@ .Nd remote login server .Sh SYNOPSIS @@ -1275,7 +1144,7 @@ .Sh DESCRIPTION .Nm Rlogind is the server for the -@@ -52,7 +52,10 @@ Options supported by +@@ -52,7 +52,10 @@ .Nm rlogind : .Bl -tag -width Ds .It Fl a @@ -1287,7 +1156,7 @@ .It Fl h Permit use of superuser .Dq Pa .rhosts -@@ -75,9 +78,7 @@ Disable keep-alive messages. +@@ -75,9 +78,7 @@ .El .Pp The \-h, \-l, and \-L flags are not used if PAM (Pluggable @@ -1298,7 +1167,7 @@ .Pp The .Fl h -@@ -124,12 +125,7 @@ and +@@ -124,12 +125,7 @@ .Xr named 8 ) . If the hostname cannot be determined, the dot-notation representation of the host address is used. @@ -1312,9 +1181,9 @@ verifying that the name and address correspond. Normal authentication is bypassed if the address verification fails. .El ---- netkit-rsh-0.17.orig/rlogind/rlogind.c -+++ netkit-rsh-0.17/rlogind/rlogind.c -@@ -53,7 +53,6 @@ char rcsid[] = +--- a/rlogind/rlogind.c ++++ b/rlogind/rlogind.c +@@ -53,7 +53,6 @@ */ #include <sys/types.h> /* for size_t */ @@ -1322,7 +1191,7 @@ #include <sys/stat.h> /* for chmod() */ #include <sys/ioctl.h> /* for TIOCPKT */ #include <sys/time.h> /* for FD_SET() et al. */ -@@ -63,6 +62,8 @@ char rcsid[] = +@@ -63,6 +62,8 @@ #include <arpa/inet.h> /* for ntohs() */ #include <stdio.h> /* for EOF, BUFSIZ, snprintf() */ #include <syslog.h> /* for syslog() */ @@ -1331,7 +1200,7 @@ #include <errno.h> #include <unistd.h> #include <stdlib.h> -@@ -72,21 +73,18 @@ char rcsid[] = +@@ -72,21 +73,18 @@ #include "logwtmp.h" #include "rlogind.h" @@ -1357,7 +1226,7 @@ struct winsize win = { 0, 0, 0, 0 }; -@@ -381,6 +379,7 @@ static void getstr(char *buf, int cnt, c +@@ -381,6 +379,7 @@ static void doit(int netfd) { int master, pid, on = 1; @@ -1365,7 +1234,7 @@ int authenticated = 0; char *hname; int hostok; -@@ -391,6 +390,12 @@ static void doit(int netfd) { +@@ -391,6 +390,12 @@ getstr(rusername, sizeof(rusername), "remuser too long"); getstr(lusername, sizeof(lusername), "locuser too long"); getstr(termtype, sizeof(termtype), "Terminal type too long"); @@ -1378,7 +1247,7 @@ /* * This function will either die, return -1 if authentication failed, -@@ -402,7 +407,7 @@ static void doit(int netfd) { +@@ -402,7 +407,7 @@ */ if (hostok) { if (auth_checkauth(rusername, hname, @@ -1387,7 +1256,7 @@ authenticated=1; } } -@@ -412,16 +417,19 @@ static void doit(int netfd) { +@@ -412,16 +417,19 @@ write(netfd, "rlogind: Host address mismatch.\r\n", 33); } @@ -1411,7 +1280,7 @@ on = 1; ioctl(netfd, FIONBIO, &on); ioctl(master, FIONBIO, &on); -@@ -434,14 +442,14 @@ static void doit(int netfd) { +@@ -434,14 +442,14 @@ int main(int argc, char **argv) { int ch; @@ -1429,8 +1298,8 @@ case 'h': allow_root_rhosts = 1; break; case 'L': deny_all_rhosts_hequiv = 1; break; case 'l': use_rhosts = 0; break; ---- netkit-rsh-0.17.orig/rlogind/rlogind.h -+++ netkit-rsh-0.17/rlogind/rlogind.h +--- a/rlogind/rlogind.h ++++ b/rlogind/rlogind.h @@ -1,6 +1,6 @@ /* rlogind.c */ @@ -1439,7 +1308,7 @@ /* network.c */ char *network_init(int fd, int *hostokp); -@@ -12,15 +12,12 @@ void network_close(void); +@@ -12,15 +12,12 @@ void auth_checkoptions(void); void auth_finish(void); int auth_checkauth(const char *remoteuser, const char *host, @@ -1456,35 +1325,24 @@ /* Use TCP keepalive messages on connection? */ extern int keepalive; -@@ -32,3 +29,6 @@ extern int allow_root_rhosts; +@@ -32,3 +29,6 @@ /* Ignore all ~/.rhosts and /etc/hosts_equiv? */ extern int deny_all_rhosts_hequiv; + +/* Disable Nagle algorithm? */ +extern int disable_nagle; ---- netkit-rsh-0.17.orig/rsh/Makefile -+++ netkit-rsh-0.17/rsh/Makefile -@@ -9,7 +9,7 @@ rsh: $(OBJS) - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ - - install: rsh -- install -s -o root -m$(SUIDMODE) rsh $(INSTALLROOT)$(BINDIR) -+ install -o root -m$(SUIDMODE) rsh $(INSTALLROOT)$(BINDIR) - install -m$(MANMODE) rsh.1 $(INSTALLROOT)$(MANDIR)/man1 - - clean: ---- netkit-rsh-0.17.orig/rsh/pathnames.h -+++ netkit-rsh-0.17/rsh/pathnames.h +--- a/rsh/pathnames.h ++++ b/rsh/pathnames.h @@ -34,4 +34,4 @@ * $Id: pathnames.h,v 1.1 1996/07/15 19:58:37 dholland Exp $ */ -#define _PATH_RLOGIN "/usr/bin/rlogin" +#define _PATH_RLOGIN "/usr/bin/netkit-rlogin" ---- netkit-rsh-0.17.orig/rsh/rsh.1 -+++ netkit-rsh-0.17/rsh/rsh.1 -@@ -74,15 +74,6 @@ option turns on socket debugging (using +--- a/rsh/rsh.1 ++++ b/rsh/rsh.1 +@@ -74,15 +74,6 @@ on the .Tn TCP sockets used for communication with the remote host. @@ -1500,7 +1358,7 @@ .It Fl l By default, the remote username is the same as the local username. The -@@ -99,13 +90,6 @@ option redirects input from the special +@@ -99,13 +90,6 @@ (see the .Sx BUGS section of this manual page). @@ -1514,9 +1372,9 @@ .El .Pp If no ---- netkit-rsh-0.17.orig/rsh/rsh.c -+++ netkit-rsh-0.17/rsh/rsh.c -@@ -47,6 +47,9 @@ char rcsid[] = "$Id: rsh.c,v 1.13 2000/0 +--- a/rsh/rsh.c ++++ b/rsh/rsh.c +@@ -47,6 +47,9 @@ #include <sys/ioctl.h> #include <sys/file.h> #include <sys/time.h> @@ -1526,7 +1384,7 @@ #include <netinet/in.h> #include <netdb.h> -@@ -92,7 +95,11 @@ main(int argc, char *argv[]) +@@ -92,7 +95,11 @@ if (p) p++; else p = argv[0]; @@ -1538,7 +1396,7 @@ else host = p; /* handle "rsh host flags" */ -@@ -163,7 +170,14 @@ main(int argc, char *argv[]) +@@ -163,7 +170,14 @@ exit(1); } @@ -1554,30 +1412,8 @@ if (rem < 0) exit(1); ---- netkit-rsh-0.17.orig/rshd/Makefile -+++ netkit-rsh-0.17/rshd/Makefile -@@ -6,16 +6,15 @@ include ../MRULES - OBJS = rshd.o - - ifeq ($(USE_PAM),1) --# ? --CFLAGS += # -DUSE_PAM --LIBS += -ldl # -lpam -lpam_misc -+CFLAGS += -DUSE_PAM -+LIBS += -ldl -lpam - endif - - rshd: $(OBJS) - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ - - install: rshd -- install -s -m$(DAEMONMODE) rshd $(INSTALLROOT)$(SBINDIR)/in.rshd -+ install -m$(DAEMONMODE) rshd $(INSTALLROOT)$(SBINDIR)/in.rshd - install -m$(MANMODE) rshd.8 $(INSTALLROOT)$(MANDIR)/man8/in.rshd.8 - ln -sf in.rshd.8 $(INSTALLROOT)$(MANDIR)/man8/rshd.8 - ---- netkit-rsh-0.17.orig/rshd/rshd.8 -+++ netkit-rsh-0.17/rshd/rshd.8 +--- a/rshd/rshd.8 ++++ b/rshd/rshd.8 @@ -40,7 +40,7 @@ .Nd remote shell server .Sh SYNOPSIS @@ -1587,7 +1423,7 @@ .Sh DESCRIPTION The .Nm rshd -@@ -117,30 +117,15 @@ the system's argument list. +@@ -117,30 +117,15 @@ .It .Nm Rshd then validates the user using @@ -1623,7 +1459,7 @@ .Pp Also note that the design of the .Pa .rhosts -@@ -163,15 +148,6 @@ Transport-level keepalive messages are e +@@ -163,15 +148,6 @@ option is present. The use of keepalive messages allows sessions to be timed out if the client crashes or becomes unreachable. @@ -1639,7 +1475,7 @@ .Sh DIAGNOSTICS Except for the last one listed below, all diagnostic messages -@@ -214,7 +190,7 @@ and is not preceded by a flag byte. +@@ -214,7 +190,7 @@ .Sh SEE ALSO .Xr rsh 1 , .Xr rcmd 3 , @@ -1648,9 +1484,9 @@ .Sh BUGS The authentication procedure used here assumes the integrity of each client machine and the connecting medium. This is ---- netkit-rsh-0.17.orig/rshd/rshd.c -+++ netkit-rsh-0.17/rshd/rshd.c -@@ -79,6 +79,7 @@ char rcsid[] = +--- a/rshd/rshd.c ++++ b/rshd/rshd.c +@@ -79,6 +79,7 @@ #include <stdarg.h> #include <ctype.h> #include <assert.h> @@ -1658,7 +1494,7 @@ #if defined(__GLIBC__) && (__GLIBC__ >= 2) #define _check_rhosts_file __check_rhosts_file -@@ -107,8 +108,11 @@ char *envinit[] = +@@ -107,8 +108,11 @@ extern char **environ; static void error(const char *fmt, ...); @@ -1672,7 +1508,7 @@ extern int _check_rhosts_file; -@@ -145,16 +149,45 @@ static void fail(const char *errorstr, +@@ -145,16 +149,45 @@ exit(1); } @@ -1728,7 +1564,7 @@ } static int getint(void) { -@@ -223,12 +256,23 @@ static void stderr_parent(int sock, int +@@ -223,12 +256,23 @@ } @@ -1753,7 +1589,7 @@ int retcode; #endif struct passwd *pwd = getpwnam(locuser); -@@ -275,26 +319,43 @@ static struct passwd *doauth(const char +@@ -275,26 +319,43 @@ return pwd; #else if (pwd->pw_uid==0 && !allow_root_rhosts) return NULL; @@ -1804,7 +1640,7 @@ if (hostname==NULL) { /* out of memory? */ -@@ -302,36 +363,46 @@ static const char *findhostname(struct s +@@ -302,36 +363,46 @@ exit(1); } @@ -1873,7 +1709,7 @@ const char *theshell, *shellname; char locuser[16], remuser[16]; struct passwd *pwd; -@@ -339,6 +410,14 @@ doit(struct sockaddr_in *fromp) +@@ -339,6 +410,14 @@ const char *hostname; u_short port; int pv[2], pid, ifd; @@ -1888,7 +1724,7 @@ signal(SIGINT, SIG_DFL); signal(SIGQUIT, SIG_DFL); -@@ -350,7 +429,7 @@ doit(struct sockaddr_in *fromp) +@@ -350,7 +429,7 @@ if (port != 0) { int lport = IPPORT_RESERVED - 1; @@ -1897,7 +1733,7 @@ if (sock < 0) { syslog(LOG_ERR, "can't get stderr port: %m"); exit(1); -@@ -359,9 +438,12 @@ doit(struct sockaddr_in *fromp) +@@ -359,9 +438,12 @@ syslog(LOG_ERR, "2nd port not reserved\n"); exit(1); } @@ -1913,7 +1749,7 @@ syslog(LOG_INFO, "connect second port: %m"); exit(1); } -@@ -376,10 +458,14 @@ doit(struct sockaddr_in *fromp) +@@ -376,10 +458,14 @@ getstr(remuser, sizeof(remuser), "remuser"); getstr(locuser, sizeof(locuser), "locuser"); @@ -1930,7 +1766,7 @@ setpwent(); pwd = doauth(remuser, hostname, locuser); -@@ -473,6 +559,11 @@ doit(struct sockaddr_in *fromp) +@@ -473,6 +559,11 @@ else shellname = theshell; endpwent(); @@ -1942,7 +1778,7 @@ if (paranoid) { syslog(LOG_INFO|LOG_AUTH, "%s@%s as %s: cmd='%s'", remuser, hostname, locuser, cmdbuf); -@@ -489,18 +580,22 @@ doit(struct sockaddr_in *fromp) +@@ -489,18 +580,22 @@ exit(1); } @@ -1969,7 +1805,7 @@ if (keepalive && setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char *)&on, sizeof(on)) < 0) -@@ -511,13 +606,12 @@ static void network_init(int fd, struct +@@ -511,13 +606,12 @@ sizeof (linger)) < 0) syslog(LOG_WARNING, "setsockopt (SO_LINGER): %m"); @@ -1986,7 +1822,7 @@ u_char optbuf[BUFSIZ/3], *cp; char lbuf[BUFSIZ+1], *lp; socklen_t optsize = sizeof(optbuf); -@@ -528,7 +622,7 @@ static void network_init(int fd, struct +@@ -528,7 +622,7 @@ ipproto = ip->p_proto; else ipproto = IPPROTO_IP; @@ -1995,7 +1831,7 @@ optsize != 0) { lp = lbuf; -@@ -543,9 +637,9 @@ static void network_init(int fd, struct +@@ -543,9 +637,9 @@ syslog(LOG_NOTICE, "Connection received from %s using IP options" " (ignored): %s", @@ -2007,7 +1843,7 @@ syslog(LOG_ERR, "setsockopt IP_OPTIONS NULL: %m"); exit(1); } -@@ -556,11 +650,16 @@ static void network_init(int fd, struct +@@ -556,11 +650,16 @@ /* * Check originating port for validity. */ @@ -2028,7 +1864,7 @@ } } -@@ -568,7 +667,11 @@ int +@@ -568,7 +667,11 @@ main(int argc, char *argv[]) { int ch; @@ -2041,7 +1877,7 @@ _check_rhosts_file=1; openlog("rshd", LOG_PID | LOG_ODELAY, LOG_DAEMON); -@@ -611,8 +714,9 @@ main(int argc, char *argv[]) +@@ -611,8 +714,9 @@ "pam_rhosts_auth in /etc/pam.conf"); #endif /* USE_PAM */ diff -Nru netkit-rsh-0.17/debian/patches/segfaults_fix.patch netkit-rsh-0.17/debian/patches/segfaults_fix.patch --- netkit-rsh-0.17/debian/patches/segfaults_fix.patch 2018-03-10 12:09:02.000000000 +0100 +++ netkit-rsh-0.17/debian/patches/segfaults_fix.patch 2018-03-10 12:09:02.000000000 +0100 @@ -1,7 +1,5 @@ -Index: netkit-rsh/rcp/rcp.c -=================================================================== ---- netkit-rsh.orig/rcp/rcp.c 2018-03-10 12:12:20.492643151 +0100 -+++ netkit-rsh/rcp/rcp.c 2018-03-10 12:12:41.951355221 +0100 +--- a/rcp/rcp.c ++++ b/rcp/rcp.c @@ -889,7 +889,11 @@ fprintf(fp, "%c", 0x01); vfprintf(fp, fmt, ap); diff -Nru netkit-rsh-0.17/debian/patches/series netkit-rsh-0.17/debian/patches/series --- netkit-rsh-0.17/debian/patches/series 2018-03-10 12:09:02.000000000 +0100 +++ netkit-rsh-0.17/debian/patches/series 2018-03-10 12:09:02.000000000 +0100 @@ -1,2 +1,4 @@ debian-changes-0.17-17.patch segfaults_fix.patch +use-cmake-as-buildsystem.patch +use-cmake-as-buildsystem-debian-extras.patch diff -Nru netkit-rsh-0.17/debian/patches/use-cmake-as-buildsystem-debian-extras.patch netkit-rsh-0.17/debian/patches/use-cmake-as-buildsystem-debian-extras.patch --- netkit-rsh-0.17/debian/patches/use-cmake-as-buildsystem-debian-extras.patch 1970-01-01 01:00:00.000000000 +0100 +++ netkit-rsh-0.17/debian/patches/use-cmake-as-buildsystem-debian-extras.patch 2018-03-10 12:09:02.000000000 +0100 @@ -0,0 +1,91 @@ +Description: Debian-specific changes to the cmake build system +Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de> +Forwarded: not-needed +Last-Update: 2018-11-25 + +--- a/rcp/CMakeLists.txt ++++ b/rcp/CMakeLists.txt +@@ -1,10 +1,10 @@ + + add_executable( +- rcp ++ netkit-rcp + rcp.c + ) + install( +- TARGETS rcp ++ TARGETS netkit-rcp + DESTINATION ${BIN_DIR} + PERMISSIONS + SETUID +@@ -15,4 +15,5 @@ + install( + FILES rcp.1 + DESTINATION ${MAN_DIR}/man1/ ++ RENAME netkit-rcp.1 + ) +--- a/rlogin/CMakeLists.txt ++++ b/rlogin/CMakeLists.txt +@@ -1,11 +1,11 @@ + + add_executable( +- rlogin ++ netkit-rlogin + des_rw.c + rlogin.c + ) + install( +- TARGETS rlogin ++ TARGETS netkit-rlogin + DESTINATION ${BIN_DIR} + PERMISSIONS + SETUID +@@ -16,4 +16,5 @@ + install( + FILES rlogin.1 + DESTINATION ${MAN_DIR}/man1/ ++ RENAME netkit-rlogin.1 + ) +--- a/rsh/CMakeLists.txt ++++ b/rsh/CMakeLists.txt +@@ -1,10 +1,10 @@ + + add_executable( +- rsh ++ netkit-rsh + rsh.c + ) + install( +- TARGETS rsh ++ TARGETS netkit-rsh + DESTINATION ${BIN_DIR} + PERMISSIONS + SETUID +@@ -15,4 +15,5 @@ + install( + FILES rsh.1 + DESTINATION ${MAN_DIR}/man1/ ++ RENAME netkit-rsh.1 + ) +--- a/rshd/CMakeLists.txt ++++ b/rshd/CMakeLists.txt +@@ -6,7 +6,7 @@ + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_PAM") + set( + LIBS +- ${LIBS} dl pam pam_misc ++ ${LIBS} pam pam_misc + ) + endif() + +--- a/rexecd/CMakeLists.txt ++++ b/rexecd/CMakeLists.txt +@@ -1,7 +1,7 @@ + + if(USE_PAM) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_PAM") +- set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ldl -lpam -lpam_misc") ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpam -lpam_misc") + endif() + + if(USE_SHADOW) diff -Nru netkit-rsh-0.17/debian/patches/use-cmake-as-buildsystem.patch netkit-rsh-0.17/debian/patches/use-cmake-as-buildsystem.patch --- netkit-rsh-0.17/debian/patches/use-cmake-as-buildsystem.patch 1970-01-01 01:00:00.000000000 +0100 +++ netkit-rsh-0.17/debian/patches/use-cmake-as-buildsystem.patch 2018-03-10 12:09:02.000000000 +0100 @@ -0,0 +1,256 @@ +Description: Use cmake as build system +Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de> +Bug-Debian: https://bugs.debian.org/912127 +Last-Update: 2018-11-25 + +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,20 @@ ++cmake_minimum_required(VERSION 3.7) ++project(netkit-rsh) ++ ++set(BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin") ++set(SBIN_DIR "${CMAKE_INSTALL_PREFIX}/sbin") ++set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man") ++ ++set(USE_GLIBC 1) ++ ++find_library(USE_CRYPT crypt REQUIRED) ++find_library(USE_PAM pam) ++find_library(USE_TERMCAP lncurses REQUIRED) ++ ++add_subdirectory(rcp) ++add_subdirectory(rexec) ++add_subdirectory(rexecd) ++add_subdirectory(rlogin) ++add_subdirectory(rlogind) ++add_subdirectory(rsh) ++add_subdirectory(rshd) +--- /dev/null ++++ b/rcp/CMakeLists.txt +@@ -0,0 +1,18 @@ ++ ++add_executable( ++ rcp ++ rcp.c ++) ++install( ++ TARGETS rcp ++ DESTINATION ${BIN_DIR} ++ PERMISSIONS ++ SETUID ++ OWNER_WRITE OWNER_READ OWNER_EXECUTE ++ GROUP_READ GROUP_EXECUTE ++) ++ ++install( ++ FILES rcp.1 ++ DESTINATION ${MAN_DIR}/man1/ ++) +--- /dev/null ++++ b/rexec/CMakeLists.txt +@@ -0,0 +1,14 @@ ++ ++add_executable( ++ rexec ++ rexec.c ++) ++install( ++ TARGETS rexec ++ DESTINATION ${BIN_DIR} ++) ++ ++install( ++ FILES rexec.1 ++ DESTINATION ${MAN_DIR}/man1/ ++) +--- /dev/null ++++ b/rexecd/CMakeLists.txt +@@ -0,0 +1,47 @@ ++ ++if(USE_PAM) ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_PAM") ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -ldl -lpam -lpam_misc") ++endif() ++ ++if(USE_SHADOW) ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SHADOW") ++ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${LIBSHADOW}") ++endif() ++ ++# -DRESTRICT_FTP if you want to deny all users in /etc/ftpusers to use rexecd ++#if(RESTRICT_FTP) ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DRESTRICT_FTP") ++#endif() ++ ++add_executable( ++ in.rexecd ++ rexecd.c ++) ++install( ++ TARGETS in.rexecd ++ DESTINATION ${SBIN_DIR} ++) ++ ++install( ++ FILES rexecd.8 ++ DESTINATION ${MAN_DIR}/man8/ ++ RENAME in.rexecd.8 ++) ++install( ++ CODE "execute_process( \ ++ COMMAND ${CMAKE_COMMAND} -E create_symlink \ ++ in.rexecd.8 \$ENV{DESTDIR}${MAN_DIR}/man8/rexecd.8 \ ++ )" ++) ++ ++if(USE_PAM) ++install( ++ CODE "execute_process( \ ++ COMMAND ${CMAKE_COMMAND} -E echo \" \ ++You have chosen to use PAM as the authentication method\n\ ++You should copy the rexec.pam file provided to /etc/pam.d\n\ ++or if you know what you are doing, tailor it to your needs\ ++ \")" ++) ++endif() +--- /dev/null ++++ b/rlogin/CMakeLists.txt +@@ -0,0 +1,19 @@ ++ ++add_executable( ++ rlogin ++ des_rw.c ++ rlogin.c ++) ++install( ++ TARGETS rlogin ++ DESTINATION ${BIN_DIR} ++ PERMISSIONS ++ SETUID ++ OWNER_WRITE OWNER_READ OWNER_EXECUTE ++ GROUP_READ GROUP_EXECUTE ++) ++ ++install( ++ FILES rlogin.1 ++ DESTINATION ${MAN_DIR}/man1/ ++) +--- /dev/null ++++ b/rsh/CMakeLists.txt +@@ -0,0 +1,18 @@ ++ ++add_executable( ++ rsh ++ rsh.c ++) ++install( ++ TARGETS rsh ++ DESTINATION ${BIN_DIR} ++ PERMISSIONS ++ SETUID ++ OWNER_WRITE OWNER_READ OWNER_EXECUTE ++ GROUP_READ GROUP_EXECUTE ++) ++ ++install( ++ FILES rsh.1 ++ DESTINATION ${MAN_DIR}/man1/ ++) +--- /dev/null ++++ b/rshd/CMakeLists.txt +@@ -0,0 +1,36 @@ ++ ++set( ++ LIBS ++) ++if(USE_PAM) ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_PAM") ++ set( ++ LIBS ++ ${LIBS} dl pam pam_misc ++ ) ++endif() ++ ++add_executable( ++ in.rshd ++ rshd.c ++) ++target_link_libraries( ++ in.rshd ++ ${LIBS} ++) ++install( ++ TARGETS in.rshd ++ DESTINATION ${SBIN_DIR} ++) ++ ++install( ++ FILES rshd.8 ++ DESTINATION ${MAN_DIR}/man8/ ++ RENAME in.rshd.8 ++) ++install( ++ CODE "execute_process( \ ++ COMMAND ${CMAKE_COMMAND} -E create_symlink \ ++ in.rshd.8 \$ENV{DESTDIR}${MAN_DIR}/man8/rshd.8 \ ++ )" ++) +--- /dev/null ++++ b/rlogind/CMakeLists.txt +@@ -0,0 +1,55 @@ ++ ++set( ++ SRCS ++ auth.c ++ network.c ++ rlogind.c ++) ++if(USE_PAM) ++ set( ++ SRCS ++ ${SRCS} ++ sockconv.c ++ ) ++endif() ++ ++set( ++ LIBS ++ crypt ++ util ++) ++if(USE_PAM) ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_PAM") ++ set( ++ LIBS ++ ${LIBS} ++ dl ++ pam ++ pam_misc ++ ) ++endif() ++ ++add_executable( ++ in.rlogind ++ ${SRCS} ++) ++target_link_libraries( ++ in.rlogind ++ ${LIBS} ++) ++install( ++ TARGETS in.rlogind ++ DESTINATION ${SBIN_DIR} ++) ++ ++install( ++ FILES rlogind.8 ++ DESTINATION ${MAN_DIR}/man8/ ++ RENAME in.rlogind.8 ++) ++install( ++ CODE "execute_process( \ ++ COMMAND ${CMAKE_COMMAND} -E create_symlink \ ++ in.rlogind.8 \$ENV{DESTDIR}${MAN_DIR}/man8/rlogind.8 \ ++ )" ++) diff -Nru netkit-rsh-0.17/debian/rsh-client.dirs netkit-rsh-0.17/debian/rsh-client.dirs --- netkit-rsh-0.17/debian/rsh-client.dirs 2018-03-10 12:09:02.000000000 +0100 +++ netkit-rsh-0.17/debian/rsh-client.dirs 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -usr/bin -usr/share/man/man1 -usr/share/man/man8 -usr/sbin diff -Nru netkit-rsh-0.17/debian/rsh-client.install netkit-rsh-0.17/debian/rsh-client.install --- netkit-rsh-0.17/debian/rsh-client.install 1970-01-01 01:00:00.000000000 +0100 +++ netkit-rsh-0.17/debian/rsh-client.install 2018-03-10 12:09:02.000000000 +0100 @@ -0,0 +1,4 @@ + +usr/bin/netkit-rcp +usr/bin/netkit-rlogin +usr/bin/netkit-rsh diff -Nru netkit-rsh-0.17/debian/rsh-client.manpages netkit-rsh-0.17/debian/rsh-client.manpages --- netkit-rsh-0.17/debian/rsh-client.manpages 1970-01-01 01:00:00.000000000 +0100 +++ netkit-rsh-0.17/debian/rsh-client.manpages 2018-03-10 12:09:02.000000000 +0100 @@ -0,0 +1,4 @@ + +debian/tmp/usr/share/man/man1/netkit-rcp.1 +debian/tmp/usr/share/man/man1/netkit-rsh.1 +debian/tmp/usr/share/man/man1/netkit-rlogin.1 diff -Nru netkit-rsh-0.17/debian/rsh-server.dirs netkit-rsh-0.17/debian/rsh-server.dirs --- netkit-rsh-0.17/debian/rsh-server.dirs 2018-03-10 12:09:02.000000000 +0100 +++ netkit-rsh-0.17/debian/rsh-server.dirs 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -etc/pam.d -usr/share/man/man5 -usr/share/man/man8 -usr/sbin diff -Nru netkit-rsh-0.17/debian/rsh-server.install netkit-rsh-0.17/debian/rsh-server.install --- netkit-rsh-0.17/debian/rsh-server.install 2018-03-10 12:09:02.000000000 +0100 +++ netkit-rsh-0.17/debian/rsh-server.install 2018-03-10 12:09:02.000000000 +0100 @@ -1,2 +1,10 @@ -usr/share/man/man8 -usr/sbin + +usr/sbin/in.rexecd +usr/sbin/in.rlogind +usr/sbin/in.rshd +debian/checkrhosts usr/sbin/ + +debian/hosts.equiv etc/ +debian/pam.d/rexec etc/pam.d/ +debian/pam.d/rlogin etc/pam.d/ +debian/pam.d/rsh etc/pam.d/ diff -Nru netkit-rsh-0.17/debian/rsh-server.manpages netkit-rsh-0.17/debian/rsh-server.manpages --- netkit-rsh-0.17/debian/rsh-server.manpages 1970-01-01 01:00:00.000000000 +0100 +++ netkit-rsh-0.17/debian/rsh-server.manpages 2018-03-10 12:09:02.000000000 +0100 @@ -0,0 +1,6 @@ + +debian/checkrhosts.8 +debian/rhosts.5 +debian/tmp/usr/share/man/man8/in.rexecd.8 +debian/tmp/usr/share/man/man8/in.rshd.8 +debian/tmp/usr/share/man/man8/in.rshd.8 diff -Nru netkit-rsh-0.17/debian/rules netkit-rsh-0.17/debian/rules --- netkit-rsh-0.17/debian/rules 2018-03-10 12:09:02.000000000 +0100 +++ netkit-rsh-0.17/debian/rules 2018-03-10 12:09:02.000000000 +0100 @@ -1,98 +1,16 @@ #!/usr/bin/make -f -# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export CFLAGS += -Ddebian -DFSUID_HACK -D_GNU_SOURCE -DPKG_EXPORT_BUILDFLAGS = 1 -include /usr/share/dpkg/buildflags.mk +%: + dh $@ --buildsystem=cmake -CDEFS := -Ddebian -DFSUID_HACK -D_GNU_SOURCE - -build: - dh_testdir - - if [ ! -f MCONFIG ]; then \ - ./configure; \ - sed -e 's/^CFLAGS=\(.*\)$$/CFLAGS= $(CDEFS) -g \1/' \ - MCONFIG > MCONFIG.new; \ - mv MCONFIG.new MCONFIG; \ - fi - $(MAKE) - -clean: - dh_testdir - dh_testroot - - [ ! -f MCONFIG ] || $(MAKE) distclean - - dh_clean - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs - - $(MAKE) -C rcp INSTALLROOT=`pwd`/debian/rsh-client/ MANDIR=/usr/share/man install - $(MAKE) -C rlogin INSTALLROOT=`pwd`/debian/rsh-client/ MANDIR=/usr/share/man install - $(MAKE) -C rsh INSTALLROOT=`pwd`/debian/rsh-client/ MANDIR=/usr/share/man install - $(MAKE) -C rexecd INSTALLROOT=`pwd`/debian/rsh-server/ MANDIR=/usr/share/man install - $(MAKE) -C rlogind INSTALLROOT=`pwd`/debian/rsh-server/ MANDIR=/usr/share/man install - $(MAKE) -C rshd INSTALLROOT=`pwd`/debian/rsh-server/ MANDIR=/usr/share/man install - -## rsh-client - mv debian/rsh-client/usr/bin/rcp debian/rsh-client/usr/bin/netkit-rcp - mv debian/rsh-client/usr/bin/rsh debian/rsh-client/usr/bin/netkit-rsh - mv debian/rsh-client/usr/bin/rlogin debian/rsh-client/usr/bin/netkit-rlogin - mv debian/rsh-client/usr/share/man/man1/rcp.1 \ - debian/rsh-client/usr/share/man/man1/netkit-rcp.1 - mv debian/rsh-client/usr/share/man/man1/rsh.1 \ - debian/rsh-client/usr/share/man/man1/netkit-rsh.1 - mv debian/rsh-client/usr/share/man/man1/rlogin.1 \ - debian/rsh-client/usr/share/man/man1/netkit-rlogin.1 - cp debian/pam.d/r* debian/rsh-server/etc/pam.d -## rsh-server - rm debian/rsh-server/usr/share/man/man8/r* - cp debian/*.5 debian/rsh-server/usr/share/man/man5 - cp debian/*.8 debian/rsh-server/usr/share/man/man8 - cp debian/checkrhosts debian/rsh-server/usr/sbin - cp debian/hosts.equiv debian/rsh-server/etc - -# Build architecture-independent files here. -binary-indep: build install -# We have nothing to do by default. - -# Build architecture-dependent files here. -binary-arch: build install -# dh_testversion - dh_testdir - dh_testroot - dh_installdocs - dh_installexamples - dh_installmenu -# dh_installemacsen -# dh_installpam -# dh_installinit - dh_installcron -# dh_installmanpages -# dh_undocumented - dh_installchangelogs ChangeLog - dh_link - dh_strip - dh_compress +override_dh_fixperms: dh_fixperms - # You may want to make some executables suid here. - chmod 4755 debian/rsh-client/usr/bin/* -# dh_makeshlibs - dh_installdeb - dh_shlibdeps - dh_gencontrol - dh_md5sums - dh_builddeb - -source diff: - @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + chmod u+s \ + debian/rsh-client/usr/bin/netkit-rcp \ + debian/rsh-client/usr/bin/netkit-rlogin \ + debian/rsh-client/usr/bin/netkit-rsh -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install +override_dh_missing: + dh_missing --fail-missing
signature.asc
Description: PGP signature