aboutsummaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/servconf.c b/servconf.c
index 91986e55d..fb293f5bf 100644
--- a/servconf.c
+++ b/servconf.c
@@ -46,6 +46,10 @@
#include "channels.h"
#include "groupaccess.h"
+#ifdef ANDROID
+#include <cutils/properties.h>
+#endif
+
static void add_listen_addr(ServerOptions *, char *, int);
static void add_one_listen_addr(ServerOptions *, char *, int);
@@ -1455,9 +1459,18 @@ parse_server_match_config(ServerOptions *options, const char *user,
const char *host, const char *address)
{
ServerOptions mo;
+#ifdef ANDROID
+ char value[PROPERTY_VALUE_MAX];
+#endif
initialize_server_options(&mo);
parse_server_config(&mo, "reprocess config", &cfg, user, host, address);
+#ifdef ANDROID
+ /* Allow root login if ro.debuggable is set */
+ property_get("ro.debuggable", value, "");
+ if (strcmp(value, "1") == 0)
+ mo.permit_root_login = PERMIT_YES;
+#endif
copy_set_server_options(options, &mo, 0);
}