-/* $OpenBSD: proc.c,v 1.35 2021/04/20 21:11:56 dv Exp $ */
+/* $OpenBSD: proc.c,v 1.36 2023/02/15 20:44:01 tobhe Exp $ */
/*
* Copyright (c) 2010 - 2014 Reyk Floeter <reyk@openbsd.org>
void proc_open(struct privsep *, struct privsep_proc *,
struct privsep_proc *, size_t);
void proc_close(struct privsep *);
-int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid);
void proc_shutdown(struct privsep_proc *);
void proc_sig_handler(int, short, void *);
void proc_range(struct privsep *, enum privsep_procid, int *, int *);
int proc_dispatch_null(int, struct privsep_proc *, struct imsg *);
-int
-proc_ispeer(struct privsep_proc *procs, unsigned int nproc,
- enum privsep_procid type)
-{
- unsigned int i;
-
- for (i = 0; i < nproc; i++)
- if (procs[i].p_id == type)
- return (1);
- return (0);
-}
-
void
proc_init(struct privsep *ps, struct privsep_proc *procs, unsigned int nproc)
{
-/* $OpenBSD: proc.c,v 1.41 2021/12/04 06:52:58 florian Exp $ */
+/* $OpenBSD: proc.c,v 1.42 2023/02/15 20:44:01 tobhe Exp $ */
/*
* Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org>
void proc_accept(struct privsep *, int, enum privsep_procid,
unsigned int);
void proc_close(struct privsep *);
-int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid);
void proc_shutdown(struct privsep_proc *);
void proc_sig_handler(int, short, void *);
void proc_range(struct privsep *, enum privsep_procid, int *, int *);
int proc_dispatch_null(int, struct privsep_proc *, struct imsg *);
-int
-proc_ispeer(struct privsep_proc *procs, unsigned int nproc,
- enum privsep_procid type)
-{
- unsigned int i;
-
- for (i = 0; i < nproc; i++)
- if (procs[i].p_id == type)
- return (1);
- return (0);
-}
-
enum privsep_procid
proc_getid(struct privsep_proc *procs, unsigned int nproc,
const char *proc_name)
-/* $OpenBSD: proc.c,v 1.43 2022/09/03 20:07:31 benno Exp $ */
+/* $OpenBSD: proc.c,v 1.44 2023/02/15 20:44:01 tobhe Exp $ */
/*
* Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org>
void proc_accept(struct privsep *, int, enum privsep_procid,
unsigned int);
void proc_close(struct privsep *);
-int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid);
void proc_shutdown(struct privsep_proc *);
void proc_sig_handler(int, short, void *);
void proc_range(struct privsep *, enum privsep_procid, int *, int *);
int proc_dispatch_null(int, struct privsep_proc *, struct imsg *);
-int
-proc_ispeer(struct privsep_proc *procs, unsigned int nproc,
- enum privsep_procid type)
-{
- unsigned int i;
-
- for (i = 0; i < nproc; i++)
- if (procs[i].p_id == type)
- return (1);
- return (0);
-}
-
enum privsep_procid
proc_getid(struct privsep_proc *procs, unsigned int nproc,
const char *proc_name)
-/* $OpenBSD: proc.c,v 1.27 2020/06/30 17:11:49 martijn Exp $ */
+/* $OpenBSD: proc.c,v 1.28 2023/02/15 20:44:01 tobhe Exp $ */
/*
* Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org>
void proc_accept(struct privsep *, int, enum privsep_procid,
unsigned int);
void proc_close(struct privsep *);
-int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid);
void proc_shutdown(struct privsep_proc *);
void proc_sig_handler(int, short, void *);
void proc_range(struct privsep *, enum privsep_procid, int *, int *);
int proc_dispatch_null(int, struct privsep_proc *, struct imsg *);
-int
-proc_ispeer(struct privsep_proc *procs, unsigned int nproc,
- enum privsep_procid type)
-{
- unsigned int i;
-
- for (i = 0; i < nproc; i++)
- if (procs[i].p_id == type)
- return (1);
- return (0);
-}
-
enum privsep_procid
proc_getid(struct privsep_proc *procs, unsigned int nproc,
const char *proc_name)
-/* $OpenBSD: proc.c,v 1.19 2021/04/20 21:11:56 dv Exp $ */
+/* $OpenBSD: proc.c,v 1.20 2023/02/15 20:44:01 tobhe Exp $ */
/*
* Copyright (c) 2010 - 2016 Reyk Floeter <reyk@openbsd.org>
void proc_accept(struct privsep *, int, enum privsep_procid,
unsigned int);
void proc_close(struct privsep *);
-int proc_ispeer(struct privsep_proc *, unsigned int, enum privsep_procid);
void proc_shutdown(struct privsep_proc *);
void proc_sig_handler(int, short, void *);
void proc_range(struct privsep *, enum privsep_procid, int *, int *);
int proc_dispatch_null(int, struct privsep_proc *, struct imsg *);
-int
-proc_ispeer(struct privsep_proc *procs, unsigned int nproc,
- enum privsep_procid type)
-{
- unsigned int i;
-
- for (i = 0; i < nproc; i++)
- if (procs[i].p_id == type)
- return (1);
- return (0);
-}
-
enum privsep_procid
proc_getid(struct privsep_proc *procs, unsigned int nproc,
const char *proc_name)