Merge pull request #82 from pspdev/revert-79-passwd

Revert "Improve getpgwan and getpwuid"
This commit is contained in:
Francisco Javier Trujillo Mata
2022-01-13 20:38:39 +01:00
committed by GitHub

View File

@@ -70,8 +70,6 @@ int __pipe_nonblocking_write(int fd, const void *buf, size_t len);
/* Functions from socket.c */
int __socket_close(int sock);
struct passwd __dummy_passwd = { "psp_user", "xxx", 1000, 1000, "", "", "/", "" };
#ifdef F___fill_stat
static time_t psp_to_posix_time(ScePspDateTime psp_time)
{
@@ -952,27 +950,27 @@ int fsync(int fd) {
#ifdef F_getuid
uid_t getuid(void) {
return __dummy_passwd.pw_uid;
return 1000;
}
#endif
#ifdef F_geteuid
uid_t geteuid(void) {
return __dummy_passwd.pw_uid;
return 1000;
}
#endif
#ifdef F_getpwuid
struct passwd *getpwuid(uid_t uid) {
/* There's no support for users */
return &__dummy_passwd;
return NULL;
}
#endif
#ifdef F_getpwnam
struct passwd *getpwnam(const char *name) {
/* There's no support for users */
return &__dummy_passwd;
return NULL;
}
#endif