Christian Wiese
11 years ago
1 changed files with 126 additions and 0 deletions
@ -0,0 +1,126 @@ |
|||||||
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
||||||
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
||||||
|
#
|
||||||
|
# Filename: package/.../musl/pkg/shadow/shadow-disable-rlogin.patch
|
||||||
|
# Copyright (C) 2014 The OpenSDE Project
|
||||||
|
#
|
||||||
|
# More information can be found in the files COPYING and README.
|
||||||
|
#
|
||||||
|
# This patch file is dual-licensed. It is available under the license the
|
||||||
|
# patched project is licensed under, as long as it is an OpenSource license
|
||||||
|
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
|
||||||
|
# of the GNU General Public License as published by the Free Software
|
||||||
|
# Foundation; either version 2 of the License, or (at your option) any later
|
||||||
|
# version.
|
||||||
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
||||||
|
|
||||||
|
Disable rlogin because musl include that legacy.
|
||||||
|
|
||||||
|
Note: rlogin related functions are defined in glibc's netdb.h.
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index 96fa0c8..8b43f16 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -14159,7 +14159,7 @@ _ACEOF
|
||||||
|
$as_echo "#define USE_SYSLOG 1" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
|
-$as_echo "#define RLOGIN 1" >>confdefs.h
|
||||||
|
+$as_echo "#define RLOGIN 0" >>confdefs.h
|
||||||
|
|
||||||
|
|
||||||
|
$as_echo "#define RUSEROK 0" >>confdefs.h
|
||||||
|
diff --git a/configure.in b/configure.in
|
||||||
|
index da04a81..4203d1f 100644
|
||||||
|
--- a/configure.in
|
||||||
|
+++ b/configure.in
|
||||||
|
@@ -194,7 +194,7 @@ AC_DEFINE_UNQUOTED(PASSWD_PROGRAM, "$shadow_cv_passwd_dir/passwd",
|
||||||
|
|
||||||
|
dnl XXX - quick hack, should disappear before anyone notices :).
|
||||||
|
AC_DEFINE(USE_SYSLOG, 1, [Define to use syslog().])
|
||||||
|
-AC_DEFINE(RLOGIN, 1, [Define if login should support the -r flag for rlogind.])
|
||||||
|
+AC_DEFINE(RLOGIN, 0, [Define if login should support the -r flag for rlogind.])
|
||||||
|
AC_DEFINE(RUSEROK, 0, [Define to the ruserok() "success" return value (0 or 1).])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(shadowgrp,
|
||||||
|
diff --git a/lib/prototypes.h b/lib/prototypes.h
|
||||||
|
index 00d9e0b..a1696fe 100644
|
||||||
|
--- a/lib/prototypes.h
|
||||||
|
+++ b/lib/prototypes.h
|
||||||
|
@@ -283,10 +283,6 @@ extern void pw_free (/*@out@*/ /*@only@*/struct passwd *pwent);
|
||||||
|
/* remove_tree.c */
|
||||||
|
extern int remove_tree (const char *root, bool remove_root);
|
||||||
|
|
||||||
|
-/* rlogin.c */
|
||||||
|
-extern int do_rlogin (const char *remote_host, char *name, size_t namelen,
|
||||||
|
- char *term, size_t termlen);
|
||||||
|
-
|
||||||
|
/* root_flag.c */
|
||||||
|
extern void process_root_flag (const char* short_opt, int argc, char **argv);
|
||||||
|
|
||||||
|
diff --git a/libmisc/Makefile.am b/libmisc/Makefile.am
|
||||||
|
index 9da2ec3..66f60f5 100644
|
||||||
|
--- a/libmisc/Makefile.am
|
||||||
|
+++ b/libmisc/Makefile.am
|
||||||
|
@@ -44,7 +44,6 @@ libmisc_a_SOURCES = \
|
||||||
|
pwdcheck.c \
|
||||||
|
pwd_init.c \
|
||||||
|
remove_tree.c \
|
||||||
|
- rlogin.c \
|
||||||
|
root_flag.c \
|
||||||
|
salt.c \
|
||||||
|
setugid.c \
|
||||||
|
diff --git a/libmisc/Makefile.in b/libmisc/Makefile.in
|
||||||
|
index 4891360..86dcbd5 100644
|
||||||
|
--- a/libmisc/Makefile.in
|
||||||
|
+++ b/libmisc/Makefile.in
|
||||||
|
@@ -79,7 +79,7 @@ am_libmisc_a_OBJECTS = addgrps.$(OBJEXT) age.$(OBJEXT) \
|
||||||
|
motd.$(OBJEXT) myname.$(OBJEXT) obscure.$(OBJEXT) \
|
||||||
|
pam_pass.$(OBJEXT) pam_pass_non_interractive.$(OBJEXT) \
|
||||||
|
pwd2spwd.$(OBJEXT) pwdcheck.$(OBJEXT) pwd_init.$(OBJEXT) \
|
||||||
|
- remove_tree.$(OBJEXT) rlogin.$(OBJEXT) root_flag.$(OBJEXT) \
|
||||||
|
+ remove_tree.$(OBJEXT) root_flag.$(OBJEXT) \
|
||||||
|
salt.$(OBJEXT) setugid.$(OBJEXT) setupenv.$(OBJEXT) \
|
||||||
|
shell.$(OBJEXT) strtoday.$(OBJEXT) sub.$(OBJEXT) \
|
||||||
|
sulog.$(OBJEXT) ttytype.$(OBJEXT) tz.$(OBJEXT) \
|
||||||
|
@@ -306,7 +306,6 @@ libmisc_a_SOURCES = \
|
||||||
|
pwdcheck.c \
|
||||||
|
pwd_init.c \
|
||||||
|
remove_tree.c \
|
||||||
|
- rlogin.c \
|
||||||
|
root_flag.c \
|
||||||
|
salt.c \
|
||||||
|
setugid.c \
|
||||||
|
@@ -413,7 +412,6 @@ distclean-compile:
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwd_init.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pwdcheck.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remove_tree.Po@am__quote@
|
||||||
|
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rlogin.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/root_flag.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/salt.Po@am__quote@
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setugid.Po@am__quote@
|
||||||
|
diff --git a/src/login.c b/src/login.c
|
||||||
|
index 2e5f65e..34846ab 100644
|
||||||
|
--- a/src/login.c
|
||||||
|
+++ b/src/login.c
|
||||||
|
@@ -610,19 +610,6 @@ int main (int argc, char **argv)
|
||||||
|
if (hflg) {
|
||||||
|
reason = PW_RLOGIN;
|
||||||
|
}
|
||||||
|
-#ifdef RLOGIN
|
||||||
|
- if (rflg) {
|
||||||
|
- assert (NULL == username);
|
||||||
|
- username = xmalloc (USER_NAME_MAX_LENGTH + 1);
|
||||||
|
- username[USER_NAME_MAX_LENGTH] = '\0';
|
||||||
|
- if (do_rlogin (hostname, username, USER_NAME_MAX_LENGTH, term, sizeof term)) {
|
||||||
|
- preauth_flag = true;
|
||||||
|
- } else {
|
||||||
|
- free (username);
|
||||||
|
- username = NULL;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-#endif /* RLOGIN */
|
||||||
|
|
||||||
|
OPENLOG ("login");
|
||||||
|
|
Loading…
Reference in new issue