Commit Graph

8 Commits

Author SHA1 Message Date
chenzhijia c0039d6623 libs/libc/pwd: add new member to passwd struct
Add pw_passwd member to pass tlpi example:
https://man7.org/tlpi/code/online/dist/users_groups/check_password.c.html

Signed-off-by: chenzhijia <chenzhijia@xiaomi.com>
2024-10-16 11:15:25 +08:00
Alin Jerpelea cd2fcf5252 include: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-04 08:18:42 +08:00
yangyalei f40eee50d6 pwd: Add initial implementation of getpwent
fix ltp sigqueue testcase crash in getpwent:
nsh> ltp_sigqueue_3_1
core dumped

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
2023-07-31 07:50:10 -07:00
Xiang Xiao 7990f90915 Indent the define statement by two spaces
follow the code style convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-21 09:52:08 -03:00
dongjiuzhu1 5826e8eeb1 libc/passwd: add pw_gecos field(userinfo)
The pw_gecos field is not specified in POSIX, but is
present on most implementations.
passwd file format:
name:uid:gid:gecos:dir:shell
ex: gdm127:133:Gnome Display Manager:/var/lib/gdm3:/bin/false

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2022-12-30 00:21:15 +08:00
Xiang Xiao 6ebc1b27fa libc/pwd: Add NSS_BUFLEN_PASSWD macro
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I739679038b2004cc45d78f540831ba81b088a586
2021-05-11 16:40:33 +01:00
Michael Jung cbe3fb5c60 libs/libc: License Clearance
Change the copyright header of assorted source files in libs/libc to the
ASF version.  I was listed as the author in these files.  I did also
check the heritage of those files and besides me they have only been
changed by the following people, all of whom did sign a CLA to the best
of my knowledge:

Alin Jerpelea
Haitao Liu
Gregory Nutt
Yamamoto Takashi
Xiang Xiao

Signed-off-by: Michael Jung <mijung@gmx.net>
2021-03-02 03:44:06 -08:00
Michael Jung f3c85bd253 libc/pwd: Added stubbed implementations
Added stubbed implementations of getpwuid, getpwuid_r, getpwnam, and
getpwnam_r.  These functions are essentially stubs pretending that NuttX
supported users and that the only configured user in the system was 'root'
with uid 0.  The intend is not to provide meaningful new features, but to ease
porting of foreign source code to NuttX.
2019-08-04 07:18:58 -06:00