Changes in uspace/lib/posix/pwd.c [f215bb5f:4cf8ca6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/pwd.c
rf215bb5f r4cf8ca6 39 39 #include "errno.h" 40 40 41 // TODO: documentation 42 41 43 static bool entry_read = false; 42 44 … … 44 46 static const struct posix_passwd dummy_pwd = { 45 47 .pw_name = (char *) "user", 46 .pw_uid = 0,47 .pw_gid = 0,48 .pw_uid = 1, 49 .pw_gid = 1, 48 50 .pw_dir = (char *) "/", 49 51 .pw_shell = (char *) "/app/bdsh" … … 113 115 { 114 116 assert(name != NULL); 115 assert(pwd != NULL);116 assert(buffer != NULL);117 assert(result != NULL);118 117 119 118 if (posix_strcmp(name, "user") != 0) { … … 122 121 } 123 122 124 return posix_getpwuid_r( 0, pwd, buffer, bufsize, result);123 return posix_getpwuid_r(1, pwd, buffer, bufsize, result); 125 124 } 126 125 … … 133 132 struct posix_passwd *posix_getpwuid(posix_uid_t uid) 134 133 { 135 if (uid != 0) {134 if (uid != 1) { 136 135 return NULL; 137 136 } … … 160 159 '/', '\0', 'b', 'd', 's', 'h', '\0' }; 161 160 162 if (uid != 0) {161 if (uid != 1) { 163 162 *result = NULL; 164 163 return 0; … … 172 171 173 172 pwd->pw_name = (char *) bf; 174 pwd->pw_uid = 0;175 pwd->pw_gid = 0;173 pwd->pw_uid = 1; 174 pwd->pw_gid = 1; 176 175 pwd->pw_dir = (char *) bf + 5; 177 176 pwd->pw_shell = (char *) bf + 7;
Note:
See TracChangeset
for help on using the changeset viewer.