diff options
author | Armin Kuster <akuster808@gmail.com> | 2014-12-14 09:32:59 -0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-12-19 20:10:56 +0100 |
commit | 3856a63fc99b688f8fb314581f8a6c35f98ec2d4 (patch) | |
tree | 685968852dc710908f63d7d4594acb393c6abc06 /meta-networking | |
parent | 2114db3000396d849f0a13501151f60cf717afab (diff) | |
download | meta-openembedded-3856a63fc99b688f8fb314581f8a6c35f98ec2d4.tar.gz |
netkit-rsh: add new package
V2: added PAM config option
fixed link bug
moved files to PN location
fixed BSD license
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-networking')
6 files changed, 271 insertions, 0 deletions
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch new file mode 100644 index 000000000..fdd535be1 --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/no_pam_build_fix.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | netkit-rsh: | ||
2 | Allow to build with no PAM enabled. | ||
3 | |||
4 | Upstream-Status: Inappropriate [ no upstream maintaner ] | ||
5 | |||
6 | Signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
7 | |||
8 | Index: netkit-rsh-0.17/rshd/rshd.c | ||
9 | =================================================================== | ||
10 | --- netkit-rsh-0.17.orig/rshd/rshd.c | ||
11 | +++ netkit-rsh-0.17/rshd/rshd.c | ||
12 | @@ -110,9 +110,11 @@ extern char **environ; | ||
13 | static void error(const char *fmt, ...); | ||
14 | static void doit(struct sockaddr *fromp, socklen_t fromlen); | ||
15 | static char *getstr(char *, size_t, const char *); | ||
16 | +#ifdef USE_PAM | ||
17 | static int err_conv( | ||
18 | int, const struct pam_message **, struct pam_response **, void * | ||
19 | ); | ||
20 | +#endif /* USE_PAM */ | ||
21 | |||
22 | extern int _check_rhosts_file; | ||
23 | |||
24 | @@ -256,6 +258,7 @@ static void stderr_parent(int sock, int | ||
25 | } | ||
26 | |||
27 | |||
28 | +#ifdef USE_PAM | ||
29 | static int err_conv( | ||
30 | int num_msg, const struct pam_message **msg, | ||
31 | struct pam_response **resp, void *appdata_ptr | ||
32 | @@ -266,6 +269,7 @@ static int err_conv( | ||
33 | (void) appdata_ptr; | ||
34 | return PAM_CONV_ERR; | ||
35 | } | ||
36 | +#endif | ||
37 | |||
38 | static struct passwd *doauth(const char *remuser, | ||
39 | const char *hostname, | ||
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit new file mode 100644 index 000000000..80aed36ff --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit | |||
@@ -0,0 +1,20 @@ | |||
1 | # default: off | ||
2 | # description: | ||
3 | # Rexecd is the server for the rexec program. The server provides remote | ||
4 | # execution facilities with authentication based on user names and | ||
5 | # passwords. | ||
6 | # | ||
7 | service exec | ||
8 | { | ||
9 | socket_type = stream | ||
10 | protocol = tcp | ||
11 | flags = NAMEINARGS | ||
12 | wait = no | ||
13 | user = root | ||
14 | group = root | ||
15 | log_on_success += USERID | ||
16 | log_on_failure += USERID | ||
17 | server = /usr/bin/tcpd | ||
18 | server_args = /usr/sbin/in.rexecd | ||
19 | disable = yes | ||
20 | } | ||
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit new file mode 100644 index 000000000..00dbf935b --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit | |||
@@ -0,0 +1,23 @@ | |||
1 | # default: off | ||
2 | # description: | ||
3 | # Rlogind is a server for the rlogin program. The server provides remote | ||
4 | # execution with authentication based on privileged port numbers from trusted | ||
5 | # host | ||
6 | # | ||
7 | service login | ||
8 | { | ||
9 | socket_type = stream | ||
10 | protocol = tcp | ||
11 | flags = NAMEINARGS | ||
12 | wait = no | ||
13 | user = root | ||
14 | group = root | ||
15 | log_on_success += USERID | ||
16 | log_on_failure += USERID | ||
17 | server = /usr/bin/tcpd | ||
18 | server_args = /usr/sbin/in.rlogind -a | ||
19 | disable = yes | ||
20 | } | ||
21 | |||
22 | |||
23 | |||
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch new file mode 100644 index 000000000..c12ee9b46 --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh-redone_link_order_file.patch | |||
@@ -0,0 +1,77 @@ | |||
1 | This fixes a build issue caused by linking order. | ||
2 | |||
3 | Upstream-Status: Inappropriate | ||
4 | Most distos have there own verison of this fix. This was derived by | ||
5 | * Fix link order to list libraries after the objects that require them | ||
6 | (LP: #771080). | ||
7 | |||
8 | -- Colin Watson <cjwatson@ubuntu.com> Tue, 13 Sep 2011 10:07:08 +0100 | ||
9 | |||
10 | |||
11 | signed-off-by: Armin Kuster <akuster808@gmail.com> | ||
12 | |||
13 | Index: netkit-rsh-0.17/rsh/Makefile | ||
14 | =================================================================== | ||
15 | --- netkit-rsh-0.17.orig/rsh/Makefile | ||
16 | +++ netkit-rsh-0.17/rsh/Makefile | ||
17 | @@ -6,7 +6,7 @@ include ../MRULES | ||
18 | OBJS = rsh.o | ||
19 | |||
20 | rsh: $(OBJS) | ||
21 | - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ | ||
22 | + $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) | ||
23 | |||
24 | install: rsh | ||
25 | install -o root -m$(SUIDMODE) rsh $(INSTALLROOT)$(BINDIR) | ||
26 | Index: netkit-rsh-0.17/rshd/Makefile | ||
27 | =================================================================== | ||
28 | --- netkit-rsh-0.17.orig/rshd/Makefile | ||
29 | +++ netkit-rsh-0.17/rshd/Makefile | ||
30 | @@ -11,7 +11,7 @@ LIBS += -ldl -lpam | ||
31 | endif | ||
32 | |||
33 | rshd: $(OBJS) | ||
34 | - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ | ||
35 | + $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) | ||
36 | |||
37 | install: rshd | ||
38 | install -m$(DAEMONMODE) rshd $(INSTALLROOT)$(SBINDIR)/in.rshd | ||
39 | Index: netkit-rsh-0.17/rlogin/Makefile | ||
40 | =================================================================== | ||
41 | --- netkit-rsh-0.17.orig/rlogin/Makefile | ||
42 | +++ netkit-rsh-0.17/rlogin/Makefile | ||
43 | @@ -7,7 +7,7 @@ PROG=rlogin | ||
44 | OBJS=rlogin.o | ||
45 | |||
46 | $(PROG): $(OBJS) | ||
47 | - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ | ||
48 | + $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) | ||
49 | |||
50 | install: $(PROG) | ||
51 | install -o root -m$(SUIDMODE) $(PROG) $(INSTALLROOT)$(BINDIR) | ||
52 | Index: netkit-rsh-0.17/rlogind/Makefile | ||
53 | =================================================================== | ||
54 | --- netkit-rsh-0.17.orig/rlogind/Makefile | ||
55 | +++ netkit-rsh-0.17/rlogind/Makefile | ||
56 | @@ -13,7 +13,7 @@ LIBS += -ldl -lpam -lpam_misc | ||
57 | endif | ||
58 | |||
59 | rlogind: $(OBJS) | ||
60 | - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ | ||
61 | + $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) | ||
62 | |||
63 | rlogind.o: pathnames.h logwtmp.h rlogind.h ../version.h | ||
64 | logwtmp.o: logwtmp.h | ||
65 | Index: netkit-rsh-0.17/rexecd/Makefile | ||
66 | =================================================================== | ||
67 | --- netkit-rsh-0.17.orig/rexecd/Makefile | ||
68 | +++ netkit-rsh-0.17/rexecd/Makefile | ||
69 | @@ -24,7 +24,7 @@ endif | ||
70 | CFLAGS += -DRESTRICT_FTP=1 | ||
71 | |||
72 | rexecd: rexecd.o | ||
73 | - $(CC) $(LDFLAGS) $^ $(LIBS) -o $@ | ||
74 | + $(CC) $^ -o $@ $(LDFLAGS) $(LIBS) | ||
75 | |||
76 | install: rexecd | ||
77 | install -m$(DAEMONMODE) rexecd $(INSTALLROOT)$(SBINDIR)/in.rexecd | ||
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit new file mode 100644 index 000000000..ad59b6207 --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit | |||
@@ -0,0 +1,21 @@ | |||
1 | # default: off | ||
2 | # description: | ||
3 | # The rshd server is a server for the rcmd(3) routine and, | ||
4 | # consequently, for the rsh(1) program. The server provides | ||
5 | # remote execution facilities with authentication based on | ||
6 | # privileged port numbers from trusted hosts. | ||
7 | # | ||
8 | service shell | ||
9 | { | ||
10 | socket_type = stream | ||
11 | protocol = tcp | ||
12 | flags = NAMEINARGS | ||
13 | wait = no | ||
14 | user = root | ||
15 | group = root | ||
16 | log_on_success += USERID | ||
17 | log_on_failure += USERID | ||
18 | server = /usr/bin/tcpd | ||
19 | server_args = /usr/sbin/in.rshd -aL | ||
20 | disable = yes | ||
21 | } | ||
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb new file mode 100644 index 000000000..8b42fa7cb --- /dev/null +++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb | |||
@@ -0,0 +1,91 @@ | |||
1 | DESCRIPTION = "netkit-rsh includes the rsh daemon and client." | ||
2 | SECTION = "networking" | ||
3 | HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit" | ||
4 | LICENSE = "BSD-4-Clause" | ||
5 | DEPENDS = "xinetd libgcrypt" | ||
6 | |||
7 | LIC_FILES_CHKSUM = "file://rsh/rsh.c;beginline=2;endline=3;md5=25737e9d21d9df251dd26b7dcbd8ee29" | ||
8 | |||
9 | SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}.orig.tar.gz;name=archive \ | ||
10 | ${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}-15.diff.gz;name=patch15 \ | ||
11 | file://rsh-redone_link_order_file.patch \ | ||
12 | file://no_pam_build_fix.patch \ | ||
13 | file://rexec.xinetd.netkit \ | ||
14 | file://rlogin.xinetd.netkit \ | ||
15 | file://rsh.xinetd.netkit \ | ||
16 | " | ||
17 | |||
18 | SRC_URI[archive.md5sum] = "65f5f28e2fe22d9ad8b17bb9a10df096" | ||
19 | SRC_URI[archive.sha256sum] = "edcac7fa18015f0bc04e573f3f54ae3b638d71335df1ad7dae692779914ad669" | ||
20 | SRC_URI[patch15.md5sum] = "655efc0d541b03ca5de0ae506c805ea3" | ||
21 | SRC_URI[patch15.sha256sum] = "2bc071c438e8b0ed42a0bd2db2d8b681b27a1e9b1798694d9874733293bc2aa9" | ||
22 | |||
23 | inherit pkgconfig | ||
24 | |||
25 | CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations" | ||
26 | LDFLAGS += " -L${STAGING_LIBDIR} -lutil -lcrypt" | ||
27 | |||
28 | PACKAGECONFIG ??= "" | ||
29 | PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "pam", "pam", "", d)}" | ||
30 | PACKAGECONFIG[pam] = " , --without-pam, libpam, libpam" | ||
31 | |||
32 | do_configure () { | ||
33 | ./configure --prefix=${prefix} | ||
34 | echo "INSTALLROOT=${D}" > MCONFIG | ||
35 | |||
36 | if [ "${@base_contains('PACKAGECONFIG', 'pam', 'pam', '', d)}" != "" ]; then | ||
37 | echo "USE_PAM=1" >> MCONFIG | ||
38 | fi | ||
39 | |||
40 | # didn't want to patch these next changes | ||
41 | sed -i 's/netkit-//' ${S}/rsh/pathnames.h | ||
42 | sed -i 's/netkit-//' ${S}/rcp/pathnames.h | ||
43 | } | ||
44 | |||
45 | do_install () { | ||
46 | install -d ${D}${bindir} | ||
47 | install -d ${D}${sbindir} | ||
48 | install -d ${D}${mandir}/man1 | ||
49 | install -d ${D}${mandir}/man8 | ||
50 | install -d ${D}${sysconfdir}/xinetd.d | ||
51 | |||
52 | oe_runmake 'INSTALLROOT=${D}' 'BINMODE=0755' \ | ||
53 | 'DAEMONMODE=0755' 'MANMODE=0644' \ | ||
54 | 'SUIDMODE=4755' \ | ||
55 | 'BINDIR=${bindir}' 'SBINDIR=${sbindir}' \ | ||
56 | 'MANDIR=${mandir}' install | ||
57 | |||
58 | if [ "${@base_contains('PACKAGECONFIG', 'pam', 'pam', '', d)}" != "" ]; then | ||
59 | install -d ${D}${sysconfdir}/pam.d | ||
60 | install -m 0644 debian/hosts.equiv ${D}/${sysconfdir} | ||
61 | install -m 0644 debian/pam.d/rexec ${D}/${sysconfdir}/pam.d | ||
62 | install -m 0644 debian/pam.d/rlogin ${D}/${sysconfdir}/pam.d | ||
63 | install -m 0644 debian/pam.d/rsh ${D}/${sysconfdir}/pam.d | ||
64 | fi | ||
65 | cp ${WORKDIR}/rexec.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rexec | ||
66 | cp ${WORKDIR}/rlogin.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rlogin | ||
67 | cp ${WORKDIR}/rsh.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rsh | ||
68 | } | ||
69 | |||
70 | PACKAGES = "${PN}-client ${PN}-server ${PN}-doc ${BPN}-dbg" | ||
71 | |||
72 | FILES_${PN}-client = "${bindir}/*" | ||
73 | FILES_${PN}-server = "${sbindir}/* ${sysconfdir}" | ||
74 | FILES_${PN}-doc = "${mandir}" | ||
75 | FILES_${PN}-dbg = "${prefix}/src/debug \ | ||
76 | ${sbindir}/.debug ${bindir}/.debug" | ||
77 | |||
78 | ALTERNATIVE_PRIORITY = "80" | ||
79 | ALTERNATIVE_${PN}-client = "rcp rexec rlogin rsh" | ||
80 | ALTERNATIVE_${PN}-server = "rshd rexecd rlogind" | ||
81 | ALTERNATIVE_LINK_NAME[server] = "${bindir}/rshd" | ||
82 | ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd" | ||
83 | ALTERNATIVE_LINK_NAME[rexecd] = "${bindir}/rexecd" | ||
84 | ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd" | ||
85 | ALTERNATIVE_LINK_NAME[rlogind] = "${bindir}/rlogind" | ||
86 | ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind" | ||
87 | |||
88 | RCONFLICTS_${PN}-client += "inetutils-rshd" | ||
89 | RPROVIDES_${PN}-rshd = "rshd" | ||
90 | |||
91 | RDEPENDS_${PN} = "xinetd" | ||