mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 03:19:35 +03:00
Call modprobe with absolute path
Some sudo configurations may not include /sbin in the PATH. libzfs_load_module() currently does not call modprobe with an absolute path, so it may fail under such configurations if called under sudo. This change adds the absolute path to modprobe so we no longer rely on how PATH is set. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
d877ac6bfe
commit
6ee71f5ce3
@ -664,7 +664,7 @@ libzfs_load_module(const char *module)
|
|||||||
|
|
||||||
if (libzfs_module_loaded(module))
|
if (libzfs_module_loaded(module))
|
||||||
return 0;
|
return 0;
|
||||||
return libzfs_run_process("modprobe", argv);
|
return libzfs_run_process("/sbin/modprobe", argv);
|
||||||
}
|
}
|
||||||
|
|
||||||
libzfs_handle_t *
|
libzfs_handle_t *
|
||||||
|
Loading…
Reference in New Issue
Block a user