Skip to content
Snippets Groups Projects
Commit 95194cb2 authored by Greg Hartman's avatar Greg Hartman
Browse files

Map unknown users to shell for Android GCE.

Change-Id: I5a1f2aaa9c6a7ed04b22d2a1e71c2573f324ceae
parent 3337c706
No related branches found
No related tags found
No related merge requests found
...@@ -628,6 +628,14 @@ getpwnamallow(const char *user) ...@@ -628,6 +628,14 @@ getpwnamallow(const char *user)
aix_setauthdb(user); aix_setauthdb(user);
#endif #endif
#ifdef ANDROID_GCE
// 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")) {
logit("Login name %.100s forced to shell", user);
user = "shell";
}
#endif
pw = getpwnam(user); pw = getpwnam(user);
#if defined(_AIX) && defined(HAVE_SETAUTHDB) #if defined(_AIX) && defined(HAVE_SETAUTHDB)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment