HomeFreeBSD

6280 libzfs: unshare_one() could fail with EZFS_SHARENFSFAILED

Description

6280 libzfs: unshare_one() could fail with EZFS_SHARENFSFAILED

illumos/illumos-gate@d1672efb6feac57c42788e27f739dfa3c4f3baf7
https://github.com/illumos/illumos-gate/commit/d1672efb6feac57c42788e27f739dfa3c4f3baf7

https://www.illumos.org/issues/6280

The unshare_one() in libzfs could fail with EZFS_SHARENFSFAILED at line 834
here:
831    /* make sure libshare initialized */
832    if ((err = zfs_init_libshare(hdl, SA_INIT_SHARE_API)) != SA_OK) {
833        free(mntpt);    /* don't need the copy anymore */
834        return (zfs_error_fmt(hdl, EZFS_SHARENFSFAILED,
835            dgettext(TEXT_DOMAIN, "cannot unshare '%s': %s"),
836            name, _sa_errorstr(err)));
837    }
The correct error should be EZFS_UNSHARENFSFAILED instead.

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Marcel Telka <marcel.telka@nexenta.com>

Details

Provenance
avgAuthored on
Reviewer
matthew
Parents
rS316931: 6268 zfs diff confused by moving a file to another directory
Branches
Unknown
Tags
Unknown