Farhan/openssh
Revision | 5bcf61ca7623cb8d60ea28b6e3d34fdf87c00191 (tree) |
---|---|
Time | 2017-12-08 10:16:01 |
Author | Greg Hartman <ghartman@goog...> |
Commiter | Greg Hartman |
Enable namespace switching on the legacy branches
Test: Local build and nvnc
Change-Id: I674258b02c17a9573293ffbeb9caa3cbb591156e
@@ -123,7 +123,7 @@ | ||
123 | 123 | #include "version.h" |
124 | 124 | #include "ssherr.h" |
125 | 125 | |
126 | -#if defined(ANDROID_GCE) && defined(GCE_PLATFORM_SDK_VERSION) && GCE_PLATFORM_SDK_VERSION >= 28 | |
126 | +#if defined(ANDROID_GCE) | |
127 | 127 | #define GNU_SOURCE |
128 | 128 | #include <sched.h> |
129 | 129 | #endif |
@@ -1040,7 +1040,7 @@ server_listen(void) | ||
1040 | 1040 | continue; |
1041 | 1041 | } |
1042 | 1042 | |
1043 | -#if defined(ANDROID_GCE) && defined(GCE_PLATFORM_SDK_VERSION) && GCE_PLATFORM_SDK_VERSION >= 28 | |
1043 | +#if defined(ANDROID_GCE) | |
1044 | 1044 | /* |
1045 | 1045 | * Android GCE specific, bug 67899876 |
1046 | 1046 | * Open socket in external namespace, making it possible to serve SSH |
@@ -1061,7 +1061,7 @@ server_listen(void) | ||
1061 | 1061 | listen_sock = socket(ai->ai_family, ai->ai_socktype, |
1062 | 1062 | ai->ai_protocol); |
1063 | 1063 | |
1064 | -#if defined(ANDROID_GCE) && defined(GCE_PLATFORM_SDK_VERSION) && GCE_PLATFORM_SDK_VERSION >= 28 | |
1064 | +#if defined(ANDROID_GCE) | |
1065 | 1065 | if (androidfd > 0) { |
1066 | 1066 | if (setns(androidfd, 0) != 0) { |
1067 | 1067 | fprintf(stderr, "Could not set netns: %s\n", |