History log of /openbsd-current/lib/libc/gen/getnetgrent.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.32 22-Jan-2024 deraadt

getpwnam(3) uses dbopen(3), which pulls all 3 database backends into
static binaries. If we call libc-private __hash_open() instead, it
results in a ~40K reduction in many static binaries.
ok millert


Revision tags: OPENBSD_7_3_BASE OPENBSD_7_4_BASE
# 1.31 17-Feb-2023 miod

Only compile _ng_print() #ifdef DEBUG_NG; ok millert@


# 1.30 04-Jan-2023 jsg

Christos Zoulas agreed to rescind clause 3 and 4 in
NetBSD fsck.8 rev 1.35 fsutil.h rev 1.14 pathnames.h rev 1.2
netgroup_mkdb.8 rev 1.9 netgroup_mkdb.c rev 1.18 str.c rev 1.7
str.h rev 1.4 rdate.8 rev 1.11 rdate.c rev 1.19 extern.h rev 1.14
getnetgrent.c rev 1.41 netgroup.h rev 1.10
fparseln.3 rev 1.4 fparseln.c rev 1.10

our stringlist.c/stringlist.h are derived from getnetgrent.c
rfc868time.c from rdate.c
newfs/pathnames.h from fsck/pathnames.h

https://mail-index.netbsd.org/source-changes/2009/10/21/msg002182.html
Not all files are covered as some had copyright assigned to TNF in 1998.


Revision tags: OPENBSD_7_2_BASE
# 1.29 02-Aug-2022 deraadt

1) The yp_bind/yp_unbind and internal _yp_dobind/_yp_unbind sequences shared
dom_binding structs between threads, which is unsafe -- example, dom_vers
signalled retry events, and structs+socket would get deallocated in _yp_unbind.
Change all yp_first (and similar) functions to understand that _yp_dobind now
provides a private dom_binding and socket, which must be released using
_yp_unbind. Use similar methods in the one-step yp_all function.
2) domainname caching in get* is not neccessary now that the domainname cannot
change relative to ypconnect(2)'s decisions.
Many fields in dom_binding struct become unused, so delete them.
ok jmatthew, also tested by miod


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE 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.28 24-Sep-2016 millert

Fix matching when all of user, host and domain are specified.
OK guenther@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.27 14-Sep-2015 tedu

remove null check before free. from Michael McConville
ok semarie


# 1.26 14-Sep-2015 guenther

Wrap <netgroup.h> so internal calls go direct and the symbols are all weak


# 1.25 10-Sep-2015 deraadt

Hide netgroup internals inside libc. The parts that netgroup_mkdb
wants to use, well.... copy them there.
ok guenther


# 1.24 31-Aug-2015 guenther

Add framework for resolving (pun intended) libc namespace issues, using
wrapper .h files and asm labels to let internal calls resolve directly and
not be overridable or use the PLT. Then, apply that framework to most of
the functions in stdio.h, string.h, err.h, and wchar.h. Delete the
should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.

tests clean on i386, amd64, sparc64, powerpc, and mips64

naming feedback from kettenis@ and millert@
ok kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.23 08-Oct-2014 deraadt

reallocarray() to detect potential int overflow; ok doug


Revision tags: 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 OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.22 11-Nov-2009 jsg

fix leaks in error cases found by parfait
ok blambert@ miod@ deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.21 17-Sep-2007 moritz

Check snprintf(3) return value for error or truncation.
Mostly path construction, where truncation could be bad.

ok and input from deraadt@ millert@ ray@


# 1.20 05-Sep-2007 moritz

Fix debugging code, which tried to print the netgroup name
using the return value of _ng_print(), which returns void.

ok millert@


# 1.19 02-Sep-2007 deraadt

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.18 05-Mar-2007 millert

Remove _err() calls from getnetgrent.c. This is a minor API change
as _ng_sl_add() now returns a value. The only consumer of that
interface is netgroup_mkdb(8). Adapted from NetBSD.
OK deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.17 08-Aug-2005 espie

