summaryrefslogtreecommitdiff
path: root/src/passwd
AgeCommit message (Collapse)AuthorLines
2013-11-24shadow: Implement fgetspentMichael Forney-1/+10
2013-11-24shadow: Move spent parsing to internal functionMichael Forney-31/+40
2013-11-24shadow: Implement putspentMichael Forney-5/+13
2013-11-23putgrent: Add missing newlineMichael Forney-0/+1
2013-11-23putgrent: Stop writing output on first failureMichael Forney-2/+3
This way, if an fprintf fails, we get an incomplete group entry rather than a corrupted one.
2013-09-29fix off-by-one error in getgrnam_r and getgrgid_r, clobbering gr_nameRich Felker-2/+2
bug report and patch by Michael Forney. the terminating null pointer at the end of the gr_mem array was overwriting the beginning of the string data, causing the gr_name member to always be a zero-length string.
2013-07-19change uid_t, gid_t, and id_t to unsigned typesRich Felker-6/+20
this change is both to fix one of the remaining type (and thus C++ ABI) mismatches with glibc/LSB and to allow use of the full range of uid and gid values, if so desired. passwd/group access functions were not prepared to deal with unsigned values, so they too have been fixed with this commit.
2013-04-04add put*ent functions for passwd/group files and similar for shadowRich Felker-0/+34
since shadow does not yet support enumeration (getspent), the corresponding FILE-based get and put versions are also subbed out for now. this is partly out of laziness and partly because it's not clear how they should work in the presence of TCB shadow files. the stubs should make it possible to compile some software that expects them to exist, but such software still may not work properly.
2013-02-17add fgetgrent functionRich Felker-0/+9
based on patch by Isaac Dunham, moved to its own file to avoid increasing bss on static linked programs not using this nonstandard function but using the standard getgrent function, and vice versa.
2012-09-29more close-on-exec fixes, mostly using new "e" flag to fopenRich Felker-6/+6
2012-02-01make passwd/group functions safe against cancellation in stdioRich Felker-6/+35
these changes are a prerequisite to making stdio cancellable.
2012-01-29add fgetpwent (nonstandard function)Rich Felker-0/+9
based on patch by Jeremy Huntwork
2011-09-27fix clobbering of errno in get(pw|gr)([ug]id|nam) by fcloseRich Felker-0/+12
2011-09-21protect against/handle cancellation reading shadow passwordsRich Felker-1/+11
2011-06-30fix buffer overrun in getgrent code when there are no group membersRich Felker-4/+8
2011-06-08it's called getgrgid_r, not getgruid_r...Rich Felker-1/+1
2011-04-20shadow password fixes: empty fields should read as -1 not 0Rich Felker-7/+13
2011-02-14guard against hard links to non-ordinary-files when reading tcb shadowRich Felker-2/+4
2011-02-12initial check-in, version 0.5.0v0.5.0Rich Felker-0/+404