diff options
Diffstat (limited to 'nis/nss_nisplus')
-rw-r--r-- | nis/nss_nisplus/nisplus-alias.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-ethers.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-grp.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-hosts.c | 63 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-initgroups.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-netgrp.c | 22 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-network.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-parser.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-proto.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-publickey.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-pwd.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-rpc.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-service.c | 4 | ||||
-rw-r--r-- | nis/nss_nisplus/nisplus-spwd.c | 4 |
14 files changed, 49 insertions, 84 deletions
diff --git a/nis/nss_nisplus/nisplus-alias.c b/nis/nss_nisplus/nisplus-alias.c index 64f93a086d..265ce10b4e 100644 --- a/nis/nss_nisplus/nisplus-alias.c +++ b/nis/nss_nisplus/nisplus-alias.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <atomic.h> #include <nss.h> diff --git a/nis/nss_nisplus/nisplus-ethers.c b/nis/nss_nisplus/nisplus-ethers.c index a185a0a149..e13246b664 100644 --- a/nis/nss_nisplus/nisplus-ethers.c +++ b/nis/nss_nisplus/nisplus-ethers.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <atomic.h> #include <ctype.h> diff --git a/nis/nss_nisplus/nisplus-grp.c b/nis/nss_nisplus/nisplus-grp.c index d3ee6cedc0..7912559d32 100644 --- a/nis/nss_nisplus/nisplus-grp.c +++ b/nis/nss_nisplus/nisplus-grp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <atomic.h> #include <nss.h> diff --git a/nis/nss_nisplus/nisplus-hosts.c b/nis/nss_nisplus/nisplus-hosts.c index 3165d560fa..ec7f0010ec 100644 --- a/nis/nss_nisplus/nisplus-hosts.c +++ b/nis/nss_nisplus/nisplus-hosts.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <assert.h> #include <atomic.h> @@ -42,15 +42,9 @@ static u_long tablename_len; #define NISENTRYLEN(idx, col, res) \ (NIS_RES_OBJECT (res)[idx].EN_data.en_cols.en_cols_val[col].ec_value.ec_value_len) -/* Get implementation for some internal functions. */ -#include <resolv/resolv-internal.h> -#include <resolv/mapv4v6addr.h> - - static int _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host, - char *buffer, size_t buflen, int *errnop, - int flags) + char *buffer, size_t buflen, int *errnop) { unsigned int i; char *first_unused = buffer; @@ -67,8 +61,7 @@ _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host, char *data = first_unused; - if (room_left < (af != AF_INET || (flags & AI_V4MAPPED) != 0 - ? IN6ADDRSZ : INADDRSZ)) + if (room_left < (af != AF_INET ? IN6ADDRSZ : INADDRSZ)) { no_more_room: *errnop = ERANGE; @@ -79,18 +72,8 @@ _nss_nisplus_parse_hostent (nis_result *result, int af, struct hostent *host, if (af != AF_INET6 && inet_pton (AF_INET, NISENTRYVAL (0, 2, result), data) > 0) { - assert ((flags & AI_V4MAPPED) == 0 || af != AF_UNSPEC); - if (flags & AI_V4MAPPED) - { - map_v4v6_address (data, data); - host->h_addrtype = AF_INET6; - host->h_length = IN6ADDRSZ; - } - else - { - host->h_addrtype = AF_INET; - host->h_length = INADDRSZ; - } + host->h_addrtype = AF_INET; + host->h_length = INADDRSZ; } else if (af != AF_INET && inet_pton (AF_INET6, NISENTRYVAL (0, 2, result), data) > 0) @@ -322,12 +305,8 @@ internal_nisplus_gethostent_r (struct hostent *host, char *buffer, } } - if (res_use_inet6 ()) - parse_res = _nss_nisplus_parse_hostent (result, AF_INET6, host, buffer, - buflen, errnop, AI_V4MAPPED); - else - parse_res = _nss_nisplus_parse_hostent (result, AF_INET, host, buffer, - buflen, errnop, 0); + parse_res = _nss_nisplus_parse_hostent (result, AF_INET, host, buffer, + buflen, errnop); if (parse_res == -1) { @@ -382,7 +361,7 @@ get_tablename (int *herrnop) static enum nss_status internal_gethostbyname2_r (const char *name, int af, struct hostent *host, char *buffer, size_t buflen, int *errnop, - int *herrnop, int flags) + int *herrnop) { if (tablename_val == NULL) { @@ -457,7 +436,7 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host, } int parse_res = _nss_nisplus_parse_hostent (result, af, host, buffer, - buflen, errnop, flags); + buflen, errnop); nis_freeresult (result); @@ -488,8 +467,7 @@ _nss_nisplus_gethostbyname2_r (const char *name, int af, struct hostent *host, } return internal_gethostbyname2_r (name, af, host, buffer, buflen, errnop, - herrnop, - (res_use_inet6 () ? AI_V4MAPPED : 0)); + herrnop); } @@ -498,19 +476,8 @@ _nss_nisplus_gethostbyname_r (const char *name, struct hostent *host, char *buffer, size_t buflen, int *errnop, int *h_errnop) { - if (res_use_inet6 ()) - { - enum nss_status status; - - status = internal_gethostbyname2_r (name, AF_INET6, host, buffer, - buflen, errnop, h_errnop, - AI_V4MAPPED); - if (status == NSS_STATUS_SUCCESS) - return status; - } - return internal_gethostbyname2_r (name, AF_INET, host, buffer, - buflen, errnop, h_errnop, 0); + buflen, errnop, h_errnop); } @@ -558,9 +525,7 @@ _nss_nisplus_gethostbyaddr_r (const void *addr, socklen_t addrlen, int af, } parse_res = _nss_nisplus_parse_hostent (result, af, host, - buffer, buflen, errnop, - (res_use_inet6 () - ? AI_V4MAPPED : 0)); + buffer, buflen, errnop); nis_freeresult (result); if (parse_res > 0) @@ -587,7 +552,7 @@ _nss_nisplus_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat, enum nss_status status = internal_gethostbyname2_r (name, AF_UNSPEC, &host, buffer, buflen, - errnop, herrnop, 0); + errnop, herrnop); if (__glibc_likely (status == NSS_STATUS_SUCCESS)) { if (*pat == NULL) diff --git a/nis/nss_nisplus/nisplus-initgroups.c b/nis/nss_nisplus/nisplus-initgroups.c index 613c4ec912..3671ac1f51 100644 --- a/nis/nss_nisplus/nisplus-initgroups.c +++ b/nis/nss_nisplus/nisplus-initgroups.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,7 +13,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <atomic.h> #include <nss.h> diff --git a/nis/nss_nisplus/nisplus-netgrp.c b/nis/nss_nisplus/nisplus-netgrp.c index 1542e51496..f24071293c 100644 --- a/nis/nss_nisplus/nisplus-netgrp.c +++ b/nis/nss_nisplus/nisplus-netgrp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <nss.h> #include <errno.h> @@ -87,9 +87,9 @@ _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer, result->type = triple_val; - if (hostlen == 0 || - NISENTRYVAL (result->position, 2, - (nis_result *) result->data)[0] == '\0') + if (hostlen == 0 + || NISENTRYVAL (result->position, 2, + (nis_result *) result->data)[0] == '\0') result->val.triple.host = NULL; else { @@ -100,9 +100,9 @@ _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer, *cp++ = '\0'; } - if (userlen == 0 || - NISENTRYVAL (result->position, 3, - (nis_result *) result->data)[0] == '\0') + if (userlen == 0 + || NISENTRYVAL (result->position, 3, + (nis_result *) result->data)[0] == '\0') result->val.triple.user = NULL; else { @@ -113,9 +113,9 @@ _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer, *cp++ = '\0'; } - if (domainlen == 0 || - NISENTRYVAL (result->position, 4, - (nis_result *) result->data)[0] == '\0') + if (domainlen == 0 + || NISENTRYVAL (result->position, 4, + (nis_result *) result->data)[0] == '\0') result->val.triple.domain = NULL; else { diff --git a/nis/nss_nisplus/nisplus-network.c b/nis/nss_nisplus/nisplus-network.c index 97e2a1cfef..4c477c2372 100644 --- a/nis/nss_nisplus/nisplus-network.c +++ b/nis/nss_nisplus/nisplus-network.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <atomic.h> #include <ctype.h> diff --git a/nis/nss_nisplus/nisplus-parser.c b/nis/nss_nisplus/nisplus-parser.c index d2b06334c2..9bf13cd343 100644 --- a/nis/nss_nisplus/nisplus-parser.c +++ b/nis/nss_nisplus/nisplus-parser.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <pwd.h> #include <ctype.h> diff --git a/nis/nss_nisplus/nisplus-proto.c b/nis/nss_nisplus/nisplus-proto.c index 1ea641df67..7da9c01289 100644 --- a/nis/nss_nisplus/nisplus-proto.c +++ b/nis/nss_nisplus/nisplus-proto.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <atomic.h> #include <ctype.h> diff --git a/nis/nss_nisplus/nisplus-publickey.c b/nis/nss_nisplus/nisplus-publickey.c index 758092c670..0aaf34fe3f 100644 --- a/nis/nss_nisplus/nisplus-publickey.c +++ b/nis/nss_nisplus/nisplus-publickey.c @@ -1,4 +1,4 @@ -/* Copyright (c) 1997-2018 Free Software Foundation, Inc. +/* Copyright (c) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <nss.h> #include <ctype.h> diff --git a/nis/nss_nisplus/nisplus-pwd.c b/nis/nss_nisplus/nisplus-pwd.c index 35cca36364..b2a58a90a6 100644 --- a/nis/nss_nisplus/nisplus-pwd.c +++ b/nis/nss_nisplus/nisplus-pwd.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <atomic.h> #include <nss.h> diff --git a/nis/nss_nisplus/nisplus-rpc.c b/nis/nss_nisplus/nisplus-rpc.c index e70769c173..e28da17f32 100644 --- a/nis/nss_nisplus/nisplus-rpc.c +++ b/nis/nss_nisplus/nisplus-rpc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <atomic.h> #include <ctype.h> diff --git a/nis/nss_nisplus/nisplus-service.c b/nis/nss_nisplus/nisplus-service.c index e0925c9c78..ff9d55b1a8 100644 --- a/nis/nss_nisplus/nisplus-service.c +++ b/nis/nss_nisplus/nisplus-service.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <atomic.h> #include <ctype.h> diff --git a/nis/nss_nisplus/nisplus-spwd.c b/nis/nss_nisplus/nisplus-spwd.c index e55b804519..70a2615de4 100644 --- a/nis/nss_nisplus/nisplus-spwd.c +++ b/nis/nss_nisplus/nisplus-spwd.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2018 Free Software Foundation, Inc. +/* Copyright (C) 1997-2019 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997. @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ + <https://www.gnu.org/licenses/>. */ #include <nss.h> #include <errno.h> |