diff options
author | Ned Bass <[email protected]> | 2010-10-22 11:13:16 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-10-22 12:39:57 -0700 |
commit | 6ee71f5ce39885969f986f3092fed00f41667963 (patch) | |
tree | d84837142dddffd226a3c5efbf5f4be4942caf42 /lib/libzfs | |
parent | d877ac6bfefaf09f0399888df1fc88bd4b4419d0 (diff) |
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 <[email protected]>
Diffstat (limited to 'lib/libzfs')
-rw-r--r-- | lib/libzfs/libzfs_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c index 01995f802..33c440c48 100644 --- a/lib/libzfs/libzfs_util.c +++ b/lib/libzfs/libzfs_util.c @@ -664,7 +664,7 @@ libzfs_load_module(const char *module) if (libzfs_module_loaded(module)) return 0; - return libzfs_run_process("modprobe", argv); + return libzfs_run_process("/sbin/modprobe", argv); } libzfs_handle_t * |