Move away from GLOBAL_CFLAGS for ssh configuration
Later branches will not support GLOBAL_CFLAGS.
This change turns on account mapping for all Android builds.
It allows SSHDIR to be set in BoardConfig.mk
Bug: 29277511
Change-Id: Ic1411b97468d61a919763db6d42253fdf148df79
diff --git a/Android.mk b/Android.mk
index 589194d..5f23184 100644
--- a/Android.mk
+++ b/Android.mk
@@ -125,8 +125,9 @@
LOCAL_CFLAGS+=-O3 -Wno-unused-parameter
LOCAL_CFLAGS += -DGCE_PLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
-ifneq ($(filter gce_x86 calypso, $(TARGET_DEVICE)),)
-LOCAL_CFLAGS += -DANDROID_GCE -DSSHDIR=\"/var/run/ssh\"
+
+ifneq (,$(SSHDIR))
+LOCAL_CFLAGS += -DSSHDIR=\"$(SSHDIR)\"
endif
include $(BUILD_SHARED_LIBRARY)
diff --git a/auth.c b/auth.c
index 65f3d0d..9e05678 100644
--- a/auth.c
+++ b/auth.c
@@ -629,7 +629,7 @@
aix_setauthdb(user);
#endif
-#ifdef ANDROID_GCE
+#if defined(ANDROID)
// Android has a fixed set of users. Any incoming user that we can't
// identify should be authenticated as the shell user.
if (strcmp(user, "root") && strcmp(user, "shell")) {