to privsep_procid.
ok mortimer
-/* $OpenBSD: httpd.c,v 1.70 2020/08/03 11:05:24 benno Exp $ */
+/* $OpenBSD: httpd.c,v 1.71 2021/01/27 07:21:52 deraadt Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
{ "logger", PROC_LOGGER, parent_dispatch_logger, logger }
};
+enum privsep_procid privsep_process;
+
void
parent_sig_handler(int sig, short event, void *arg)
{
-/* $OpenBSD: httpd.h,v 1.153 2020/10/29 12:30:52 denis Exp $ */
+/* $OpenBSD: httpd.h,v 1.154 2021/01/27 07:21:52 deraadt Exp $ */
/*
* Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org>
};
TAILQ_HEAD(control_socks, control_sock);
-struct {
+extern struct {
struct event ev;
int fd;
} control_state;
PROC_SERVER,
PROC_LOGGER,
PROC_MAX
-} privsep_process;
+};
+extern enum privsep_procid privsep_process;
/* Attach the control socket to the following process */
#define PROC_CONTROL PROC_LOGGER
uint32_t log_id;
TAILQ_ENTRY(log_file) log_entry;
};
-TAILQ_HEAD(log_files, log_file) log_files;
+extern TAILQ_HEAD(log_files, log_file) log_files;
struct media_type {
char media_name[MEDIATYPE_NAMEMAX];
-/* $OpenBSD: logger.c,v 1.23 2020/12/31 14:15:40 tb Exp $ */
+/* $OpenBSD: logger.c,v 1.24 2021/01/27 07:21:53 deraadt Exp $ */
/*
* Copyright (c) 2014 Reyk Floeter <reyk@openbsd.org>
static uint32_t last_log_id = 0;
+struct log_files log_files;
+
static struct privsep_proc procs[] = {
{ "parent", PROC_PARENT, logger_dispatch_parent },
{ "server", PROC_SERVER, logger_dispatch_server }
-/* $OpenBSD: iscsid.c,v 1.20 2017/01/23 08:40:07 benno Exp $ */
+/* $OpenBSD: iscsid.c,v 1.21 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
__dead void usage(void);
void shutdown_cb(int, short, void *);
-struct initiator *initiator;
+extern struct initiator *initiator;
struct event exit_ev;
int exit_rounds;
#define ISCSI_EXIT_WAIT 5
-/* $OpenBSD: ldapd.h,v 1.33 2021/01/09 14:51:45 rob Exp $ */
+/* $OpenBSD: ldapd.h,v 1.34 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martin@bzero.se>
struct buffertls buftls;
unsigned int s_flags;
};
-TAILQ_HEAD(conn_list, conn) conn_list;
+extern TAILQ_HEAD(conn_list, conn) conn_list;
struct ssl {
SPLAY_ENTRY(ssl) ssl_nodes;
-/* $OpenBSD: relayd.c,v 1.185 2021/01/11 10:24:08 mestre Exp $ */
+/* $OpenBSD: relayd.c,v 1.186 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2007 - 2016 Reyk Floeter <reyk@openbsd.org>
{ "ca", PROC_CA, parent_dispatch_ca, ca }
};
+enum privsep_procid privsep_process;
+
void
parent_sig_handler(int sig, short event, void *arg)
{
-/* $OpenBSD: relayd.h,v 1.263 2021/01/09 08:53:58 denis Exp $ */
+/* $OpenBSD: relayd.h,v 1.264 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org>
};
TAILQ_HEAD(control_socks, control_sock);
-struct {
+extern struct {
struct event ev;
int fd;
} control_state;
PROC_PFE,
PROC_CA,
PROC_MAX
-} privsep_process;
+};
+extern enum privsep_procid privsep_process;
/* Attach the control socket to the following process */
#define PROC_CONTROL PROC_PFE
-/* $OpenBSD: snmpd.c,v 1.43 2021/01/22 06:33:26 martijn Exp $ */
+/* $OpenBSD: snmpd.c,v 1.44 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
{ "snmpe", PROC_SNMPE, snmpd_dispatch_snmpe, snmpe, snmpe_shutdown },
};
+enum privsep_procid privsep_process;
+
void
snmpd_sig_handler(int sig, short event, void *arg)
{
-/* $OpenBSD: snmpd.h,v 1.91 2021/01/22 06:33:26 martijn Exp $ */
+/* $OpenBSD: snmpd.h,v 1.92 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
PROC_MAX
};
-enum privsep_procid privsep_process;
+extern enum privsep_procid privsep_process;
/* Attach the control socket to the following process */
#define PROC_CONTROL PROC_SNMPE
-/* $OpenBSD: switchd.c,v 1.18 2019/07/23 00:31:31 schwarze Exp $ */
+/* $OpenBSD: switchd.c,v 1.19 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org>
{ "ofcconn", PROC_OFCCONN, NULL, ofcconn }
};
+enum privsep_procid privsep_process;
+
__dead void
usage(void)
{
-/* $OpenBSD: types.h,v 1.11 2018/11/08 17:12:12 akoshibe Exp $ */
+/* $OpenBSD: types.h,v 1.12 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2013-2016 Reyk Floeter <reyk@openbsd.org>
PROC_CONTROL,
PROC_OFCCONN,
PROC_MAX
-} privsep_process;
+};
+extern enum privsep_procid privsep_process;
enum blockmodes {
BM_NORMAL,
-/* $OpenBSD: proc.h,v 1.16 2018/09/10 10:36:01 bluhm Exp $ */
+/* $OpenBSD: proc.h,v 1.17 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2010-2015 Reyk Floeter <reyk@openbsd.org>
PROC_VMM,
PROC_PRIV,
PROC_MAX,
-} privsep_process;
+};
+extern enum privsep_procid privsep_process;
#define CONFIG_RELOAD 0x00
#define CONFIG_VMS 0x01
-/* $OpenBSD: vmd.c,v 1.119 2020/09/23 19:18:18 martijn Exp $ */
+/* $OpenBSD: vmd.c,v 1.120 2021/01/27 07:21:54 deraadt Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
{ "vmm", PROC_VMM, vmd_dispatch_vmm, vmm, vmm_shutdown },
};
+enum privsep_procid privsep_process;
+
struct event staggered_start_timer;
/* For the privileged process */
-/* $OpenBSD: ypldap.c,v 1.21 2017/01/20 12:39:36 benno Exp $ */
+/* $OpenBSD: ypldap.c,v 1.22 2021/01/27 07:21:55 deraadt Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
char *conffile = YPLDAP_CONF_FILE;
int opts = 0;
+enum privsep_procid ypldap_process;
+
void
usage(void)
{
-/* $OpenBSD: ypldap.h,v 1.20 2018/11/06 20:42:03 jsing Exp $ */
+/* $OpenBSD: ypldap.h,v 1.21 2021/01/27 07:21:55 deraadt Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
};
TAILQ_HEAD(ypldap_addr_list, ypldap_addr);
-enum {
+enum privsep_procid {
PROC_MAIN,
PROC_CLIENT
-} ypldap_process;
+};
+extern enum privsep_procid ypldap_process;
static const char * const log_procnames[] = {
"parent",