__set_errno (ENOENT);
nscd_getpw_r (const char *key, size_t keylen, request_type type,	      struct passwd *resultbuf, char *buffer, size_t buflen){  int sock = open_socket ();  request_header req;  pw_response_header pw_resp;  ssize_t nbytes;  if (sock == -1)    {      __nss_not_use_nscd_passwd = 1;      return 1;    }  req.version = NSCD_VERSION;  req.type = type;  req.key_len = keylen;  nbytes = __write (sock, &req, sizeof (request_header));  if (nbytes != sizeof (request_header))    {      __close (sock);      return 1;    }  nbytes = __write (sock, key, keylen);  if (nbytes != keylen)    {      __close (sock);      return 1;    }  nbytes = __read (sock, &pw_resp, sizeof (pw_response_header));  if (nbytes != sizeof (pw_response_header))    {      __close (sock);      return 1;    }  if (pw_resp.found == -1)    {      /* The daemon does not cache this database.  */      __close (sock);      __nss_not_use_nscd_passwd = 1;      return 1;    }  if (pw_resp.found == 1)    {      char *p = buffer;      size_t total = (pw_resp.pw_name_len + pw_resp.pw_passwd_len		      + pw_resp.pw_gecos_len + pw_resp.pw_dir_len		      + pw_resp.pw_shell_len);      if (buflen < total)	{	  __set_errno (ERANGE);	  __close (sock);	  return -1;	}      /* Set the information we already have.  */      resultbuf->pw_uid = pw_resp.pw_uid;      resultbuf->pw_gid = pw_resp.pw_gid;      /* get pw_name */      resultbuf->pw_name = p;      p += pw_resp.pw_name_len;      /* get pw_passwd */      resultbuf->pw_passwd = p;      p += pw_resp.pw_passwd_len;      /* get pw_gecos */      resultbuf->pw_gecos = p;      p += pw_resp.pw_gecos_len;      /* get pw_dir */      resultbuf->pw_dir = p;      p += pw_resp.pw_dir_len;      /* get pw_pshell */      resultbuf->pw_shell = p;      nbytes = __read (sock, buffer, total);      __close (sock);      return nbytes == total ? 0 : 1;    }  else    {      __close (sock);      return -1;    }}