summaryrefslogtreecommitdiff
path: root/usr/src/lib/libshare/common/libshare_zfs.c
diff options
context:
space:
mode:
authorDan Kruchinin <dan.kruchinin@nexenta.com>2012-01-19 15:14:24 +0200
committerDan Kruchinin <dan.kruchinin@nexenta.com>2012-01-19 15:14:24 +0200
commitc3f7431d06a31d5689b27f508120a3bd357f251e (patch)
tree397e393ddda043bf045d76535a1b5de3d249faf3 /usr/src/lib/libshare/common/libshare_zfs.c
parent439928d9b7923040ce5896039aba963aae8a89b3 (diff)
downloadillumos-joyent-c3f7431d06a31d5689b27f508120a3bd357f251e.tar.gz
1992 sharemgr show -P [nfs|smb] doesn't work for shared datasets
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com> Reviewed by: Andrew Stormont <Andrew.Stormont@nexenta.com> Reviewed by: Garrett D'Amore <garrett.damore@gmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>
Diffstat (limited to 'usr/src/lib/libshare/common/libshare_zfs.c')
-rw-r--r--usr/src/lib/libshare/common/libshare_zfs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/usr/src/lib/libshare/common/libshare_zfs.c b/usr/src/lib/libshare/common/libshare_zfs.c
index b96abc505d..7d3ee27a2d 100644
--- a/usr/src/lib/libshare/common/libshare_zfs.c
+++ b/usr/src/lib/libshare/common/libshare_zfs.c
@@ -22,6 +22,9 @@
/*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
*/
+/*
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ */
#include <stdio.h>
#include <libzfs.h>
@@ -495,6 +498,15 @@ find_or_create_zfs_subgroup(sa_handle_t handle, char *groupname, char *proto,
/* If no optionset, add one. */
if (sa_get_optionset(group, proto) == NULL)
(void) sa_create_optionset(group, proto);
+
+ /*
+ * Do not forget to update an optionset of
+ * the parent group so that it contains
+ * all protocols its subgroups have.
+ */
+ if (sa_get_optionset(zfs, proto) == NULL)
+ (void) sa_create_optionset(zfs, proto);
+
free(options);
} else {
*err = SA_NO_MEMORY;