diff options
author | Michael Knudsen <mk@cvs.openbsd.org> | 2006-07-09 23:02:22 +0000 |
---|---|---|
committer | Michael Knudsen <mk@cvs.openbsd.org> | 2006-07-09 23:02:22 +0000 |
commit | e79497d4bf98e3f64d4ee667bb0812541e7561eb (patch) | |
tree | 3292c13235425770f5b2e3cd99c793bbe3071842 /usr.bin/usbhidaction/usbhidaction.c | |
parent | 1a5e7d389c864c2e750537537187c451ae31e7ed (diff) |
Two fixes:
o Prevent a config reload from always happening after the first
round of command execution.
o Make sure config reload works when daemonised by requiring an
absolute path to the config file.
From NetBSD.
Ok brad.
Diffstat (limited to 'usr.bin/usbhidaction/usbhidaction.c')
-rw-r--r-- | usr.bin/usbhidaction/usbhidaction.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/usbhidaction/usbhidaction.c b/usr.bin/usbhidaction/usbhidaction.c index 49c30347296..544f769914b 100644 --- a/usr.bin/usbhidaction/usbhidaction.c +++ b/usr.bin/usbhidaction/usbhidaction.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbhidaction.c,v 1.7 2006/04/23 08:51:24 fgsch Exp $ */ +/* $OpenBSD: usbhidaction.c,v 1.8 2006/07/09 23:02:21 mk Exp $ */ /* $NetBSD: usbhidaction.c,v 1.7 2002/01/18 14:38:59 augustss Exp $ */ /* @@ -56,7 +56,7 @@ int verbose = 0; int isdemon = 0; -int reparse = 1; +int reparse = 0; struct command { struct command *next; @@ -137,6 +137,9 @@ main(int argc, char **argv) dev = devnamebuf; } + if (demon && conf[0] != '/') + errx(1, "config file must have an absolute path, %s", conf); + fd = open(dev, O_RDWR); if (fd < 0) err(1, "%s", dev); |