zap remaining rcsid.

Kill old files that are no longer compiled.

okay theo


# 1.16 06-Aug-2005 deraadt

fix use after free, netbsd pr 30832, from phirerunner@comcast.net


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.15 18-May-2004 jfb

ansify function definitions and zap some `register'

ok millert@


Revision tags: OPENBSD_3_5_BASE
# 1.14 29-Sep-2003 deraadt

unchecked strdup; ok henning; spotted by jjy2+@pitt.edu


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 06-Jul-2002 deraadt

KNF


Revision tags: OPENBSD_3_1_BASE
# 1.12 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.11 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.10 09-Dec-2000 deraadt

avoid incorrect free; reported by danh@nfol.com, my fix


Revision tags: OPENBSD_2_8_BASE
# 1.9 24-Aug-2000 deraadt

proper protos


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.8 14-Aug-1998 deraadt

realloc repair


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.7 10-Oct-1997 deraadt

NO abort() CALLS IN LIBC


# 1.6 23-Jul-1997 kstailey

tabify


Revision tags: OPENBSD_2_1_BASE
# 1.5 03-Feb-1997 millert

Back out stringlist


# 1.4 02-Feb-1997 millert

stringlist routines are now public (ftp uses them)


Revision tags: OPENBSD_2_0_BASE
# 1.3 19-Aug-1996 tholo

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


# 1.2 01-May-1996 deraadt

from netbsd:
- grab prototypes from netgroup.h
- added _ng_print, netgroup pretty printing function


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.31 17-Feb-2023 miod

Only compile _ng_print() #ifdef DEBUG_NG; ok millert@


# 1.30 04-Jan-2023 jsg

Christos Zoulas agreed to rescind clause 3 and 4 in
NetBSD fsck.8 rev 1.35 fsutil.h rev 1.14 pathnames.h rev 1.2
netgroup_mkdb.8 rev 1.9 netgroup_mkdb.c rev 1.18 str.c rev 1.7
str.h rev 1.4 rdate.8 rev 1.11 rdate.c rev 1.19 extern.h rev 1.14
getnetgrent.c rev 1.41 netgroup.h rev 1.10
fparseln.3 rev 1.4 fparseln.c rev 1.10

our stringlist.c/stringlist.h are derived from getnetgrent.c
rfc868time.c from rdate.c
newfs/pathnames.h from fsck/pathnames.h

https://mail-index.netbsd.org/source-changes/2009/10/21/msg002182.html
Not all files are covered as some had copyright assigned to TNF in 1998.


Revision tags: OPENBSD_7_2_BASE
# 1.29 02-Aug-2022 deraadt

1) The yp_bind/yp_unbind and internal _yp_dobind/_yp_unbind sequences shared
dom_binding structs between threads, which is unsafe -- example, dom_vers
signalled retry events, and structs+socket would get deallocated in _yp_unbind.
Change all yp_first (and similar) functions to understand that _yp_dobind now
provides a private dom_binding and socket, which must be released using
_yp_unbind. Use similar methods in the one-step yp_all function.
2) domainname caching in get* is not neccessary now that the domainname cannot
change relative to ypconnect(2)'s decisions.
Many fields in dom_binding struct become unused, so delete them.
ok jmatthew, also tested by miod


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE 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.28 24-Sep-2016 millert

Fix matching when all of user, host and domain are specified.
OK guenther@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.27 14-Sep-2015 tedu

remove null check before free. from Michael McConville
ok semarie


# 1.26 14-Sep-2015 guenther

Wrap <netgroup.h> so internal calls go direct and the symbols are all weak


# 1.25 10-Sep-2015 deraadt

Hide netgroup internals inside libc. The parts that netgroup_mkdb
wants to use, well.... copy them there.
ok guenther


# 1.24 31-Aug-2015 guenther

Add framework for resolving (pun intended) libc namespace issues, using
wrapper .h files and asm labels to let internal calls resolve directly and
not be overridable or use the PLT. Then, apply that framework to most of
the functions in stdio.h, string.h, err.h, and wchar.h. Delete the
should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.

tests clean on i386, amd64, sparc64, powerpc, and mips64

naming feedback from kettenis@ and millert@
ok kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.23 08-Oct-2014 deraadt

reallocarray() to detect potential int overflow; ok doug


Revision tags: 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 OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.22 11-Nov-2009 jsg

fix leaks in error cases found by parfait
ok blambert@ miod@ deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.21 17-Sep-2007 moritz

Check snprintf(3) return value for error or truncation.
Mostly path construction, where truncation could be bad.

ok and input from deraadt@ millert@ ray@


# 1.20 05-Sep-2007 moritz

Fix debugging code, which tried to print the netgroup name
using the return value of _ng_print(), which returns void.

ok millert@


# 1.19 02-Sep-2007 deraadt

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.18 05-Mar-2007 millert

Remove _err() calls from getnetgrent.c. This is a minor API change
as _ng_sl_add() now returns a value. The only consumer of that
interface is netgroup_mkdb(8). Adapted from NetBSD.
OK deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.17 08-Aug-2005 espie

zap remaining rcsid.

Kill old files that are no longer compiled.

okay theo


# 1.16 06-Aug-2005 deraadt

fix use after free, netbsd pr 30832, from phirerunner@comcast.net


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.15 18-May-2004 jfb

ansify function definitions and zap some `register'

