_SPECIAL(target_principal),
#undef _SPECIAL
};
+ const struct ncacn_option *no = NULL;
+ size_t name_len = strlen(name);
size_t i;
int ret;
return specials[i].value;
}
+ no = ncacn_option_by_name(name);
+ if (no != NULL) {
+ if (b->flags & no->flag) {
+ return no->name;
+ }
+
+ return NULL;
+ }
+
if (b->options == NULL) {
return NULL;
}
for (i=0; b->options[i]; i++) {
const char *o = b->options[i];
const char *vs = NULL;
- size_t name_len = strlen(name);
ret = strncmp(name, o, name_len);
if (ret != 0) {
_SPECIAL(target_principal),
#undef _SPECIAL
};
+ const struct ncacn_option *no = NULL;
+ size_t name_len = strlen(name);
const char *opt = NULL;
char *tmp;
- size_t name_len = strlen(name);
size_t i;
int ret;
return NT_STATUS_OK;
}
+ no = ncacn_option_by_name(name);
+ if (no != NULL) {
+ if (value == NULL) {
+ b->flags &= ~no->flag;
+ return NT_STATUS_OK;
+ }
+
+ ret = strcasecmp(no->name, value);
+ if (ret != 0) {
+ return NT_STATUS_INVALID_PARAMETER_MIX;
+ }
+
+ b->flags |= no->flag;
+ return NT_STATUS_OK;
+ }
+
for (i=0; b->options && b->options[i]; i++) {
const char *o = b->options[i];