• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Farhan/openssh


Commit MetaInfo

Revision5bcf61ca7623cb8d60ea28b6e3d34fdf87c00191 (tree)
Time2017-12-08 10:16:01
AuthorGreg Hartman <ghartman@goog...>
CommiterGreg Hartman

Log Message

Enable namespace switching on the legacy branches

Test: Local build and nvnc
Change-Id: I674258b02c17a9573293ffbeb9caa3cbb591156e

Change Summary

Incremental Difference

--- a/sshd.c
+++ b/sshd.c
@@ -123,7 +123,7 @@
123123 #include "version.h"
124124 #include "ssherr.h"
125125
126-#if defined(ANDROID_GCE) && defined(GCE_PLATFORM_SDK_VERSION) && GCE_PLATFORM_SDK_VERSION >= 28
126+#if defined(ANDROID_GCE)
127127 #define GNU_SOURCE
128128 #include <sched.h>
129129 #endif
@@ -1040,7 +1040,7 @@ server_listen(void)
10401040 continue;
10411041 }
10421042
1043-#if defined(ANDROID_GCE) && defined(GCE_PLATFORM_SDK_VERSION) && GCE_PLATFORM_SDK_VERSION >= 28
1043+#if defined(ANDROID_GCE)
10441044 /*
10451045 * Android GCE specific, bug 67899876
10461046 * Open socket in external namespace, making it possible to serve SSH
@@ -1061,7 +1061,7 @@ server_listen(void)
10611061 listen_sock = socket(ai->ai_family, ai->ai_socktype,
10621062 ai->ai_protocol);
10631063
1064-#if defined(ANDROID_GCE) && defined(GCE_PLATFORM_SDK_VERSION) && GCE_PLATFORM_SDK_VERSION >= 28
1064+#if defined(ANDROID_GCE)
10651065 if (androidfd > 0) {
10661066 if (setns(androidfd, 0) != 0) {
10671067 fprintf(stderr, "Could not set netns: %s\n",