Commit Graph

4 Commits

Author SHA1 Message Date
Gregory Nutt eb5a8c7cea libs/libc/grp and pwd: Revisit file looks. Use uintptr_t vs void* to incode mixed pointers and integer values. 2019-08-11 11:26:09 -06:00
Gregory Nutt 89da9f2fea libs/libc/pwd and libs/libc/grp: Modify to giet user/group data from /etc/passwd and /etc/group if so configurated.
Squashed commit of the following:

    Last minute clean-up
    libs/libc/grp/lib_find_grpfile.c:  Fix some problems found in testing.
    libs/libc/pwd:  Finishes off implementation using /etc/passwd.
    libs/libc/grp:  Finishes off implementation using /etc/group.
    libs/libc/pwd/lib_find_pwdfile.c:  Add logic to look up user information in /etc/passwd file, if available.
    libs/libc/grp/lib_find_grpfile.c:  Add logic to look up group information in /etc/group file, if available.
2019-08-04 13:32:36 -06:00
Gregory Nutt 2fcff93d20 libs/libc/grp/lib_grp.c: Fix a warning when compiling on a 64-bit simulation. Cannot cast a pointer to unsigned in that case because unsigned (int) is only 32-bits, but the pointer is 64-bits. 2019-08-03 08:41:55 -06:00
Michael Jung 1af4c94391 libc/grp: Added stubbed implementations of getgrgid, getgrgid_r, getgrnam, getgrnam_r, and initgroups. These functions are essentially stubs pretending that NuttX supported groups and that the only configured group in the system was 'root' with gid 0. The intend is not to provide meaningful new features, but to ease porting of foreign source code to NuttX. 2019-08-03 08:23:04 -06:00