Lines Matching defs:share

34  * The group properties are inherited by shares and the share properties are
37 * We start out by parsing out the SMF configuration of the share into a
38 * nvlist format. We then merge the group and share properties
39 * into the newly defined nvlist share for libshare v2.
44 * Consider a share defined in libshare v1 format. The share belongs to group
46 * /export/home and it has "none=*" property setting. The share is
55 * Format of the share in SMF configuration
58 * Group names start with "optionset" and share and resource names
59 * start with "S-". The share (with path "/export/home") with resource name
76 * Format of the nvlist that is created from the share in SMF
80 * nvlist created by parsing the SMF configuration of the share.
105 * properties of groups and share into nvlist for libshare2.
451 * Extract a resource node from the share node. The resource node is
459 sa_upgrade_extract_resource(nvlist_t *share, char *path, char *valuestr)
489 ret = sa_upgrade_add_nvlist(share, idx,
504 * Extract share properties from the SMF property group.
519 nvlist_t *node, *pnode, *share, *resource;
541 share = sa_upgrade_get_nvlist(group, id);
542 if (share == NULL)
544 node = share;
552 * rest is hung off of the share.
555 resource = sa_upgrade_get_nvlist(share, sectype);
621 "error parsing properties for share id %s.", id);
642 * Extract the share definition from the share property group.
658 nvlist_t *share;
687 share = sa_share_alloc(NULL, NULL);
688 if (share == NULL) {
693 ret = sa_share_set_prop(share, "id", id);
695 sa_share_free(share);
715 ret = sa_share_set_prop(share, "path", valuestr);
717 ret = sa_share_set_prop(share, "desc", valuestr);
728 share, path, valuestr);
733 share, path, valuestr);
746 * for these shares are made up using the share path.
755 ret = sa_upgrade_extract_resource(share, path, sh_name);
760 ret = sa_upgrade_add_nvlist(group, id, share);
761 sa_share_free(share);
764 sa_upgrade_error(ret, "error parsing share id %s", id);
967 * A share group in a libshare configuration must have a
969 * mark it as an error. If no share and protocol is defined
985 * Do a second pass to get share/resource properties. This is
1144 * This method merges the "security" properties for a group and/or a share
1200 * This method merges the "protocol" properties for a group and/or a share
1299 nvlist_t *share = NULL;
1312 if (nvpair_value_nvlist(gnvp, &share) != 0)
1315 for (snvp = nvlist_next_nvpair(share, NULL); snvp != NULL;
1316 snvp = nvlist_next_nvpair(share, snvp)) {
1329 ret = sa_upgrade_merge_prot(group, share);
1333 ret = sa_upgrade_merge_prot(share, resource);
1408 sa_upgrade_sharing_set(libshare_handle_t *shdl, nvlist_t *share, char *gname)
1415 path = sa_share_get_path(share);
1420 "error setting sharesmb property for share "
1421 " %s in group %s.", sa_share_get_name(share), gname);
1430 "error getting mountpoint for share %s in group %s.",
1431 sa_share_get_name(share), gname);
1436 if (sa_share_get_proto(share, p) == NULL)
1442 * in order to preserve share properties, only
1452 "error setting share%s property "
1453 "for share %s in group %s",
1455 sa_share_get_name(share), gname);
1472 * in the new SMF instance for libshare v2. It also publishes the new share.
1479 nvlist_t *share = NULL;
1489 ret = nvpair_value_nvlist(snvp, &share);
1494 "error validating share for group %s", gname);
1498 if ((sname = sa_share_get_name(share)) == NULL)
1500 ret = sa_share_validate(shdl, share, flags,
1516 "error validating share %s for group "
1520 if (ret == SA_OK && sa_share_get_mntpnt(share) == NULL) {
1525 path = sa_share_get_path(share);
1529 ret = sa_share_set_mntpnt(share, mntpnt);
1533 "on share %s for group %s",
1544 ret = nvpair_value_nvlist(snvp, &share);
1549 "error writing share for group %s", gname);
1553 if ((sname = sa_share_get_name(share)) == NULL)
1555 ret = sa_share_write(shdl, share, B_TRUE, B_TRUE);
1559 "error writing share %s for group %s",
1564 ret = sa_upgrade_sharing_set(shdl, share, gname);
1568 "error writing share %s for group %s",
1594 syslog(LOG_ERR, dgettext(TEXT_DOMAIN, "share upgrade: %s: %s"),
1596 (void) fprintf(stderr, dgettext(TEXT_DOMAIN, "share upgrade: %s: %s\n"),
1600 syslog(LOG_ERR, dgettext(TEXT_DOMAIN, "share upgrade: %s"),
1603 "share upgrade: %s\n"), scf_strerror(scf_error()));