Lines Matching defs:share

54 #include <sharefs/share.h>
443 /* Verify the name starts with "share.nfs." */
447 assert(valp - valstart == 5 && strncmp(valstart, "share", 5) == 0);
458 /* Global property share.nfs.prop */
516 if (nvlist_lookup_string(props, "share.nfs.raw", &strval) == 0) {
538 if (strcmp(namep, "share.nfs") == 0) {
550 /* Check for "share.nfs.sec" */
559 * Special handling for share.nfs.sec
561 * e.g. share.nfs.sec=sys:krb5:dh:default
671 * Now add the security lists to the share-style nvlist.
673 * If there was a "share.nfs.sec" list of modes, start with those.
741 (void) snprintf(prop, sizeof (prop), "share.nfs.sec.%s.%s",
783 idx == OPT_CHARSET_MAP ? "share.nfs.charset" : "share.nfs",
813 /* set share.nfs.sec to list of security modes in orig order */
821 if (nvlist_add_string(props_nvl, "share.nfs.sec", prop) != 0)
1562 * add a default proto property list to the share
1565 sa_nfs_share_set_def_proto(nvlist_t *share)
1575 if ((rc = sa_share_set_proto(share, SA_PROT_NFS, prot_nvl)) != SA_OK)
1853 #define SA_PREFIX_SHARE_NFS "share.nfs."
1934 if (xprop_encode_string(xprops, "share.nfs.sec", "", B_TRUE,
1943 if (nvlist_add_boolean(sublists, "share.nfs.charset") != 0 ||
1944 nvlist_add_boolean(sublists, "share.nfs.sec") != 0 ||
1945 nvlist_add_boolean(sublists, "share.nfs.sec.sys") != 0)
2136 * no other NFS share exists in path (ancestor/decendents)
2145 nvlist_t *share;
2166 while (sa_share_read_next(shdl, hdl, &share) == SA_OK) {
2173 * ignore if this is not an NFS share or has the
2174 * same share name.
2176 if ((sa_share_get_proto(share, SA_PROT_NFS) == NULL) ||
2177 ((path = sa_share_get_path(share)) == NULL) ||
2178 ((name = sa_share_get_name(share)) == NULL) ||
2180 sa_share_free(share);
2206 sa_share_free(share);
2211 sa_share_free(share);
2233 " share: %s in %s"), sh_path, sh_name);
2243 * search permanent storage for an existing share with
2255 nvlist_t *share;
2260 while (!found && sa_share_read_next(shdl, hdl, &share) == SA_OK) {
2261 nfs = sa_share_get_proto(share, SA_PROT_NFS);
2263 ((sh_path = sa_share_get_path(share)) != NULL) &&
2267 sh_name = sa_share_get_name(share);
2274 sa_share_free(share);
2284 * search active shares for a share with public option
2293 nvlist_t *share;
2298 while (!found && sa_share_find_next(hdl, &share) == SA_OK) {
2299 if (sa_share_get_status(share) & SA_PROT_NFS) {
2300 nfs = sa_share_get_proto(share, SA_PROT_NFS);
2302 ((sh_path = sa_share_get_path(share)) != NULL) &&
2308 sa_share_free(share);
2335 sa_nfs_share_validate(libshare_handle_t *shdl, nvlist_t *share,
2352 sh_name = sa_share_get_name(share);
2361 sh_path = sa_share_get_path(share);
2371 * Errors that a caller wants to ignore when creating a share but not
2372 * when publishing a share must not prevent the caller from getting a
2386 prot_nvl = sa_share_get_proto(share, SA_PROT_NFS);
3076 "public share exists");
3146 /* volatile filehandles - expire on share */
3435 sa_fillshare(nvlist_t *share, struct exp_share *sh, boolean_t publish)
3443 if ((sh_name = sa_share_get_name(share)) == NULL) {
3455 if ((props = sa_share_get_proto(share, SA_PROT_NFS)) == NULL) {
3466 if (nvlist_pack(share, &sh->shr_buf, &sh->shr_len,
3551 nfs_build_exportdata(nvlist_t *share, struct exportdata *exportp)
3557 sh_path = sa_share_get_path(share);
3564 props = sa_share_get_proto(share, SA_PROT_NFS);
3596 * Send a single share to sharefs system call.
3649 * sa_nfs_share_publish(share, wait)
3651 * Convert the share nvlist into an exportdata structure then issue
3655 sa_nfs_share_publish(nvlist_t *share, int wait)
3665 sh_name = sa_share_get_name(share);
3672 sh_path = sa_share_get_path(share);
3682 if ((rc = nfs_build_exportdata(share, &export)) != SA_OK) {
3689 * Fill in share structure and send to the kernel.
3691 if ((rc = sa_fillshare(share, &sh, B_TRUE)) != SA_OK) {
3769 sa_nfs_share_unpublish(nvlist_t *share, int wait)
3775 sh_name = sa_share_get_name(share);
3782 if ((sh_path = sa_share_get_path(share)) == NULL) {
3831 nvlist_t *share;
3847 * retrieve the share nvlist from nvpair
3849 if (nvpair_value_nvlist(nvp, &share) != 0) {
3867 cureap->dname = sa_share_get_path(share);
3885 ret = nfs_build_exportdata(share, cureap->uex);
3891 sh_path = sa_share_get_path(share);
3892 sh_name = sa_share_get_name(share);
3894 "NFS: share not published: %s:%s",
3905 ret = sa_fillshare(share, cureap->shareinfo, publish);
3911 sh_path = sa_share_get_path(share);
3912 sh_name = sa_share_get_name(share);
3914 "NFS: share not published: %s:%s",
3944 * if any one share succeeded, return true
3962 * inherited, we have to assume that logging was on for any share that