Lines Matching refs:value

445  * add_security_prop(sec, name, value, persist, iszfs)
452 add_security_prop(struct securities *sec, char *name, char *value,
459 if (value == NULL) {
462 value = "*";
464 value = "true";
472 * exists with a value "host1" and a later token of
486 * new value alone is added.
488 oldvalue = sa_get_property_attr(prop, "value");
498 * value onto the old value for multiple
507 /* Replace old value with new value. */
508 newvalue = strdup(value);
509 } else if (strcmp(value, "*") == 0 ||
510 strcmp(oldvalue, value) == 0) {
512 * Keep old value and ignore
513 * the new value.
522 value, sep);
537 prop = sa_create_property(name, value);
573 char *copy, *base, *token, *value;
582 value = strchr(token, '=');
583 if (value != NULL)
584 *value++ = '\0';
588 for (next = NULL, tok = value; tok != NULL;
702 char *value;
704 * if the option has a value, it will have an '=' to
705 * separate the name from the value. The following
706 * code will result in value != NULL and token
707 * pointing to just the name if there is a value.
709 value = strchr(token, '=');
710 if (value != NULL) {
711 *value++ = '\0';
731 value = "dh";
733 if (value == NULL) {
739 value, "nfs");
770 value, persist, iszfs);
776 if (value == NULL) {
780 value = "*";
782 value = "global";
785 value = "true";
792 * value was NULL, the default
793 * value will have been
796 prop = sa_create_property(token, value);
924 char *value;
934 value = sa_get_property_attr(option, "value");
937 if (value != NULL && is_a_number(value)) {
938 val = strtoul(value, NULL, 0);
941 pw = getpwnam(value != NULL ? value : "nobody");
952 if (value != NULL && (strcasecmp(value, "true") == 0 ||
953 strcmp(value, "1") == 0))
959 if (value != NULL && (strcasecmp(value, "true") == 0 ||
960 strcmp(value, "1") == 0))
966 if (value != NULL && (strcasecmp(value, "true") == 0 ||
967 strcmp(value, "1") == 0))
973 if (value != NULL && (strcasecmp(value, "true") == 0 ||
974 strcmp(value, "1") == 0))
980 if (value != NULL && (strcmp(value, "..") == 0 ||
981 strchr(value, '/') != NULL)) {
986 value);
989 if (value != NULL && *value != '\0' &&
990 strcmp(value, ".") != 0) {
997 export->ex_index = strdup(value);
1008 if (value == NULL)
1009 value = strdup("global");
1010 if (value != NULL)
1012 strlen(value) ? value : "global");
1023 if (value != NULL && (strcasecmp(value, "true") == 0 ||
1024 strcmp(value, "1") == 0))
1034 value != NULL ? value : "");
1039 if (value != NULL)
1040 sa_free_attr_string(value);
1151 char *value;
1154 value = sa_get_property_attr(prop, "value");
1156 longform = value != NULL && strcmp(value, "*") != 0;
1174 if (value != NULL) {
1176 value, &sp->s_rootcnt);
1189 if (value != NULL) {
1190 sp->s_window = atoi(value);
1197 if (value != NULL && is_a_number(value)) {
1198 val = strtoul(value, NULL, 0);
1201 pw = getpwnam(value != NULL ? value : "nobody");
1220 if (value != NULL)
1221 sa_free_attr_string(value);
1335 char *value;
1342 value = sa_get_property_attr(prop, "value");
1358 * For NFS, boolean value of FALSE means it
1361 if (value != NULL && strcasecmp(value, "false") == 0)
1363 if (value != NULL) {
1364 sa_free_attr_string(value);
1365 value = NULL;
1369 if (value != NULL && strcmp(value, "*") == 0) {
1370 sa_free_attr_string(value);
1371 value = NULL;
1373 if (value != NULL)
1374 len += 1 + strlen(value);
1378 if (value != NULL && strlen(value) == 0) {
1379 sa_free_attr_string(value);
1380 value = NULL;
1382 if (value != NULL)
1383 len += 1 + strlen(value);
1387 if (value != NULL)
1388 len += 1 + strlen(value);
1410 if (value == NULL) {
1416 name, value != NULL ? value : "");
1423 if (value != NULL)
1424 sa_free_attr_string(value);
1817 export.ex_anon = UID_NOBODY; /* this is our default value */
2042 * additional lookup. A missing "path" value makes this a no-op
2114 check_user(char *value)
2118 if (!is_a_number(value)) {
2124 pw = getpwnam(value);
2130 intval = strtoull(value, NULL, 0);
2139 check_group(char *value)
2143 if (!is_a_number(value)) {
2149 gr = getgrnam(value);
2155 intval = strtoull(value, NULL, 0);
2186 * Check that the property has a legitimate value for its type.
2200 char *value;
2207 /* need to validate value range here as well */
2226 value = sa_get_property_attr(property, "value");
2227 if (value != NULL) {
2232 /* check that the value is all digits */
2233 if (!is_a_number(value))
2238 if (strlen(value) == 0 ||
2239 strcasecmp(value, "true") == 0 ||
2240 strcmp(value, "1") == 0 ||
2241 strcasecmp(value, "false") == 0 ||
2242 strcmp(value, "0") == 0) {
2250 ret = check_user(value);
2254 if (strcmp(value, "..") == 0 ||
2255 strchr(value, '/') != NULL) {
2271 * Also, ro and rw may have cross value
2300 * value other than the one we are
2303 ovalue1 = sa_get_property_attr(oprop1, "value");
2304 ovalue2 = sa_get_property_attr(oprop2, "value");
2306 ret = check_rorwnone(value, ovalue1,
2319 if (value == NULL ||
2320 strlen(value) == 0) {
2321 if (value != NULL)
2323 value);
2324 value = strdup("global");
2326 if (value != NULL &&
2327 nfsl_findconfig(configlist, value,
2407 p = strdup(value);
2448 if (value != NULL)
2449 sa_free_attr_string(value);
2468 * "compare" are set, then the value for this property should be
2624 * Extract the property and value out of the line and create the
2628 extractprop(char *name, char *value)
2642 prop = sa_create_property(proto_options[index].name, value);
2720 char value[PATH_MAX];
2729 bzero(value, PATH_MAX);
2735 ret = nfs_smf_get_prop(name, value,
2739 ret = extractprop(name, value);
2768 /* add the default value */
2879 /* got the state so get the equality for the return value */
2948 * it is also possible that a bad value may have put
2977 * nfs_minmax_check(name, value)
2979 * Verify that the value for the property specified by index is valid
2980 * relative to the opposite value in the case of a min/max variable.
2986 nfs_minmax_check(int index, int value)
3004 pval = sa_get_property_attr(prop, "value");
3009 ret = value <= val ? B_TRUE : B_FALSE;
3012 ret = value >= val ? B_TRUE : B_FALSE;
3022 * nfs_validate_proto_prop(index, name, value)
3025 * value. This is a sanity check to prevent bad values getting into
3030 * Note that OPT_TYPE_NUMBER will additionally check that the value is
3032 * value as well as specified in the proto_options members other and
3037 nfs_validate_proto_prop(int index, char *name, char *value)
3046 if (!is_a_number(value))
3050 val = strtoul(value, NULL, 0);
3056 * client_versmin/client_versmax, the value of the
3073 if (strlen(value) == 0)
3075 cp = strchr(value, '.');
3076 if (cp == NULL || cp == value || strchr(value, '@') != NULL)
3081 if (strlen(value) == 0 ||
3082 strcasecmp(value, "true") == 0 ||
3083 strcmp(value, "1") == 0 ||
3084 strcasecmp(value, "false") == 0 ||
3085 strcmp(value, "0") == 0) {
3093 if (strcasecmp(value, "on") != 0 &&
3094 strcasecmp(value, "off") != 0) {
3104 if (strcasecmp(value, "all") == 0)
3112 if (strcmp(nconf->nc_proto, value) == 0) {
3143 char *value;
3146 value = sa_get_property_attr(prop, "value");
3147 if (name != NULL && value != NULL) {
3153 ret = nfs_validate_proto_prop(index, name, value);
3158 if (value != NULL)
3159 sa_free_attr_string(value);
3160 if (string_to_boolean(value) == 0)
3161 value = strdup("0");
3163 value = strdup("1");
3165 ret = nfs_smf_set_prop(name, value, instance, sctype,
3178 if (value != NULL)
3179 sa_free_attr_string(value);
3187 * Caller must free the returned value.