passwd* getpwuid(uid_t uid) { // NOLINT: implementing bad function. passwd_state_t* state = g_passwd_tls_buffer.get(); if (state == NULL) { return NULL; } passwd* pw = android_id_to_passwd(state, uid); if (pw != NULL) { return pw; } return app_id_to_passwd(uid, state); }
struct passwd* getpwuid(uid_t uid) { stubs_state_t* state = __stubs_state(); struct passwd* pw; if (state == NULL) return NULL; pw = &state->passwd; if ( android_id_to_passwd(pw, uid) != NULL ) return pw; return app_id_to_passwd(uid, state); }