Lines Matching refs:acl

267 	struct vacm_access *acl;
271 if ((acl = vacm_get_access_rule(&val->var, sub)) == NULL)
276 if ((acl = vacm_get_next_access_rule(&val->var, sub)) == NULL)
278 vacm_append_access_rule_index(&val->var, sub, acl);
282 if ((acl = vacm_get_access_rule(&val->var, sub)) == NULL &&
285 if (acl != NULL && community != COMM_INITIALIZE &&
286 acl->type == StorageType_readOnly)
291 ctx->scratch->int1 = acl->ctx_match;
293 acl->ctx_match = 1;
295 acl->ctx_match = 0;
301 ctx->scratch->ptr1 = acl->read_view;
302 acl->read_view = vacm_get_view_by_name(val->v.octetstring.octets, val->v.octetstring.len);
303 if (acl->read_view == NULL) {
304 acl->read_view = ctx->scratch->ptr1;
310 ctx->scratch->ptr1 = acl->write_view;
311 if ((acl->write_view =
314 acl->write_view = ctx->scratch->ptr1;
320 ctx->scratch->ptr1 = acl->notify_view;
321 if ((acl->notify_view =
324 acl->notify_view = ctx->scratch->ptr1;
333 if (acl == NULL) {
338 if ((acl = vacm_new_access_rule(gname, cprefix,
341 acl->status = RowStatus_destroy;
343 acl->type = StorageType_volatile;
345 acl->type = StorageType_readOnly;
349 ctx->scratch->int1 = acl->status;
350 acl->status = val->v.integer;
358 if ((acl = vacm_get_access_rule(&val->var, sub)) == NULL)
361 return (vacm_delete_access_rule(acl));
363 acl->status = RowStatus_active;
367 if ((acl = vacm_get_access_rule(&val->var, sub)) == NULL)
371 acl->ctx_match = ctx->scratch->int1;
374 acl->read_view = ctx->scratch->ptr1;
377 acl->write_view = ctx->scratch->ptr1;
380 acl->notify_view = ctx->scratch->ptr1;
384 return (vacm_delete_access_rule(acl));
396 return (string_get(val, acl->ctx_prefix, -1));
398 if (acl->read_view != NULL)
399 return (string_get(val, acl->read_view->viewname, -1));
403 if (acl->write_view != NULL)
404 return (string_get(val, acl->write_view->viewname, -1));
408 if (acl->notify_view != NULL)
409 return (string_get(val, acl->notify_view->viewname, -1));
413 val->v.integer = acl->type;
416 val->v.integer = acl->status;
683 const struct vacm_access *acl)
687 oid->len = sub + strlen(acl->group->groupname) +
688 strlen(acl->ctx_prefix) + 4;
690 oid->subs[sub] = strlen(acl->group->groupname);
691 for (i = 1; i <= strlen(acl->group->groupname); i++)
692 oid->subs[sub + i] = acl->group->groupname[i - 1];
693 sub += strlen(acl->group->groupname) + 1;
695 oid->subs[sub] = strlen(acl->ctx_prefix);
696 for (i = 1; i <= strlen(acl->ctx_prefix); i++)
697 oid->subs[sub + i] = acl->ctx_prefix[i - 1];
698 sub += strlen(acl->ctx_prefix) + 1;
699 oid->subs[sub++] = acl->sec_model;
700 oid->subs[sub] = acl->sec_level;
736 struct vacm_access *acl;
742 for (acl = vacm_first_access_rule(); acl != NULL;
743 acl = vacm_next_access_rule(acl))
744 if (strcmp(gname, acl->group->groupname) == 0 &&
745 strcmp(prefix, acl->ctx_prefix) == 0 &&
746 smodel == acl->sec_model && slevel == acl->sec_level)
747 return (acl);
757 struct vacm_access *acl;
766 for (acl = vacm_first_access_rule(); acl != NULL;
767 acl = vacm_next_access_rule(acl))
768 if (strcmp(gname, acl->group->groupname) == 0 &&
769 strcmp(prefix, acl->ctx_prefix) == 0 &&
770 smodel == acl->sec_model && slevel == acl->sec_model)
771 return (vacm_next_access_rule(acl));