diff --git a/src/kernel_interface.c b/src/kernel_interface.c index ed4a47b..e75ef4d 100644 --- a/src/kernel_interface.c +++ b/src/kernel_interface.c @@ -167,8 +167,7 @@ init_coda(int *dev, dav_run_msgloop_fn *msg_loop, void **mdata) ++minor; } - if (*dev <= 0) { - system("/sbin/modprobe coda &>/dev/null"); + if (*dev <= 0 && system("/sbin/modprobe coda &>/dev/null") == 0) { minor = 0; while (*dev <= 0 && minor < MAX_CODADEVS) { char *path; @@ -223,8 +222,7 @@ init_fuse(int *dev, dav_run_msgloop_fn *msg_loop, void **mdata, abort(); *dev = open(path, O_RDWR | O_NONBLOCK); - if (*dev <= 0) { - system("/sbin/modprobe fuse &>/dev/null"); + if (*dev <= 0 && system("/sbin/modprobe fuse &>/dev/null") == 0) { *dev = open(path, O_RDWR | O_NONBLOCK); } if (*dev <= 0) { diff --git a/src/mount_davfs.c b/src/mount_davfs.c index b767656..49486da 100644 --- a/src/mount_davfs.c +++ b/src/mount_davfs.c @@ -72,6 +72,7 @@ #include #include "defaults.h" +#include "../gl/canonicalize.h" #include "mount_davfs.h" #include "kernel_interface.h" #include "cache.h" @@ -528,7 +529,7 @@ check_dirs(dav_args *args) char *template = ne_concat(DAV_DATA_DIR, "/", DAV_CONFIG, NULL); char *command = ne_concat("cp ", template, " ", file_name, NULL); - system(command); + if (system(command) != 0); free(command); free(template); }