ok millert@


Revision tags: OPENBSD_3_5_BASE
# 1.14 29-Sep-2003 deraadt

unchecked strdup; ok henning; spotted by jjy2+@pitt.edu


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 06-Jul-2002 deraadt

KNF


Revision tags: OPENBSD_3_1_BASE
# 1.12 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.11 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.10 09-Dec-2000 deraadt

avoid incorrect free; reported by danh@nfol.com, my fix


Revision tags: OPENBSD_2_8_BASE
# 1.9 24-Aug-2000 deraadt

proper protos


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.8 14-Aug-1998 deraadt

realloc repair


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.7 10-Oct-1997 deraadt

NO abort() CALLS IN LIBC


# 1.6 23-Jul-1997 kstailey

tabify


Revision tags: OPENBSD_2_1_BASE
# 1.5 03-Feb-1997 millert

Back out stringlist


# 1.4 02-Feb-1997 millert

stringlist routines are now public (ftp uses them)


Revision tags: OPENBSD_2_0_BASE
# 1.3 19-Aug-1996 tholo

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


# 1.2 01-May-1996 deraadt

from netbsd:
- grab prototypes from netgroup.h
- added _ng_print, netgroup pretty printing function


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.30 04-Jan-2023 jsg

Christos Zoulas agreed to rescind clause 3 and 4 in
NetBSD fsck.8 rev 1.35 fsutil.h rev 1.14 pathnames.h rev 1.2
netgroup_mkdb.8 rev 1.9 netgroup_mkdb.c rev 1.18 str.c rev 1.7
str.h rev 1.4 rdate.8 rev 1.11 rdate.c rev 1.19 extern.h rev 1.14
getnetgrent.c rev 1.41 netgroup.h rev 1.10
fparseln.3 rev 1.4 fparseln.c rev 1.10

our stringlist.c/stringlist.h are derived from getnetgrent.c
rfc868time.c from rdate.c
newfs/pathnames.h from fsck/pathnames.h

https://mail-index.netbsd.org/source-changes/2009/10/21/msg002182.html
Not all files are covered as some had copyright assigned to TNF in 1998.


Revision tags: OPENBSD_7_2_BASE
# 1.29 02-Aug-2022 deraadt

