summaryrefslogtreecommitdiff
path: root/usr/src/lib/libshare
diff options
context:
space:
mode:
authordougm <none@none>2008-03-24 14:30:03 -0700
committerdougm <none@none>2008-03-24 14:30:03 -0700
commit3b61b335c37f67a23674820a1cf865f4e058d617 (patch)
tree42ca8153f565a24ea4c6bb195ae0cac08fd953fa /usr/src/lib/libshare
parentf85463f27ee24416b2ed04366664846e9b14ba9b (diff)
downloadillumos-gate-3b61b335c37f67a23674820a1cf865f4e058d617.tar.gz
6678356 zfs set sharenfs=anon=0 complains invalid option
Diffstat (limited to 'usr/src/lib/libshare')
-rw-r--r--usr/src/lib/libshare/common/libshare.c5
-rw-r--r--usr/src/lib/libshare/nfs/libshare_nfs.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/usr/src/lib/libshare/common/libshare.c b/usr/src/lib/libshare/common/libshare.c
index e7583a0585..e5c5578c46 100644
--- a/usr/src/lib/libshare/common/libshare.c
+++ b/usr/src/lib/libshare/common/libshare.c
@@ -3200,12 +3200,11 @@ sa_add_property(void *object, sa_property_t property)
sa_group_t parent;
sa_group_t group;
char *proto;
- sa_handle_t handle;
if (property != NULL) {
+ sa_handle_t handle;
handle = sa_find_group_handle((sa_group_t)object);
- if (handle == NULL)
- return (SA_CONFIG_ERR);
+ /* It is legitimate to not find a handle */
proto = sa_get_optionset_attr(object, "type");
if ((ret = sa_valid_property(handle, object, proto,
property)) == SA_OK) {
diff --git a/usr/src/lib/libshare/nfs/libshare_nfs.c b/usr/src/lib/libshare/nfs/libshare_nfs.c
index 8ddc74e1a0..7d4ef12210 100644
--- a/usr/src/lib/libshare/nfs/libshare_nfs.c
+++ b/usr/src/lib/libshare/nfs/libshare_nfs.c
@@ -1603,8 +1603,13 @@ public_exists(sa_handle_t handle, sa_share_t skipshare)
{
sa_group_t group = NULL;
+ /*
+ * If we don't have a handle, we can only do syntax check. We
+ * can't check against other shares so we assume OK and will
+ * catch the problem only when we actually try to apply it.
+ */
if (handle == NULL)
- return (SA_SYSTEM_ERR);
+ return (SA_OK);
if (skipshare != NULL) {
group = sa_get_parent_group(skipshare);