Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/pwd.c

    rf215bb5f r4cf8ca6  
    3939#include "errno.h"
    4040
     41// TODO: documentation
     42
    4143static bool entry_read = false;
    4244
     
    4446static const struct posix_passwd dummy_pwd = {
    4547        .pw_name = (char *) "user",
    46         .pw_uid = 0,
    47         .pw_gid = 0,
     48        .pw_uid = 1,
     49        .pw_gid = 1,
    4850        .pw_dir = (char *) "/",
    4951        .pw_shell = (char *) "/app/bdsh"
     
    113115{
    114116        assert(name != NULL);
    115         assert(pwd != NULL);
    116         assert(buffer != NULL);
    117         assert(result != NULL);
    118117       
    119118        if (posix_strcmp(name, "user") != 0) {
     
    122121        }
    123122       
    124         return posix_getpwuid_r(0, pwd, buffer, bufsize, result);
     123        return posix_getpwuid_r(1, pwd, buffer, bufsize, result);
    125124}
    126125
     
    133132struct posix_passwd *posix_getpwuid(posix_uid_t uid)
    134133{
    135         if (uid != 0) {
     134        if (uid != 1) {
    136135                return NULL;
    137136        }
     
    160159            '/', '\0', 'b', 'd', 's', 'h', '\0' };
    161160       
    162         if (uid != 0) {
     161        if (uid != 1) {
    163162                *result = NULL;
    164163                return 0;
     
    172171
    173172        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;
    176175        pwd->pw_dir = (char *) bf + 5;
    177176        pwd->pw_shell = (char *) bf + 7;
Note: See TracChangeset for help on using the changeset viewer.