1) The yp_bind/yp_unbind and internal _yp_dobind/_yp_unbind sequences shared
dom_binding structs between threads, which is unsafe -- example, dom_vers
signalled retry events, and structs+socket would get deallocated in _yp_unbind.
Change all yp_first (and similar) functions to understand that _yp_dobind now
provides a private dom_binding and socket, which must be released using
_yp_unbind. Use similar methods in the one-step yp_all function.
2) domainname caching in get* is not neccessary now that the domainname cannot
change relative to ypconnect(2)'s decisions.
Many fields in dom_binding struct become unused, so delete them.
ok jmatthew, also tested by miod


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE 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.28 24-Sep-2016 millert

Fix matching when all of user, host and domain are specified.
OK guenther@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.27 14-Sep-2015 tedu

remove null check before free. from Michael McConville
ok semarie


# 1.26 14-Sep-2015 guenther

Wrap <netgroup.h> so internal calls go direct and the symbols are all weak


# 1.25 10-Sep-2015 deraadt

Hide netgroup internals inside libc. The parts that netgroup_mkdb
wants to use, well.... copy them there.
ok guenther


# 1.24 31-Aug-2015 guenther

Add framework for resolving (pun intended) libc namespace issues, using
wrapper .h files and asm labels to let internal calls resolve directly and
not be overridable or use the PLT. Then, apply that framework to most of
the functions in stdio.h, string.h, err.h, and wchar.h. Delete the
should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.

tests clean on i386, amd64, sparc64, powerpc, and mips64

naming feedback from kettenis@ and millert@
ok kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.23 08-Oct-2014 deraadt

reallocarray() to detect potential int overflow; ok doug


Revision tags: 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 OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.22 11-Nov-2009 jsg

fix leaks in error cases found by parfait
ok blambert@ miod@ deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.21 17-Sep-2007 moritz

Check snprintf(3) return value for error or truncation.
Mostly path construction, where truncation could be bad.

ok and input from deraadt@ millert@ ray@


# 1.20 05-Sep-2007 moritz

Fix debugging code, which tried to print the netgroup name
using the return value of _ng_print(), which returns void.

ok millert@


# 1.19 02-Sep-2007 deraadt

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.18 05-Mar-2007 millert

Remove _err() calls from getnetgrent.c. This is a minor API change
as _ng_sl_add() now returns a value. The only consumer of that
interface is netgroup_mkdb(8). Adapted from NetBSD.
OK deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.17 08-Aug-2005 espie

zap remaining rcsid.

Kill old files that are no longer compiled.

okay theo


# 1.16 06-Aug-2005 deraadt

fix use after free, netbsd pr 30832, from phirerunner@comcast.net


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.15 18-May-2004 jfb

