Support oem_#### users/groups for host_init_verifier
Bug: 36970783 Test: oem_#### users and groups no longer fail in host_init_verifier Change-Id: I48174f528994d1b225ed897328cc207bdebf07a8
This commit is contained in:
parent
ca57890a80
commit
290427b442
1 changed files with 8 additions and 0 deletions
|
@ -102,6 +102,14 @@ passwd* getpwnam(const char* login) { // NOLINT: implementing bad function.
|
|||
}
|
||||
}
|
||||
|
||||
unsigned int oem_uid;
|
||||
if (sscanf(login, "oem_%u", &oem_uid) == 1) {
|
||||
snprintf(static_name, sizeof(static_name), "%s", login);
|
||||
static_passwd.pw_uid = oem_uid;
|
||||
static_passwd.pw_gid = oem_uid;
|
||||
return &static_passwd;
|
||||
}
|
||||
|
||||
errno = ENOENT;
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue