-/* $OpenBSD: parse.y,v 1.63 2023/01/28 14:40:53 dv Exp $ */
+/* $OpenBSD: parse.y,v 1.64 2023/04/24 15:12:14 kn Exp $ */
/*
* Copyright (c) 2007-2016 Reyk Floeter <reyk@openbsd.org>
int
parse_config(const char *filename)
{
- struct sym *sym, *next;
+ extern const char default_conffile[];
+ struct sym *sym, *next;
if ((file = pushfile(filename, 0)) == NULL) {
+ /* no default config file is fine */
+ if (errno == ENOENT && filename == default_conffile) {
+ log_debug("%s: missing", filename);
+ return (0);
+ }
log_warn("failed to open %s", filename);
if (errno == ENOENT)
return (0);
-/* $OpenBSD: vmd.c,v 1.142 2023/04/23 12:11:37 dv Exp $ */
+/* $OpenBSD: vmd.c,v 1.143 2023/04/24 15:12:14 kn Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
static struct passwd proc_privpw;
static const uint8_t zero_mac[ETHER_ADDR_LEN];
+const char default_conffile[] = VMD_CONF;
+const char *conffile = default_conffile;
+
int
vmd_dispatch_control(int fd, struct privsep_proc *p, struct imsg *imsg)
{
{
struct privsep *ps;
int ch;
- const char *conffile = VMD_CONF;
enum privsep_procid proc_id = PROC_PARENT;
int proc_instance = 0, vm_launch = 0, vm_fd = -1;
const char *errp, *title = NULL;