ansify function definitions and zap some `register'

ok millert@


Revision tags: OPENBSD_3_5_BASE
# 1.14 29-Sep-2003 deraadt

unchecked strdup; ok henning; spotted by jjy2+@pitt.edu


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 06-Jul-2002 deraadt

KNF


Revision tags: OPENBSD_3_1_BASE
# 1.12 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.11 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.10 09-Dec-2000 deraadt

avoid incorrect free; reported by danh@nfol.com, my fix


Revision tags: OPENBSD_2_8_BASE
# 1.9 24-Aug-2000 deraadt

proper protos


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.8 14-Aug-1998 deraadt

realloc repair


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.7 10-Oct-1997 deraadt

NO abort() CALLS IN LIBC


# 1.6 23-Jul-1997 kstailey

tabify


Revision tags: OPENBSD_2_1_BASE
# 1.5 03-Feb-1997 millert

Back out stringlist


# 1.4 02-Feb-1997 millert

stringlist routines are now public (ftp uses them)


Revision tags: OPENBSD_2_0_BASE
# 1.3 19-Aug-1996 tholo

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


# 1.2 01-May-1996 deraadt

from netbsd:
- grab prototypes from netgroup.h
- added _ng_print, netgroup pretty printing function


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.29 02-Aug-2022 deraadt

1) The yp_bind/yp_unbind and internal _yp_dobind/_yp_unbind sequences shared
dom_binding structs between threads, which is unsafe -- example, dom_vers
signalled retry events, and structs+socket would get deallocated in _yp_unbind.
Change all yp_first (and similar) functions to understand that _yp_dobind now
provides a private dom_binding and socket, which must be released using
_yp_unbind. Use similar methods in the one-step yp_all function.
2) domainname caching in get* is not neccessary now that the domainname cannot
change relative to ypconnect(2)'s decisions.
Many fields in dom_binding struct become unused, so delete them.
ok jmatthew, also tested by miod


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE 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.28 24-Sep-2016 millert

Fix matching when all of user, host and domain are specified.
OK guenther@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.27 14-Sep-2015 tedu

remove null check before free. from Michael McConville
ok semarie


# 1.26 14-Sep-2015 guenther

Wrap <netgroup.h> so internal calls go direct and the symbols are all weak


# 1.25 10-Sep-2015 deraadt

Hide netgroup internals inside libc. The parts that netgroup_mkdb
wants to use, well.... copy them there.
ok guenther


# 1.24 31-Aug-2015 guenther

Add framework for resolving (pun intended) libc namespace issues, using
wrapper .h files and asm labels to let internal calls resolve directly and
not be overridable or use the PLT. Then, apply that framework to most of
the functions in stdio.h, string.h, err.h, and wchar.h. Delete the
should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.

tests clean on i386, amd64, sparc64, powerpc, and mips64

naming feedback from kettenis@ and millert@
ok kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.23 08-Oct-2014 deraadt

reallocarray() to detect potential int overflow; ok doug


Revision tags: 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 OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.22 11-Nov-2009 jsg

fix leaks in error cases found by parfait
ok blambert@ miod@ deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.21 17-Sep-2007 moritz

Check snprintf(3) return value for error or truncation.
Mostly path construction, where truncation could be bad.

ok and input from deraadt@ millert@ ray@


# 1.20 05-Sep-2007 moritz

Fix debugging code, which tried to print the netgroup name
using the return value of _ng_print(), which returns void.

ok millert@


# 1.19 02-Sep-2007 deraadt

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.18 05-Mar-2007 millert

Remove _err() calls from getnetgrent.c. This is a minor API change
as _ng_sl_add() now returns a value. The only consumer of that
interface is netgroup_mkdb(8). Adapted from NetBSD.
OK deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.17 08-Aug-2005 espie

zap remaining rcsid.

Kill old files that are no longer compiled.

okay theo


# 1.16 06-Aug-2005 deraadt

fix use after free, netbsd pr 30832, from phirerunner@comcast.net


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.15 18-May-2004 jfb

ansify function definitions and zap some `register'

ok millert@


Revision tags: OPENBSD_3_5_BASE
# 1.14 29-Sep-2003 deraadt

unchecked strdup; ok henning; spotted by jjy2+@pitt.edu


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 06-Jul-2002 deraadt

KNF


Revision tags: OPENBSD_3_1_BASE
# 1.12 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.11 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.10 09-Dec-2000 deraadt

avoid incorrect free; reported by danh@nfol.com, my fix


Revision tags: OPENBSD_2_8_BASE
# 1.9 24-Aug-2000 deraadt

proper protos


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.8 14-Aug-1998 deraadt

realloc repair


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.7 10-Oct-1997 deraadt

NO abort() CALLS IN LIBC


# 1.6 23-Jul-1997 kstailey

tabify


Revision tags: OPENBSD_2_1_BASE
# 1.5 03-Feb-1997 millert

Back out stringlist


# 1.4 02-Feb-1997 millert

stringlist routines are now public (ftp uses them)


Revision tags: OPENBSD_2_0_BASE
# 1.3 19-Aug-1996 tholo

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


# 1.2 01-May-1996 deraadt

from netbsd:
- grab prototypes from netgroup.h
- added _ng_print, netgroup pretty printing function


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.28 24-Sep-2016 millert

