summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingli Yu <mingli.yu@windriver.com>2016-01-27 16:43:03 +0800
committerJoe MacDonald <joe_macdonald@mentor.com>2016-02-22 15:51:19 -0500
commit8895bd0b73cd6b7ed933737506fd03cf44e42530 (patch)
treee72c99be6b21c3141c4afa199bfea3a78ba1fbfa
parentd780562322092894f8f0545ab751cc34133f9b91 (diff)
downloadmeta-openembedded-8895bd0b73cd6b7ed933737506fd03cf44e42530.tar.gz
netkit-rsh: add two patches and some fixes.
* Update the checksum of the license text to include all the license text to instead of the previous only from two to three line. * Customize compile option such as CFLAGS= -D_GNU_SOURCE and the specific install folder. * Customize pam configuration file for rsh, rexec. and rlogin to make them work. * Update the line "server = /usr/bin/tcpd" to "server = /usr/sbin/tcpd" for /etc/xinetd.d/{rexec,rlogin,rsh}. * Fix some typo such as replace RPROVIDES_${PN}-rshd = "rshd" to RPROVIDES_${PN}-server = "rshd" * Fix host variable when rsh is renamed to other. * Add rexec to support ipv6. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch27
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch30
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam10
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit2
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam12
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit2
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam10
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit2
-rw-r--r--meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb25
9 files changed, 109 insertions, 11 deletions
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch
new file mode 100644
index 000000000..1d3631d47
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/fix-host-variable.patch
@@ -0,0 +1,27 @@
1fix host variable when rsh is renamed to other.
2
3Upstream-Status: Pending
4
5If rsh is renamed to other, like rsh.netkit, host variable is assigned to
6rsh.netkit, which is wrong.
7
8Signed-off-by: Roy.Li <rongqing.li@windriver.com>
9---
10 rsh/rsh.c | 1 -
11 1 files changed, 0 insertions(+), 1 deletions(-)
12
13diff --git a/rsh/rsh.c b/rsh/rsh.c
14index ac594f9..11f533e 100644
15--- a/rsh/rsh.c
16+++ b/rsh/rsh.c
17@@ -100,7 +100,6 @@ main(int argc, char *argv[])
18 #else
19 if (!strcmp(p, "rsh")) asrsh = 1;
20 #endif
21- else host = p;
22
23 /* handle "rsh host flags" */
24 if (!host && argc > 2 && argv[1][0] != '-') {
25--
261.7.5.4
27
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch
new file mode 100644
index 000000000..efd060f36
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/netkit-rsh-0.17-rexec-ipv6.patch
@@ -0,0 +1,30 @@
1make rexec support ipv6
2
3Upstream-status: Pending
4
5rexec equals rexec_af(... ,AF_INET) which only support ipv4,
6use rexec_af(..., AF_UNSPEC) to support both ipv6 and ipv4.
7
8Signed-off-by: Roy.Li <rongqing.li@windriver.com>
9---
10 rexec/rexec.c | 4 ++--
11 1 files changed, 2 insertions(+), 2 deletions(-)
12
13diff --git a/rexec/rexec.c b/rexec/rexec.c
14index 0913c02..9c8f769 100644
15--- a/rexec/rexec.c
16+++ b/rexec/rexec.c
17@@ -214,8 +214,8 @@ int main(int argc, char *argv[])
18 passwd = getpass("Password: ");
19 }
20
21- if ( (sock = rexec(&host, port_exec, user_name, passwd, command,
22- p_to_aux_sock)) < 0 )
23+ if ( (sock = rexec_af(&host, port_exec, user_name, passwd, command,
24+ p_to_aux_sock, AF_UNSPEC)) < 0 )
25 {
26 fprintf(stderr,"%s: Error in rexec system call: ",argv[0]);
27 perror(NULL);
28--
291.7.4.1
30
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam
new file mode 100644
index 000000000..94e5dda50
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.pam
@@ -0,0 +1,10 @@
1#%PAM-1.0
2# For root login to succeed here with pam_securetty, "rexec" must be
3# listed in /etc/securetty.
4auth required pam_nologin.so
5auth required pam_env.so
6auth include common-auth
7account include common-account
8session optional pam_keyinit.so force revoke
9session include common-session
10session required pam_loginuid.so
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
index 80aed36ff..7354360ae 100644
--- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rexec.xinetd.netkit
@@ -14,7 +14,7 @@ service exec
14 group = root 14 group = root
15 log_on_success += USERID 15 log_on_success += USERID
16 log_on_failure += USERID 16 log_on_failure += USERID
17 server = /usr/bin/tcpd 17 server = /usr/sbin/tcpd
18 server_args = /usr/sbin/in.rexecd 18 server_args = /usr/sbin/in.rexecd
19 disable = yes 19 disable = yes
20} 20}
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam
new file mode 100644
index 000000000..b30f139cb
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.pam
@@ -0,0 +1,12 @@
1#%PAM-1.0
2# For root login to succeed here with pam_securetty, "rlogin" must be
3# listed in /etc/securetty.
4auth required pam_nologin.so
5auth required pam_securetty.so
6auth required pam_env.so
7auth include common-auth
8account include common-account
9password include common-password
10session optional pam_keyinit.so force revoke
11session include common-session
12session required pam_loginuid.so
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
index 00dbf935b..70493e603 100644
--- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rlogin.xinetd.netkit
@@ -14,7 +14,7 @@ service login
14 group = root 14 group = root
15 log_on_success += USERID 15 log_on_success += USERID
16 log_on_failure += USERID 16 log_on_failure += USERID
17 server = /usr/bin/tcpd 17 server = /usr/sbin/tcpd
18 server_args = /usr/sbin/in.rlogind -a 18 server_args = /usr/sbin/in.rlogind -a
19 disable = yes 19 disable = yes
20} 20}
diff --git a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam
new file mode 100644
index 000000000..072327a76
--- /dev/null
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.pam
@@ -0,0 +1,10 @@
1#%PAM-1.0
2# For root login to succeed here with pam_securetty, "rsh" must be
3# listed in /etc/securetty.
4auth required pam_nologin.so
5auth required pam_securetty.so
6auth required pam_env.so
7account include common-account
8session optional pam_keyinit.so force revoke
9session include common-session
10session required pam_loginuid.so
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
index ad59b6207..a842eb974 100644
--- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh/rsh.xinetd.netkit
@@ -15,7 +15,7 @@ service shell
15 group = root 15 group = root
16 log_on_success += USERID 16 log_on_success += USERID
17 log_on_failure += USERID 17 log_on_failure += USERID
18 server = /usr/bin/tcpd 18 server = /usr/sbin/tcpd
19 server_args = /usr/sbin/in.rshd -aL 19 server_args = /usr/sbin/in.rshd -aL
20 disable = yes 20 disable = yes
21} 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
index f14a45157..e29369c49 100644
--- a/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb
+++ b/meta-networking/recipes-netkit/netkit-rsh/netkit-rsh_0.17.bb
@@ -4,7 +4,7 @@ HOMEPAGE="ftp://ftp.uk.linux.org/pub/linux/Networking/netkit"
4LICENSE = "BSD-4-Clause" 4LICENSE = "BSD-4-Clause"
5DEPENDS = "xinetd libgcrypt" 5DEPENDS = "xinetd libgcrypt"
6 6
7LIC_FILES_CHKSUM = "file://rsh/rsh.c;beginline=2;endline=3;md5=25737e9d21d9df251dd26b7dcbd8ee29" 7LIC_FILES_CHKSUM = "file://rsh/rsh.c;endline=32;md5=487b3c637bdc181d32b2a8543d41b606"
8 8
9SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}.orig.tar.gz;name=archive \ 9SRC_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 \ 10 ${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}-15.diff.gz;name=patch15 \
@@ -13,6 +13,8 @@ SRC_URI = "${DEBIAN_MIRROR}/main/n/netkit-rsh/netkit-rsh_${PV}.orig.tar.gz;name=
13 file://rexec.xinetd.netkit \ 13 file://rexec.xinetd.netkit \
14 file://rlogin.xinetd.netkit \ 14 file://rlogin.xinetd.netkit \
15 file://rsh.xinetd.netkit \ 15 file://rsh.xinetd.netkit \
16 file://netkit-rsh-0.17-rexec-ipv6.patch \
17 file://fix-host-variable.patch \
16" 18"
17 19
18SRC_URI[archive.md5sum] = "65f5f28e2fe22d9ad8b17bb9a10df096" 20SRC_URI[archive.md5sum] = "65f5f28e2fe22d9ad8b17bb9a10df096"
@@ -20,6 +22,12 @@ SRC_URI[archive.sha256sum] = "edcac7fa18015f0bc04e573f3f54ae3b638d71335df1ad7dae
20SRC_URI[patch15.md5sum] = "655efc0d541b03ca5de0ae506c805ea3" 22SRC_URI[patch15.md5sum] = "655efc0d541b03ca5de0ae506c805ea3"
21SRC_URI[patch15.sha256sum] = "2bc071c438e8b0ed42a0bd2db2d8b681b27a1e9b1798694d9874733293bc2aa9" 23SRC_URI[patch15.sha256sum] = "2bc071c438e8b0ed42a0bd2db2d8b681b27a1e9b1798694d9874733293bc2aa9"
22 24
25# Other support files
26PAM_SRC_URI = "file://rexec.pam \
27 file://rlogin.pam \
28 file://rsh.pam"
29SRC_URI += "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}"
30
23inherit pkgconfig 31inherit pkgconfig
24 32
25CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations" 33CFLAGS += " -D_GNU_SOURCE -Wno-deprecated-declarations"
@@ -30,7 +38,7 @@ PACKAGECONFIG += " ${@bb.utils.contains("DISTRO_FEATURES", "pam", "pam", "", d)}
30PACKAGECONFIG[pam] = " , --without-pam, libpam, libpam" 38PACKAGECONFIG[pam] = " , --without-pam, libpam, libpam"
31 39
32do_configure () { 40do_configure () {
33 ./configure --prefix=${prefix} 41 ./configure --prefix=${prefix} --exec-prefix=${exec_prefix}
34 echo "INSTALLROOT=${D}" > MCONFIG 42 echo "INSTALLROOT=${D}" > MCONFIG
35 43
36 if [ "${@base_contains('PACKAGECONFIG', 'pam', 'pam', '', d)}" != "" ]; then 44 if [ "${@base_contains('PACKAGECONFIG', 'pam', 'pam', '', d)}" != "" ]; then
@@ -58,9 +66,9 @@ do_install () {
58 if [ "${@base_contains('PACKAGECONFIG', 'pam', 'pam', '', d)}" != "" ]; then 66 if [ "${@base_contains('PACKAGECONFIG', 'pam', 'pam', '', d)}" != "" ]; then
59 install -d ${D}${sysconfdir}/pam.d 67 install -d ${D}${sysconfdir}/pam.d
60 install -m 0644 debian/hosts.equiv ${D}/${sysconfdir} 68 install -m 0644 debian/hosts.equiv ${D}/${sysconfdir}
61 install -m 0644 debian/pam.d/rexec ${D}/${sysconfdir}/pam.d 69 install -m 0644 ${WORKDIR}/rexec.pam ${D}/${sysconfdir}/pam.d/rexec
62 install -m 0644 debian/pam.d/rlogin ${D}/${sysconfdir}/pam.d 70 install -m 0644 ${WORKDIR}/rlogin.pam ${D}/${sysconfdir}/pam.d/rlogin
63 install -m 0644 debian/pam.d/rsh ${D}/${sysconfdir}/pam.d 71 install -m 0664 ${WORKDIR}/rsh.pam ${D}/${sysconfdir}/pam.d/rsh
64 fi 72 fi
65 cp ${WORKDIR}/rexec.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rexec 73 cp ${WORKDIR}/rexec.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rexec
66 cp ${WORKDIR}/rlogin.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rlogin 74 cp ${WORKDIR}/rlogin.xinetd.netkit ${D}/${sysconfdir}/xinetd.d/rlogin
@@ -85,7 +93,8 @@ ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd"
85ALTERNATIVE_LINK_NAME[rlogind] = "${bindir}/rlogind" 93ALTERNATIVE_LINK_NAME[rlogind] = "${bindir}/rlogind"
86ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind" 94ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind"
87 95
88RCONFLICTS_${PN}-client += "inetutils-rshd" 96RCONFLICTS_${PN}-server += "inetutils-rshd"
89RPROVIDES_${PN}-rshd = "rshd" 97RPROVIDES_${PN}-server = "rshd"
90 98
91RDEPENDS_${PN} = "xinetd" 99RDEPENDS_${PN}-server = "xinetd"
100RDEPENDS_${PN}-server += "tcp-wrappers"