/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
+ Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
enum nss_status status;
if (name[0] == '-' || name[0] == '+')
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
__libc_lock_lock (lock);
status = getgrgid_plusgroup (gid, result, buffer, buflen, errnop);
if (status == NSS_STATUS_RETURN) /* We couldn't parse the entry */
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
return status;
}
grptable = malloc (sizeof (key) + len_local_dir);
if (grptable == NULL)
- return NSS_STATUS_TRYAGAIN;
+ return NSS_STATUS_TRYAGAIN;
grptablelen = ((char *) mempcpy (mempcpy (grptable,
key, sizeof (key) - 1),
if (yp_get_default_domain (&domain) != YPERR_SUCCESS)
{
ent->nis = 0;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
++p;
parse_res = _nss_files_parse_grent (p, result, data, buflen, errnop);
if (parse_res == -1)
- return NSS_STATUS_TRYAGAIN;
+ {
+ *errnop = ERANGE;
+ return NSS_STATUS_TRYAGAIN;
+ }
}
if (parse_res)
if (parse_res == -1)
{
ent->netgrdata.cursor = saved_cursor;
+ *errnop = ERANGE;
return NSS_STATUS_TRYAGAIN;
}
&& result->sp_namp[1] != '@')
{
if (strcmp (&result->sp_namp[1], name) == 0)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
continue;
}
status = getspnam_plususer (name, result, buffer, buflen,
errnop);
if (status == NSS_STATUS_RETURN)
- /* We couldn't parse the entry */
- return NSS_STATUS_NOTFOUND;
+ {
+ /* We couldn't parse the entry */
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
return status;
}
status = getspnam_plususer (name, result, buffer, buflen, errnop);
if (status == NSS_STATUS_RETURN) /* We couldn't parse the entry */
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
return status;
}
enum nss_status status;
if (name[0] == '-' || name[0] == '+')
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (ni == NULL)
{
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
return NSS_STATUS_SUCCESS;
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
+ Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
if (parse_res == -1)
return NSS_STATUS_TRYAGAIN;
else
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
}
return NSS_STATUS_SUCCESS;
}
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
+ Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
return NSS_STATUS_TRYAGAIN;
else
{
- *errnop = EAGAIN;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
}
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
+ Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
else
{
*h_errnop = HOST_NOT_FOUND;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
}
*errnop = errno;
}
if (retval == NSS_STATUS_NOTFOUND)
- *h_errnop = HOST_NOT_FOUND;
+ {
+ *h_errnop = HOST_NOT_FOUND;
+ *errnop = ENOENT;
+ }
return retval;
}
else
{
*h_errnop = HOST_NOT_FOUND;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
}
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
+ Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
enum nss_status status;
if (cursor == NULL)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
__libc_lock_lock (lock);
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1996.
+ Contributed by Thorsten Kukuk <kukuk@suse.de>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
domain = strchr (netname, '@');
if (!domain)
- return NSS_STATUS_UNAVAIL;
- domain++;
+ {
+ *errnop = EINVAL;
+ return NSS_STATUS_UNAVAIL;
+ }
+ ++domain;
retval = yperr2nss (yp_match (domain, "publickey.byname", netname,
strlen (netname), &result, &len));
domain = strchr (netname, '@');
if (!domain)
- return NSS_STATUS_UNAVAIL;
- domain++;
+ {
+ *errnop = EINVAL;
+ return NSS_STATUS_UNAVAIL;
+ }
+ ++domain;
retval = yperr2nss (yp_match (domain, "publickey.byname", netname,
strlen (netname), &result, &len));
domain = strchr (netname, '@');
if (!domain)
- return NSS_STATUS_UNAVAIL;
+ {
+ *errnop = EINVAL;
+ return NSS_STATUS_UNAVAIL;
+ }
/* Point past the '@' character */
- domain++;
+ ++domain;
lookup = NULL;
yperr = yp_match (domain, "netid.byname", netname, strlen (netname),
&lookup, &len);
break; /* the successful case */
case YPERR_DOMAIN:
case YPERR_KEY:
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
case YPERR_MAP:
default:
return NSS_STATUS_UNAVAIL;
}
+
if (lookup)
{
enum nss_status err;
return err;
}
else
- return NSS_STATUS_NOTFOUND;
-
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
return NSS_STATUS_SUCCESS;
}