[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] [PATCH] Fix dmeventd path check


I found a small bug in _start_server in

There is a possibility to change dmeventd_path by setting "executable"
parameter in config. But it will not work if there is no executable at
default DMEVENTD_PATH due to error in check: we must check args[0]
(which is dmeventd_path ? : default_dmeventd_path) instead of
DMEVENTD_PATH for existence. My patch fix this small issue.

Vitaly Kuznetsov, ALT Linux

diff --git a/LVM2/daemons/dmeventd/libdevmapper-event.c b/LVM2/daemons/dmeventd/libdevmapper-event.c
index bc8ad99..2dd3dc7 100644
--- a/LVM2/daemons/dmeventd/libdevmapper-event.c
+++ b/LVM2/daemons/dmeventd/libdevmapper-event.c
@@ -439,7 +439,7 @@ static int _start_daemon(char *dmeventd_path, struct dm_event_fifos *fifos)
 	/* server is not running */
-	if (!strncmp(DMEVENTD_PATH, "/", 1) && stat(DMEVENTD_PATH, &statbuf)) {
+	if (!strncmp(args[0], "/", 1) && stat(args[0], &statbuf)) {
 		log_error("Unable to find dmeventd.");

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]