diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-12-10 10:44:01 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-12-10 10:44:01 +0000 |
commit | cd8ea5d2a527a74d96d6033b8976f46422e089bd (patch) | |
tree | 269f96c59edced0a61a82967b5f06d5eaf2c2fe2 /nis | |
parent | 66ebe46c7d7bdc586f0f74ebcbb1e60864634364 (diff) | |
download | glibc-cd8ea5d2a527a74d96d6033b8976f46422e089bd.zip glibc-cd8ea5d2a527a74d96d6033b8976f46422e089bd.tar.gz glibc-cd8ea5d2a527a74d96d6033b8976f46422e089bd.tar.bz2 |
[BZ #305]
Update.
2004-12-08 Thorsten Kukuk <kukuk@suse.de>
* nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_getnetgrent_r):
Add check if the value is not an empty string. [BZ #305]
Diffstat (limited to 'nis')
-rw-r--r-- | nis/nss_nisplus/nisplus-netgrp.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/nis/nss_nisplus/nisplus-netgrp.c b/nis/nss_nisplus/nisplus-netgrp.c index c56a685..607bc2c 100644 --- a/nis/nss_nisplus/nisplus-netgrp.c +++ b/nis/nss_nisplus/nisplus-netgrp.c @@ -88,7 +88,9 @@ _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer, result->type = triple_val; - if (hostlen == 0) + if (hostlen == 0 || + NISENTRYVAL (result->position, 2, + (nis_result *) result->data)[0] == '\0') result->val.triple.host = NULL; else { @@ -99,7 +101,9 @@ _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer, *cp++ = '\0'; } - if (userlen == 0) + if (userlen == 0 || + NISENTRYVAL (result->position, 3, + (nis_result *) result->data)[0] == '\0') result->val.triple.user = NULL; else { @@ -110,7 +114,9 @@ _nss_nisplus_getnetgrent_r (struct __netgrent *result, char *buffer, *cp++ = '\0'; } - if (domainlen == 0) + if (domainlen == 0 || + NISENTRYVAL (result->position, 4, + (nis_result *) result->data)[0] == '\0') result->val.triple.domain = NULL; else { |