Lines Matching defs:protocol

64  *	If the group has an optionset with the specified protocol,
68 has_protocol(sa_group_t group, char *protocol)
73 optionset = sa_get_optionset(group, protocol);
448 * notify_or_enable_share(share, protocol)
451 * this function will use the protocol specific notify function
453 * sa_enable_share(). "protocol" is the protocol that was specified
457 notify_or_enable_share(sa_share_t share, char *protocol)
489 (protocol != NULL && strcmp(groupproto, protocol) != 0)) {
538 /* If the protocol isn't enabled for this group skip it */
583 * not NULL, then update all the shares for the protocol that was
654 * the name of the protocol that we want to
703 * Do a sanity check on the optlist provided for the protocol. This
815 * add_optionset(group, optlist, protocol, *err)
835 result = B_TRUE; /* adding a protocol is a change */
1059 * check_valid_group(group, protocol)
1061 * Check to see that the group should have the protocol added (if
1066 check_valid_group(sa_group_t group, char *groupname, char *protocol)
1069 if (protocol != NULL) {
1070 if (has_protocol(group, protocol)) {
1073 " with protocol %s\n"), groupname,
1074 protocol);
1077 strcmp(protocol, "nfs") != 0) {
1079 "Group \"%s\" only allows protocol "
1084 /* must add new protocol */
1086 "Group already exists and no protocol "
1094 * enforce_featureset(group, protocol, dryrun, force)
1096 * Check the protocol featureset against the group and enforce any
1101 enforce_featureset(sa_group_t group, char *protocol, boolean_t dryrun,
1106 if (protocol == NULL)
1110 * First check to see if specified protocol is one we want to
1113 features = sa_proto_get_featureset(protocol);
1116 gettext("Protocol \"%s\" not supported.\n"), protocol);
1121 * Check to see if the new protocol is one that requires
1132 "set: %s\n"), protocol);
1156 * Now make sure we really want to put this protocol on a
1180 * this may or may not have a protocol associated with it.
1181 * No protocol means "all" protocols in this case.
1193 char *protocol = NULL;
1212 if (protocol != NULL) {
1215 "not supported: %s\n"), protocol);
1218 protocol = optarg;
1219 if (sa_valid_protocol(protocol))
1222 "Invalid protocol specified: %s\n"), protocol);
1281 if (protocol == NULL && optlist != NULL) {
1282 /* lookup default protocol */
1291 ret = chk_opt(optlist, 0, protocol);
1299 * If a group already exists, we can only add a new protocol
1300 * to it and not create a new one or add the same protocol
1310 /* group exists so must be a protocol add */
1311 ret = check_valid_group(group, groupname, protocol);
1324 /* check protocol vs optlist */
1327 ret = valid_options(handle, optlist, protocol,
1341 * Check group and protocol against featureset
1344 ret = enforce_featureset(group, protocol,
1354 (void) add_optionset(group, optlist, protocol,
1356 } else if (protocol != NULL) {
1358 protocol);
1361 } else if (protocol == NULL) {
1438 char *protocol = NULL;
1452 if (protocol != NULL) {
1455 "not supported: %s\n"), protocol);
1458 protocol = optarg;
1459 if (!sa_valid_protocol(protocol)) {
1460 (void) printf(gettext("Invalid protocol "
1461 "specified: %s\n"), protocol);
1516 if (sectype != NULL && protocol == NULL) {
1519 (void) printf(gettext("\tsecurity requires protocol to be "
1532 * - if protocol specified, only delete the protocol
1542 if (protocol == NULL) {
1570 /* a protocol delete */
1575 security = sa_get_security(group, sectype, protocol);
1581 optionset = sa_get_optionset(group, protocol);
1585 * protocol to delete
1590 * for the protocol and remove
1602 strcmp(secprot, protocol) == 0)
1614 * With the protocol items removed, make sure that all
1621 (void) sa_delete_legacy(share, protocol);
1686 * get the protocol list by finding the optionsets on this
1696 * extract out the protocol type from this optionset
1725 char *protocol = NULL;
1737 if (protocol != NULL) {
1741 protocol);
1744 protocol = optarg;
1745 if (!sa_valid_protocol(protocol)) {
1747 "Invalid protocol specified: %s\n"),
1748 protocol);
1788 if (protocol == NULL || has_protocol(group, protocol)) {
1822 * Format the properties and encode the protocol and optional named
1825 * format is protocol[:name]=(property-list)
1870 * show_properties(group, protocol, prefix)
1872 * print the properties for a group. If protocol is NULL, do all
1873 * protocols otherwise only the specified protocol. All security
1874 * (named groups specific to the protocol) are included.
1883 show_properties(sa_group_t group, char *protocol, char *prefix)
1890 if (protocol != NULL) {
1891 optionset = sa_get_optionset(group, protocol);
1895 out_properties(optionset, protocol, NULL);
1897 security = sa_get_security(group, protocol, NULL);
1901 out_properties(security, protocol, NULL);
1904 for (optionset = sa_get_optionset(group, protocol);
1915 for (security = sa_get_security(group, NULL, protocol);
2293 char *protocol = NULL;
2309 if (protocol != NULL) {
2313 protocol);
2316 protocol = optarg;
2317 if (!sa_valid_protocol(protocol)) {
2319 "Invalid protocol specified: %s\n"),
2320 protocol);
2370 show_group(group, verbose, properties, protocol,
2382 protocol, NULL);
2419 * otherwise. The enable is also done on each protocol
2437 * enable the share based on the protocol type. This
2439 * for the protocol to be enabled.
2688 "by at least one enabled protocol "
3656 * basic_set(groupname, optlist, protocol, sharepath, rsrcname, dryrun)
3666 * Resource names may take options if the protocol supports it. If the
3667 * protocol doesn't support resource level options, rsrcname is just
3673 char *protocol, char *sharepath, char *rsrcname, int dryrun)
3712 * group. Also check the protocol to see if it
3737 features = sa_proto_get_featureset(protocol);
3745 ret = valid_options(handle, optlist, protocol,
3750 protocol, &ret);
3753 protocol, &ret);
3756 share, protocol);
3774 (void) enable_all_groups(handle, worklist, 0, 0, protocol,
3783 * space_set(groupname, optlist, protocol, sharepath, dryrun)
3792 char *protocol, char *sharepath, int dryrun, char *sectype)
3803 if (sa_proto_valid_space(protocol, sectype) == 0) {
3805 "for protocol.\n"), sectype);
3833 ret = valid_options(handle, optlist, protocol,
3838 optlist, protocol, &ret);
3841 optlist, protocol, &ret);
3849 protocol);
3866 protocol, B_TRUE);
3889 char *protocol = NULL;
3906 if (protocol != NULL) {
3909 "not supported: %s\n"), protocol);
3912 protocol = optarg;
3913 if (!sa_valid_protocol(protocol)) {
3915 "Invalid protocol specified: %s\n"),
3916 protocol);
3987 ret = chk_opt(optlist, optset != NULL, protocol);
3990 protocol == NULL || ret != OPT_ADD_OK) {
4004 if (protocol == NULL) {
4026 ret = basic_set(handle, groupname, optlist, protocol,
4029 ret = space_set(handle, groupname, optlist, protocol,
4192 * basic_unset(groupname, optlist, protocol, sharepath, rsrcname, dryrun)
4199 char *protocol, char *sharepath, char *rsrcname, int dryrun)
4228 * group. Also check the protocol to see if it
4252 features = sa_proto_get_featureset(protocol);
4261 optlist, protocol);
4267 protocol, &ret);
4273 protocol);
4282 optlist, protocol, &ret);
4286 protocol);
4307 protocol, B_TRUE);
4316 * space_unset(groupname, optlist, protocol, sharepath, dryrun)
4322 char *protocol, char *sharepath, int dryrun, char *sectype)
4345 optlist, protocol, sectype);
4353 sectype, optlist, protocol, &ret);
4357 sectype, protocol);
4367 optlist, protocol, &ret);
4372 sec = sa_proto_space_alias(protocol, sectype);
4373 security = sa_get_security(group, sec, protocol);
4390 worklist = add_list(worklist, group, 0, protocol);
4402 protocol, B_TRUE);
4424 char *protocol = NULL;
4441 if (protocol != NULL) {
4444 "not supported: %s\n"), protocol);
4447 protocol = optarg;
4448 if (!sa_valid_protocol(protocol)) {
4450 "Invalid protocol specified: %s\n"),
4451 protocol);
4475 * share if resource for this protocol doesn't use
4529 ret = chk_opt(optlist, optset != NULL, protocol);
4532 protocol == NULL) {
4546 if (protocol == NULL) {
4557 * protocol to it and not create a new one or add the
4558 * same protocol again.
4564 ret = basic_unset(handle, groupname, optlist, protocol,
4567 ret = space_unset(handle, groupname, optlist, protocol,
4591 char *protocol = NULL;
4606 if (protocol != NULL) {
4609 "not supported: %s\n"), protocol);
4612 protocol = optarg;
4613 if (!sa_valid_protocol(protocol)) {
4615 "Invalid protocol specified: %s\n"),
4616 protocol);
4671 0, protocol);
4688 worklist = add_list(worklist, group, 0, protocol);
4724 * If the protocol isn't enabled, skip it and treat as
4807 char *protocol = NULL;
4822 if (protocol != NULL) {
4825 "not supported: %s\n"), protocol);
4828 protocol = optarg;
4829 if (!sa_valid_protocol(protocol)) {
4831 "Invalid protocol specified: %s\n"),
4832 protocol);
4888 protocol);
4905 worklist = add_list(worklist, group, 0, protocol);
4939 char *protocol = NULL;
4953 if (protocol != NULL) {
4956 "not supported: %s\n"), protocol);
4959 protocol = optarg;
4960 if (!sa_valid_protocol(protocol)) {
4962 "Invalid protocol specified: %s\n"),
4963 protocol);
5010 protocol);
5023 protocol) != NULL) {
5039 protocol);
5045 (void) enable_all_groups(handle, worklist, 0, 1, protocol, B_FALSE);
5067 char *protocol = NULL;
5081 if (protocol != NULL) {
5084 "not supported: %s\n"), protocol);
5087 protocol = optarg;
5088 if (!sa_valid_protocol(protocol)) {
5090 "Invalid protocol specified: %s\n"),
5091 protocol);
5136 protocol);
5156 protocol);
5203 * if the security matches the specified protocol, we
5300 * shares or allowed a protocol to be specified. We want to
5301 * skip those shares that are not the specified protocol.
5345 * to NFS if no protocol specified.
5389 * Walk all of the groups for the specified protocol and call
5430 char *protocol = "nfs";
5461 protocol = optarg;
5462 if (!sa_valid_protocol(protocol)) {
5464 protocol, "share") == 0 &&
5469 "Invalid protocol specified: "
5470 "%s\n"), protocol);
5511 (void) output_legacy_file(stdout, protocol, handle);
5543 features = sa_proto_get_featureset(protocol);
5553 * isn't an error. If the protocol is "smb", the group
5557 if (strcmp(protocol, "smb") == 0)
5575 * "smb" protocol.
5581 protocol);
5629 remove_all_options(share, protocol);
5647 * a protocol that uses resource level sharing
5672 protocol);
5687 ret = sa_enable_share(share, protocol);
5690 protocol);
5694 protocol);
5717 char *protocol = "nfs"; /* for now */
5736 protocol = optarg;
5737 if (!sa_valid_protocol(protocol)) {
5739 protocol, "unshare") == 0 &&
5809 features = sa_proto_get_featureset(protocol);
5815 protocol);
5838 ret = sa_disable_share(share, protocol);
5983 * eventually provide a way to provide protocol specific sub-commands.