History log of /openbsd-current/lib/libc/gen/getpwnam.3
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.14 11-Sep-2022 jmc

.Li -> .Vt where appropriate;
from josiah frentsos, tweaked by schwarze

ok schwarze


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE
# 1.13 21-Aug-2018 millert

Use an mmap()'d buffer instead of a static buffer for the contents
of the pointer returned by getpw{ent,nam,uid}(). We unmap the
buffer each time to catch callers using a stale passwd struct
pointer. As a special case, we do not unmap the buffer if the
previous lookup was for the same name or uid. This special case
may be removed in the future. OK deraadt@


Revision tags: OPENBSD_6_3_BASE
# 1.12 17-Oct-2017 schwarze

add missing HISTORY; based on CVS logs and release announcements


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 14-Aug-2016 tb

Refer to /etc/passwd consistently as the "legacy password file" and
remove some references to differences between versions 6 and 7.

ok jmc, millert, tedu


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.10 18-Nov-2015 tedu

document the _shadow functions


# 1.9 30-Oct-2015 guenther

For getgrent.3:
- delete the commented out setgrfile bits, as well as the MLINK
- rename getgr{nam,gid}_r()'s 'buffer' parameters to 'buf' to be
consistent with getpwnam(3) and practically all other section 3 manpages
- we have sysconf(_SC_GETGR_R_SIZE_MAX) now, so uncomment and revise the text
For getpwnam.3:
- rename buflen to bufsize for consistency
- rewrite the description of the getpw{nam,uid}_r functions to
match the better getgr{nam,gid}_r() description, adding sysconf() bits
Add sysconf(3) to SEE ALSO for both

encouraged by schwarze@
ok millert@


# 1.8 27-Oct-2015 guenther

The fd of the passwd database is marked close-on-exec now

Incorrect text pointed out by tedu@
ok deraadt@ millert@ tedu@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.7 15-Jan-2015 millert

POSIX does not require an explicit inclusion of sys/types.h to get
uid_t or gid_t (and neither do we). OK deraadt@


Revision tags: OPENBSD_5_6_BASE
# 1.6 12-Mar-2014 schwarze

Add ERRORS and STANDARDS, thanks to brad@ for the reminder.
Fix the description of the RETURN VALUES of get*_r().
Minor polishing while here.
Feedback and ok jmc@, ok millert@ jca@.


Revision tags: OPENBSD_5_5_BASE
# 1.5 21-Jan-2014 schwarze

obvious .Pa fixes; found with mandocdb(8)


Revision tags: OPENBSD_5_4_BASE
# 1.4 17-Jul-2013 schwarze

more library history
facts checked by sobrado@
style tweaks and ok jmc@


# 1.3 05-Jun-2013 tedu

Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarze


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.2 02-Jun-2009 jmc

tweak previous;


# 1.1 01-Jun-2009 millert

Split getpw{nam,uid} off into their own man page. Hopefully, this
will help people understand that endpwent() is not normally needed.
OK deraadt@ jmc@


# 1.13 21-Aug-2018 millert

Use an mmap()'d buffer instead of a static buffer for the contents
of the pointer returned by getpw{ent,nam,uid}(). We unmap the
buffer each time to catch callers using a stale passwd struct
pointer. As a special case, we do not unmap the buffer if the
previous lookup was for the same name or uid. This special case
may be removed in the future. OK deraadt@


Revision tags: OPENBSD_6_3_BASE
# 1.12 17-Oct-2017 schwarze

add missing HISTORY; based on CVS logs and release announcements


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 14-Aug-2016 tb

Refer to /etc/passwd consistently as the "legacy password file" and
remove some references to differences between versions 6 and 7.

ok jmc, millert, tedu


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.10 18-Nov-2015 tedu

document the _shadow functions


# 1.9 30-Oct-2015 guenther

