yp_access.c (1fbdac93d98e19ba0c459e3a2c782dcf764ef05a) yp_access.c (b3e932340dfea2508fbbc4f8fa226b922970c073)
1/*
2 * Copyright (c) 1995
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 38 unchanged lines hidden (view full) ---

47#include <errno.h>
48#include <sys/param.h>
49#include "yp_extern.h"
50#ifdef TCP_WRAPPER
51#include "tcpd.h"
52#endif
53
54#ifndef lint
1/*
2 * Copyright (c) 1995
3 * Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 38 unchanged lines hidden (view full) ---

47#include <errno.h>
48#include <sys/param.h>
49#include "yp_extern.h"
50#ifdef TCP_WRAPPER
51#include "tcpd.h"
52#endif
53
54#ifndef lint
55static const char rcsid[] = "$Id: yp_access.c,v 1.7 1996/04/28 04:38:47 wpaul Exp $";
55static const char rcsid[] = "$Id: yp_access.c,v 1.2 1996/05/01 02:39:54 wpaul Exp $";
56#endif
57
58extern int debug;
59
60 /* NIS v1 */
61char *yp_procs[] = { "ypoldproc_null",
62 "ypoldproc_domain",
63 "ypoldproc_domain_nonack",

--- 149 unchanged lines hidden (view full) ---

213{
214 struct sockaddr_in *rqhost;
215 int status = 0;
216 static unsigned long oldaddr = 0;
217#ifndef TCP_WRAPPER
218 struct securenet *tmp;
219#endif
220 char *yp_procedure = NULL;
56#endif
57
58extern int debug;
59
60 /* NIS v1 */
61char *yp_procs[] = { "ypoldproc_null",
62 "ypoldproc_domain",
63 "ypoldproc_domain_nonack",

--- 149 unchanged lines hidden (view full) ---

213{
214 struct sockaddr_in *rqhost;
215 int status = 0;
216 static unsigned long oldaddr = 0;
217#ifndef TCP_WRAPPER
218 struct securenet *tmp;
219#endif
220 char *yp_procedure = NULL;
221 char procbuf[50];
221
222
222 yp_procedure = rqstp->rq_prog == YPPASSWDPROG ? "yppasswdprog_update" :
223 yp_procs[rqstp->rq_proc + (12 * (rqstp->rq_vers - 1))];
223 if (rqstp->rq_prog != YPPASSWDPROG && rqstp->rq_prog != YPPROG) {
224 snprintf(procbuf, sizeof(procbuf), "#%lu/#%lu", rqstp->rq_prog,
225 rqstp->rq_proc);
226 yp_procedure = (char *)&procbuf;
227 } else {
228 yp_procedure = rqstp->rq_prog == YPPASSWDPROG ?
229 "yppasswdprog_update" :
230 yp_procs[rqstp->rq_proc + (12 * (rqstp->rq_vers - 1))];
231 }
224
225 rqhost = svc_getcaller(rqstp->rq_xprt);
226
227 if (debug) {
228 yp_error("Procedure %s called from %s:%d", yp_procedure,
229 inet_ntoa(rqhost->sin_addr),
230 ntohs(rqhost->sin_port));
231 if (map != NULL)

--- 61 unchanged lines hidden ---
232
233 rqhost = svc_getcaller(rqstp->rq_xprt);
234
235 if (debug) {
236 yp_error("Procedure %s called from %s:%d", yp_procedure,
237 inet_ntoa(rqhost->sin_addr),
238 ntohs(rqhost->sin_port));
239 if (map != NULL)

--- 61 unchanged lines hidden ---