diff options
-rw-r--r-- | lib/libc/gen/getnetgrent.c | 6 | ||||
-rw-r--r-- | lib/libc/hidden/netgroup.h | 28 |
2 files changed, 33 insertions, 1 deletions
diff --git a/lib/libc/gen/getnetgrent.c b/lib/libc/gen/getnetgrent.c index 749ebc9dbe4..ee90eae1be5 100644 --- a/lib/libc/gen/getnetgrent.c +++ b/lib/libc/gen/getnetgrent.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getnetgrent.c,v 1.25 2015/09/10 18:59:34 deraadt Exp $ */ +/* $OpenBSD: getnetgrent.c,v 1.26 2015/09/14 10:44:40 guenther Exp $ */ /* * Copyright (c) 1994 Christos Zoulas @@ -619,6 +619,7 @@ endnetgrent(void) _ng_db = NULL; } } +DEF_WEAK(endnetgrent); void @@ -657,6 +658,7 @@ setnetgrent(const char *ng) _nghead = _nglist; _ng_sl_free(sl, 1); } +DEF_WEAK(setnetgrent); int @@ -673,6 +675,7 @@ getnetgrent(const char **host, const char **user, const char **domain) return 1; } +DEF_WEAK(getnetgrent); int @@ -729,3 +732,4 @@ innetgr(const char *grp, const char *host, const char *user, const char *domain) return found; } +DEF_WEAK(innetgr); diff --git a/lib/libc/hidden/netgroup.h b/lib/libc/hidden/netgroup.h new file mode 100644 index 00000000000..8628d55b34b --- /dev/null +++ b/lib/libc/hidden/netgroup.h @@ -0,0 +1,28 @@ +/* $OpenBSD: netgroup.h,v 1.1 2015/09/14 10:44:39 guenther Exp $ */ +/* + * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org> + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBC_NETGROUP_H_ +#define _LIBC_NETGROUP_H_ + +#include_next <netgroup.h> + +PROTO_NORMAL(endnetgrent); +PROTO_NORMAL(getnetgrent); +PROTO_NORMAL(innetgr); +PROTO_NORMAL(setnetgrent); + +#endif /* !_LIBC_NETGROUP_H_ */ |