* Center for Telecommunications Research
* Columbia University, New York City
*
- * $Id: pw_yp.c,v 1.11 1997/07/29 15:45:36 wpaul Exp $
+ * $Id: pw_yp.c,v 1.13 1998/10/17 14:08:12 bde Exp $
*/
#ifdef YP
bzero((char *)buf, sizeof(buf));
+ /*
+ * Don't make this a fatal error. The inability to contact
+ * a server is, for our purposes, equivalent to not finding
+ * the record we were looking for. Letting use_yp() know
+ * that the lookup failed is sufficient.
+ */
if ((clnt = clnt_create(server, YPPROG,YPVERS,"udp")) == NULL) {
+ return(1);
+#ifdef notdef
warnx("failed to create UDP handle: %s",
clnt_spcreateerror(server));
pw_error(tempname, 0, 1);
+#endif
}
ypkey.domain = domain;
if ((ypval = ypproc_match_2(&ypkey, clnt)) == NULL) {
clnt_destroy(clnt);
+ return(1);
+#ifdef notdef
warnx("%s",clnt_sperror(clnt,"YPPROC_MATCH failed"));
pw_error(tempname, 0, 1);
+#endif
}
clnt_destroy(clnt);
if (ypval->stat != YP_TRUE) {
+ xdr_free(xdr_ypresp_val, (char *)ypval);
+ return(1);
+#ifdef notdef
int stat = ypval->stat;
xdr_free(xdr_ypresp_val, (char *)ypval);
if (stat == YP_NOMAP && strstr(map, "master.passwd"))
return(1);
warnx("ypmatch failed: %s", yperr_string(ypprot_err(stat)));
pw_error(tempname, 0, 1);
+#endif
}
char ubuf[UT_NAMESIZE + 2];
if (which) {
- snprintf(ubuf, sizeof(ubuf), "%lu", uid);
+ snprintf(ubuf, sizeof(ubuf), "%lu", (unsigned long)uid);
user = (char *)&ubuf;
}