Fix matching when all of user, host and domain are specified.
OK guenther@


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.27 14-Sep-2015 tedu

remove null check before free. from Michael McConville
ok semarie


# 1.26 14-Sep-2015 guenther

Wrap <netgroup.h> so internal calls go direct and the symbols are all weak


# 1.25 10-Sep-2015 deraadt

Hide netgroup internals inside libc. The parts that netgroup_mkdb
wants to use, well.... copy them there.
ok guenther


# 1.24 31-Aug-2015 guenther

Add framework for resolving (pun intended) libc namespace issues, using
wrapper .h files and asm labels to let internal calls resolve directly and
not be overridable or use the PLT. Then, apply that framework to most of
the functions in stdio.h, string.h, err.h, and wchar.h. Delete the
should-have-been-hidden-all-along _v?(err|warn)[cx]? symbols while here.

tests clean on i386, amd64, sparc64, powerpc, and mips64

naming feedback from kettenis@ and millert@
ok kettenis@


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.23 08-Oct-2014 deraadt

reallocarray() to detect potential int overflow; ok doug


Revision tags: 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 OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
# 1.22 11-Nov-2009 jsg

fix leaks in error cases found by parfait
ok blambert@ miod@ deraadt@


Revision tags: OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.21 17-Sep-2007 moritz

Check snprintf(3) return value for error or truncation.
Mostly path construction, where truncation could be bad.

ok and input from deraadt@ millert@ ray@


# 1.20 05-Sep-2007 moritz

Fix debugging code, which tried to print the netgroup name
using the return value of _ng_print(), which returns void.

ok millert@


# 1.19 02-Sep-2007 deraadt

use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg


Revision tags: OPENBSD_4_1_BASE OPENBSD_4_2_BASE
# 1.18 05-Mar-2007 millert

Remove _err() calls from getnetgrent.c. This is a minor API change
as _ng_sl_add() now returns a value. The only consumer of that
interface is netgroup_mkdb(8). Adapted from NetBSD.
OK deraadt@


Revision tags: OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE
# 1.17 08-Aug-2005 espie

zap remaining rcsid.

Kill old files that are no longer compiled.

okay theo


# 1.16 06-Aug-2005 deraadt

fix use after free, netbsd pr 30832, from phirerunner@comcast.net


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE
# 1.15 18-May-2004 jfb

ansify function definitions and zap some `register'

ok millert@


Revision tags: OPENBSD_3_5_BASE
# 1.14 29-Sep-2003 deraadt

unchecked strdup; ok henning; spotted by jjy2+@pitt.edu


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE OPENBSD_3_4_BASE
# 1.13 06-Jul-2002 deraadt

KNF


Revision tags: OPENBSD_3_1_BASE
# 1.12 17-Feb-2002 millert

Manual cleanup of remaining userland __P use (excluding packages maintained outside the tree)


# 1.11 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


Revision tags: OPENBSD_2_9_BASE OPENBSD_3_0_BASE
# 1.10 09-Dec-2000 deraadt

avoid incorrect free; reported by danh@nfol.com, my fix


Revision tags: OPENBSD_2_8_BASE
# 1.9 24-Aug-2000 deraadt

proper protos


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE
# 1.8 14-Aug-1998 deraadt

realloc repair


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE
# 1.7 10-Oct-1997 deraadt

NO abort() CALLS IN LIBC


# 1.6 23-Jul-1997 kstailey

tabify


Revision tags: OPENBSD_2_1_BASE
# 1.5 03-Feb-1997 millert

Back out stringlist


# 1.4 02-Feb-1997 millert

stringlist routines are now public (ftp uses them)


Revision tags: OPENBSD_2_0_BASE
# 1.3 19-Aug-1996 tholo

Fix RCS ids
Make sure everything uses {SYS,}LIBC_SCCS properly


# 1.2 01-May-1996 deraadt

from netbsd:
- grab prototypes from netgroup.h
- added _ng_print, netgroup pretty printing function


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision