From 48f91964c040977bb11cf31c79c44b1ff935100f Mon Sep 17 00:00:00 2001 From: tobhe Date: Thu, 15 Feb 2024 19:04:12 +0000 Subject: [PATCH] Remove unused control_socks queue. from markus@ --- sbin/iked/iked.c | 3 +-- sbin/iked/iked.h | 6 +----- sbin/iked/proc.c | 9 +-------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c index f1e60204dd2..7e9f6addac0 100644 --- a/sbin/iked/iked.c +++ b/sbin/iked/iked.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.c,v 1.68 2024/02/13 12:25:11 tobhe Exp $ */ +/* $OpenBSD: iked.c,v 1.69 2024/02/15 19:04:12 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -170,7 +170,6 @@ main(int argc, char *argv[]) ps = &env->sc_ps; ps->ps_env = env; - TAILQ_INIT(&ps->ps_rcsocks); if (strlcpy(env->sc_conffile, conffile, PATH_MAX) >= PATH_MAX) errx(1, "config file exceeds PATH_MAX"); diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h index 9717489714c..3133764eac6 100644 --- a/sbin/iked/iked.h +++ b/sbin/iked/iked.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.h,v 1.226 2024/01/24 10:09:07 tobhe Exp $ */ +/* $OpenBSD: iked.h,v 1.227 2024/02/15 19:04:12 tobhe Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -89,10 +89,7 @@ struct control_sock { int cs_fd; int cs_restricted; void *cs_env; - - TAILQ_ENTRY(control_sock) cs_entry; }; -TAILQ_HEAD(control_socks, control_sock); struct ctl_conn { TAILQ_ENTRY(ctl_conn) entry; @@ -719,7 +716,6 @@ struct privsep { int ps_noaction; struct control_sock ps_csock; - struct control_socks ps_rcsocks; unsigned int ps_instances[PROC_MAX]; unsigned int ps_ninstances; diff --git a/sbin/iked/proc.c b/sbin/iked/proc.c index 5e23b7bda04..69078840e5d 100644 --- a/sbin/iked/proc.c +++ b/sbin/iked/proc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.c,v 1.40 2024/01/17 08:25:02 claudio Exp $ */ +/* $OpenBSD: proc.c,v 1.41 2024/02/15 19:04:12 tobhe Exp $ */ /* * Copyright (c) 2010 - 2016 Reyk Floeter @@ -516,7 +516,6 @@ proc_run(struct privsep *ps, struct privsep_proc *p, { struct passwd *pw; const char *root; - struct control_sock *rcs; log_procinit(p->p_title); @@ -526,9 +525,6 @@ proc_run(struct privsep *ps, struct privsep_proc *p, if (p->p_id == PROC_CONTROL && ps->ps_instance == 0) { if (control_init(ps, &ps->ps_csock) == -1) fatalx("%s: control_init", __func__); - TAILQ_FOREACH(rcs, &ps->ps_rcsocks, cs_entry) - if (control_init(ps, rcs) == -1) - fatalx("%s: control_init", __func__); } /* Use non-standard user */ @@ -578,9 +574,6 @@ proc_run(struct privsep *ps, struct privsep_proc *p, if (p->p_id == PROC_CONTROL && ps->ps_instance == 0) { if (control_listen(&ps->ps_csock) == -1) fatalx("%s: control_listen", __func__); - TAILQ_FOREACH(rcs, &ps->ps_rcsocks, cs_entry) - if (control_listen(rcs) == -1) - fatalx("%s: control_listen", __func__); } #if DEBUG -- 2.20.1