mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
ypldap: fix -Wunused-but-set-variable warnings
* wrlen has been write-only since the code was imported * removing "dns_pid" mirrors ntpd/ntp.c 1.122 * ifdef out unfinished code in yp_check() ok millert@ deraadt@
This commit is contained in:
parent
917b5357f2
commit
509b4fc58d
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: entries.c,v 1.4 2017/07/12 23:18:24 jca Exp $ */
|
||||
/* $OpenBSD: entries.c,v 1.5 2022/02/05 22:59:58 naddy Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
|
||||
*
|
||||
@ -38,7 +38,6 @@
|
||||
void
|
||||
flatten_entries(struct env *env)
|
||||
{
|
||||
size_t wrlen;
|
||||
size_t len;
|
||||
char *linep;
|
||||
char *endp;
|
||||
@ -54,7 +53,6 @@ flatten_entries(struct env *env)
|
||||
*
|
||||
* An extra octet is alloced to make space for an additional NUL.
|
||||
*/
|
||||
wrlen = env->sc_user_line_len;
|
||||
if ((linep = calloc(1, env->sc_user_line_len + 1)) == NULL) {
|
||||
/*
|
||||
* XXX: try allocating a smaller chunk of memory
|
||||
@ -76,7 +74,6 @@ flatten_entries(struct env *env)
|
||||
free(ue->ue_line);
|
||||
ue->ue_line = endp;
|
||||
endp += len;
|
||||
wrlen -= len;
|
||||
|
||||
/*
|
||||
* To save memory strdup(3) the netid_line which originally used
|
||||
@ -92,7 +89,6 @@ flatten_entries(struct env *env)
|
||||
env->sc_user_lines = linep;
|
||||
log_debug("done pushing users");
|
||||
|
||||
wrlen = env->sc_group_line_len;
|
||||
if ((linep = calloc(1, env->sc_group_line_len + 1)) == NULL) {
|
||||
/*
|
||||
* XXX: try allocating a smaller chunk of memory
|
||||
@ -113,7 +109,6 @@ flatten_entries(struct env *env)
|
||||
free(ge->ge_line);
|
||||
ge->ge_line = endp;
|
||||
endp += len;
|
||||
wrlen -= len;
|
||||
}
|
||||
env->sc_group_lines = linep;
|
||||
log_debug("done pushing groups");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: ldapclient.c,v 1.43 2019/06/28 13:32:52 deraadt Exp $ */
|
||||
/* $OpenBSD: ldapclient.c,v 1.44 2022/02/05 22:59:58 naddy Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Alexander Schrijver <aschrijver@openbsd.org>
|
||||
@ -357,7 +357,7 @@ client_shutdown(void)
|
||||
pid_t
|
||||
ldapclient(int pipe_main2client[2])
|
||||
{
|
||||
pid_t pid, dns_pid;
|
||||
pid_t pid;
|
||||
int pipe_dns[2];
|
||||
struct passwd *pw;
|
||||
struct event ev_sigint;
|
||||
@ -382,7 +382,7 @@ ldapclient(int pipe_main2client[2])
|
||||
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_dns) == -1)
|
||||
fatal("socketpair");
|
||||
dns_pid = ypldap_dns(pipe_dns, pw);
|
||||
ypldap_dns(pipe_dns, pw);
|
||||
close(pipe_dns[1]);
|
||||
|
||||
#ifndef DEBUG
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: yp.c,v 1.19 2017/12/07 05:21:57 zhuk Exp $ */
|
||||
/* $OpenBSD: yp.c,v 1.20 2022/02/05 22:59:58 naddy Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
|
||||
*
|
||||
@ -268,12 +268,14 @@ yp_dispatch(struct svc_req *req, SVCXPRT *trans)
|
||||
int
|
||||
yp_check(struct svc_req *req)
|
||||
{
|
||||
#ifdef notyet
|
||||
struct sockaddr_in *caller;
|
||||
|
||||
caller = svc_getcaller(req->rq_xprt);
|
||||
/*
|
||||
* We might want to know who we allow here.
|
||||
*/
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user