openssh: Fix building with unified headers
This commit is contained in:
parent
185edd398b
commit
ebd854a810
@ -39,6 +39,7 @@ TERMUX_PKG_RM_AFTER_INSTALL="bin/slogin share/man/man1/slogin.1"
|
||||
termux_step_pre_configure() {
|
||||
autoreconf
|
||||
|
||||
CPPFLAGS+=" -DHAVE_ATTRIBUTE__SENTINEL__=1"
|
||||
LD=$CC # Needed to link the binaries
|
||||
LDFLAGS+=" -llog" # liblog for android logging in syslog hack
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -u -r ../openssh-7.2p2/session.c ./session.c
|
||||
--- ../openssh-7.2p2/session.c 2016-03-09 13:04:48.000000000 -0500
|
||||
+++ ./session.c 2016-06-26 17:17:15.988592104 -0400
|
||||
@@ -196,7 +196,7 @@
|
||||
diff -u -r ../openssh-7.5p1/session.c ./session.c
|
||||
--- ../openssh-7.5p1/session.c 2017-03-20 03:39:27.000000000 +0100
|
||||
+++ ./session.c 2017-06-30 22:51:57.404787949 +0200
|
||||
@@ -194,7 +194,7 @@
|
||||
temporarily_use_uid(pw);
|
||||
|
||||
/* Allocate a buffer for the socket name, and format the name. */
|
||||
@ -10,7 +10,7 @@ diff -u -r ../openssh-7.2p2/session.c ./session.c
|
||||
|
||||
/* Create private directory for socket */
|
||||
if (mkdtemp(auth_sock_dir) == NULL) {
|
||||
@@ -939,7 +939,7 @@
|
||||
@@ -756,7 +756,7 @@
|
||||
f = fopen(login_getcapstr(lc, "welcome", "/etc/motd",
|
||||
"/etc/motd"), "r");
|
||||
#else
|
||||
@ -19,7 +19,18 @@ diff -u -r ../openssh-7.2p2/session.c ./session.c
|
||||
#endif
|
||||
if (f) {
|
||||
while (fgets(buf, sizeof(buf), f))
|
||||
@@ -1242,6 +1242,15 @@
|
||||
@@ -1047,8 +1047,10 @@
|
||||
# endif /* HAVE_CYGWIN */
|
||||
#endif /* HAVE_LOGIN_CAP */
|
||||
|
||||
+#ifdef _PATH_MAILDIR
|
||||
snprintf(buf, sizeof buf, "%.200s/%.50s", _PATH_MAILDIR, pw->pw_name);
|
||||
child_set_env(&env, &envsize, "MAIL", buf);
|
||||
+#endif
|
||||
|
||||
/* Normal systems set SHELL by default. */
|
||||
child_set_env(&env, &envsize, "SHELL", shell);
|
||||
@@ -1056,6 +1058,15 @@
|
||||
if (getenv("TZ"))
|
||||
child_set_env(&env, &envsize, "TZ", getenv("TZ"));
|
||||
|
||||
@ -33,15 +44,5 @@ diff -u -r ../openssh-7.2p2/session.c ./session.c
|
||||
+#endif
|
||||
+
|
||||
/* Set custom environment options from RSA authentication. */
|
||||
if (!options.use_login) {
|
||||
while (custom_environment) {
|
||||
@@ -1664,7 +1673,9 @@
|
||||
* Close any extra file descriptors. Note that there may still be
|
||||
* descriptors left by system functions. They will be closed later.
|
||||
*/
|
||||
+#ifndef __ANDROID__
|
||||
endpwent();
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* Close any extra open file descriptors so that we don't have them
|
||||
while (custom_environment) {
|
||||
struct envstring *ce = custom_environment;
|
Loading…
Reference in New Issue
Block a user