#include <netinet/in.h>
#include <gssapi/gssapi.h>
+#include "debug.h"
+
static void authgss_nextverf(AUTH *);
static bool_t authgss_marshal(AUTH *, XDR *);
static bool_t authgss_refresh(AUTH *, void *);
free(auth);
return (NULL);
}
-#ifdef DEBUG
- fprintf(stderr, "authgss_create: name is %p\n", name);
-#endif
+ LIBTIRPC_DEBUG(2, ("authgss_create: name is %p\n", name));
if (name != GSS_C_NO_NAME) {
if (gss_duplicate_name(&min_stat, name, &gd->name)
!= GSS_S_COMPLETE) {
else
gd->name = name;
-#ifdef DEBUG
- fprintf(stderr, "authgss_create: gd->name is %p\n", gd->name);
-#endif
+ LIBTIRPC_DEBUG(2, ("authgss_create: gd->name is %p\n", gd->name));
gd->clnt = clnt;
gd->ctx = GSS_C_NO_CONTEXT;
gd->sec = *sec;
auth = authgss_create(clnt, name, sec);
if (name != GSS_C_NO_NAME) {
-#ifdef DEBUG
- fprintf(stderr, "authgss_create_default: freeing name %p\n", name);
-#endif
+ LIBTIRPC_DEBUG(1, ("authgss_create_default: freeing name %p\n", name));
gss_release_name(&min_stat, &name);
}
authgss_destroy_context(auth);
-#ifdef DEBUG
- fprintf(stderr, "authgss_destroy: freeing name %p\n", gd->name);
-#endif
+ LIBTIRPC_DEBUG(2, ("authgss_destroy: freeing name %p\n", gd->name));
if (gd->name != GSS_C_NO_NAME)
gss_release_name(&min_stat, &gd->name);
#include <string.h>
#include <stdlib.h>
+#include "debug.h"
+
#define PKFILE "/etc/publickey"
/*
lookup = NULL;
err = yp_match(domain, PKMAP, key, strlen(key), &lookup, &len);
if (err) {
-#ifdef DEBUG
- fprintf(stderr, "match failed error %d\n", err);
-#endif
+ LIBTIRPC_DEBUG(1,
+ ("getpublicandprivatekey: match failed error %d\n", err));
continue;
}
lookup[len] = 0;
free(lookup);
return (2);
#else /* YP */
-#ifdef DEBUG
- fprintf(stderr,
-"Bad record in %s '+' -- NIS not supported in this library copy\n", PKFILE);
-#endif /* DEBUG */
+ LIBTIRPC_DEBUG(1,
+("Bad record in %s '+' -- NIS not supported in this library copy\n", PKFILE));
continue;
#endif /* YP */
} else {
#include <stdlib.h>
#include <unistd.h>
+#include "debug.h"
+
static char *OPSYS = "unix";
static char *NETID = "netid.byname";
static char *NETIDFILE = "/etc/netid";
for (i = 0; grp->gr_mem[i]; i++)
if (!strcmp(grp->gr_mem[i], uname)) {
if (ngroups == NGROUPS) {
-#ifdef DEBUG
- fprintf(stderr,
- "initgroups: %s is in too many groups\n", uname);
-#endif
+ LIBTIRPC_DEBUG(1,
+ ("_getgroups: %s is in too many groups\n", uname));
goto toomany;
}
/* filter out duplicate group entries */
err = yp_match(domain, NETID, key,
strlen(key), &lookup, &len);
if (err) {
-#ifdef DEBUG
- fprintf(stderr, "match failed error %d\n", err);
-#endif
+ LIBTIRPC_DEBUG(1, ("getnetid: match failed error %d\n", err));
continue;
}
lookup[len] = 0;
fclose(fd);
return (2);
#else /* YP */
-#ifdef DEBUG
- fprintf(stderr,
-"Bad record in %s '+' -- NIS not supported in this library copy\n",
- NETIDFILE);
-#endif
+ LIBTIRPC_DEBUG(1,
+("Bad record in %s '+' -- NIS not supported in this library copy\n",
+ NETIDFILE));
continue;
#endif /* YP */
} else {
maj_stat, min_stat);
return (FALSE);
}
-#ifdef DEBUG
#ifdef HAVE_KRB5
{
gss_buffer_desc mechname;
gd->cname.length, (char *)gd->cname.value,
gd->sec.qop, gd->sec.svc);
#endif
-#endif /* DEBUG */
seq = htonl(gr->gr_win);
seqbuf.value = &seq;
seqbuf.length = sizeof(seq);