Lines Matching refs:sec
362 if (strcasecmp(namep, "sec") == 0) {
377 * if we have seen a sec= property then
472 strncmp(valstart, "sec", valp - valstart) == 0) {
502 int sec;
548 /* Global property or charset property or "sec" */
550 /* Check for "share.nfs.sec" */
551 if (strcmp(prop_name, "sec") != 0) {
559 * Special handling for share.nfs.sec
561 * e.g. share.nfs.sec=sys:krb5:dh:default
570 int sec;
574 sec = sa_prop_cmp_list(valstart,
576 if (sec < 0 || seen_sec[sec]) {
580 seen_sec[sec] = B_TRUE;
581 sec_order[nseen_sec++] = sec;
582 if (sec_nvl[sec] == NULL &&
583 nvlist_alloc(&sec_nvl[sec],
610 sec = sa_prop_cmp_list(sec_name, sec_flavors);
611 if (sec < 0) {
635 " sec=default"),
644 assert(sec < NFS_SEC_NUM_FLAVORS);
645 if (sec_nvl[sec] == NULL &&
646 nvlist_alloc(&sec_nvl[sec],
659 ret = sa_nfs_add_property(sec_nvl[sec], prop_name,
673 * If there was a "share.nfs.sec" list of modes, start with those.
676 sec = sec_order[idx];
677 if (sec_nvl[sec] != NULL) {
678 if (nvlist_add_nvlist(nvl, sec_flavors[sec],
679 sec_nvl[sec]) != 0) {
683 sec_nvl[sec] = NULL;
687 * Then add in any other security modes that were not in the sec list.
689 for (sec = 0; sec < NFS_SEC_NUM_FLAVORS; sec++) {
690 if (sec_nvl[sec] != NULL) {
691 if (nvlist_add_nvlist(nvl, sec_flavors[sec],
692 sec_nvl[sec]) != 0) {
696 sec_nvl[sec] = NULL;
709 for (sec = 0; sec < NFS_SEC_NUM_FLAVORS; sec++) {
710 if (sec_nvl[sec] != NULL) {
711 nvlist_free(sec_nvl[sec]);
741 (void) snprintf(prop, sizeof (prop), "share.nfs.sec.%s.%s",
762 int idx, sec, ret;
802 sec = sa_prop_cmp_list(propname, sec_flavors);
803 if (sec < 0) {
806 sec_order[nseen_sec++] = sec;
813 /* set share.nfs.sec to list of security modes in orig order */
817 sec = sec_order[idx];
819 idx > 0 ? ":" : "", sec_flavors[sec]);
821 if (nvlist_add_string(props_nvl, "share.nfs.sec", prop) != 0)
953 * ie sec=sys:dh,ro=*,rw=grp1
1003 "%s: value not defined for sec=default"),
1075 * are specified with a single sec= property (ie sec=krb5:krb5i,ro=*,rw=grp1)
1155 "sec=default"), sa_strerror(rc));
1207 * When done, merge sec=sys property list (if exists) into new security list
1208 * and then save it to the protocol nvlist as sec=sys.
1286 "%s: must follow sec property: %s"),
1297 * move security properties from existing sec=sys
1313 * This will replace any existing sec=sys nvlist
1392 * unset : if set, remove sec mode from dst_prot_nvl
1420 dgettext(TEXT_DOMAIN, "%s: sec=%s"),
1431 dgettext(TEXT_DOMAIN, "%s: sec=%s"),
1444 "%s: sec=%s,%s"), sa_strerror(rc),
1899 VERIFY(strlcpy(propname + prefixlen, "sec.", len) < len);
1900 sublen = prefixlen + strlen("sec.");
1908 /* Add in the proper modes for each sec prop */
1934 if (xprop_encode_string(xprops, "share.nfs.sec", "", B_TRUE,
1944 nvlist_add_boolean(sublists, "share.nfs.sec") != 0 ||
1945 nvlist_add_boolean(sublists, "share.nfs.sec.sys") != 0)
2433 "%s: must follow sec property: %s"),
2654 get_rootnames(seconfig_t *sec, char *list, int *count)
2677 if (!nfs_get_root_principal(sec, host, &a[i])) {
3325 * looking for sec property nvlists
3332 * add sec=mode. If we are working on the sharetab
3333 * entry, then convert sec=default into the correct
3349 "sec", propname, &sep) != SA_OK) {