For getgrent.3:
- delete the commented out setgrfile bits, as well as the MLINK
- rename getgr{nam,gid}_r()'s 'buffer' parameters to 'buf' to be
consistent with getpwnam(3) and practically all other section 3 manpages
- we have sysconf(_SC_GETGR_R_SIZE_MAX) now, so uncomment and revise the text
For getpwnam.3:
- rename buflen to bufsize for consistency
- rewrite the description of the getpw{nam,uid}_r functions to
match the better getgr{nam,gid}_r() description, adding sysconf() bits
Add sysconf(3) to SEE ALSO for both

encouraged by schwarze@
ok millert@


# 1.8 27-Oct-2015 guenther

The fd of the passwd database is marked close-on-exec now

Incorrect text pointed out by tedu@
ok deraadt@ millert@ tedu@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.7 15-Jan-2015 millert

POSIX does not require an explicit inclusion of sys/types.h to get
uid_t or gid_t (and neither do we). OK deraadt@


Revision tags: OPENBSD_5_6_BASE
# 1.6 12-Mar-2014 schwarze

Add ERRORS and STANDARDS, thanks to brad@ for the reminder.
Fix the description of the RETURN VALUES of get*_r().
Minor polishing while here.
Feedback and ok jmc@, ok millert@ jca@.


Revision tags: OPENBSD_5_5_BASE
# 1.5 21-Jan-2014 schwarze

obvious .Pa fixes; found with mandocdb(8)


Revision tags: OPENBSD_5_4_BASE
# 1.4 17-Jul-2013 schwarze

more library history
facts checked by sobrado@
style tweaks and ok jmc@


# 1.3 05-Jun-2013 tedu

Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarze


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.2 02-Jun-2009 jmc

tweak previous;


# 1.1 01-Jun-2009 millert

Split getpw{nam,uid} off into their own man page. Hopefully, this
will help people understand that endpwent() is not normally needed.
OK deraadt@ jmc@


# 1.12 17-Oct-2017 schwarze

add missing HISTORY; based on CVS logs and release announcements


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.11 14-Aug-2016 tb

Refer to /etc/passwd consistently as the "legacy password file" and
remove some references to differences between versions 6 and 7.

ok jmc, millert, tedu


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.10 18-Nov-2015 tedu

document the _shadow functions


# 1.9 30-Oct-2015 guenther

For getgrent.3:
- delete the commented out setgrfile bits, as well as the MLINK
- rename getgr{nam,gid}_r()'s 'buffer' parameters to 'buf' to be
consistent with getpwnam(3) and practically all other section 3 manpages
- we have sysconf(_SC_GETGR_R_SIZE_MAX) now, so uncomment and revise the text
For getpwnam.3:
- rename buflen to bufsize for consistency
- rewrite the description of the getpw{nam,uid}_r functions to
match the better getgr{nam,gid}_r() description, adding sysconf() bits
Add sysconf(3) to SEE ALSO for both

encouraged by schwarze@
ok millert@


# 1.8 27-Oct-2015 guenther

The fd of the passwd database is marked close-on-exec now

Incorrect text pointed out by tedu@
ok deraadt@ millert@ tedu@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.7 15-Jan-2015 millert

POSIX does not require an explicit inclusion of sys/types.h to get
uid_t or gid_t (and neither do we). OK deraadt@


Revision tags: OPENBSD_5_6_BASE
# 1.6 12-Mar-2014 schwarze

Add ERRORS and STANDARDS, thanks to brad@ for the reminder.
Fix the description of the RETURN VALUES of get*_r().
Minor polishing while here.
Feedback and ok jmc@, ok millert@ jca@.


Revision tags: OPENBSD_5_5_BASE
# 1.5 21-Jan-2014 schwarze

obvious .Pa fixes; found with mandocdb(8)


Revision tags: OPENBSD_5_4_BASE
# 1.4 17-Jul-2013 schwarze

more library history
facts checked by sobrado@
style tweaks and ok jmc@


# 1.3 05-Jun-2013 tedu

Use the fancy .In macro for includes. From Jan Klemkow. ok jmc schwarze


Revision tags: OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
# 1.2 02-Jun-2009 jmc

tweak previous;


# 1.1 01-Jun-2009 millert

Split getpw{nam,uid} off into their own man page. Hopefully, this
will help people understand that endpwent() is not normally needed.
OK deraadt@ jmc@