]> git.proxmox.com Git - mirror_zfs.git/commit
zpool command complains about /etc/exports.d
authorGeorge Wilson <george.wilson@delphix.com>
Fri, 25 Sep 2020 20:09:40 +0000 (15:09 -0500)
committerGitHub <noreply@github.com>
Fri, 25 Sep 2020 20:09:40 +0000 (13:09 -0700)
commitbd76bcb36dcdc7264f17a64b506fe2a1fdf266b9
tree824b4b594d53085107598ddfe7c3585ffee00394
parenta5c77dc4d53ea86d048a9c251015eed14d57e0a7
zpool command complains about /etc/exports.d

If the /etc/exports.d directory does not exist, then we should only
create it when we're performing an action which already requires root
privileges.

This commit moves the directory creation to the enable/disable code
path which ensures that we have the appropriate privileges.

Reviewed-by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Wilson <gwilson@delphix.com>
Closes #10785
Closes #10934
lib/libshare/os/freebsd/nfs.c
lib/libshare/os/linux/nfs.c