aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDarrel Goeddel <dgoeddel@trustedcs.com>2006-06-29 17:56:39 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2006-07-01 05:44:08 -0400
commit3a6b9f85c641a3b89420b0c8150ed377526a1fe1 (patch)
treee44e64edf0620d3f6da443c57540b09882231459 /kernel
parent5adc8a6adc91c4c85a64c75a70a619fffc924817 (diff)
[PATCH] audit: rename AUDIT_SE_* constants
This patch renames some audit constant definitions and adds additional definitions used by the following patch. The renaming avoids ambiguity with respect to the new definitions. Signed-off-by: Darrel Goeddel <dgoeddel@trustedcs.com> include/linux/audit.h | 15 ++++++++---- kernel/auditfilter.c | 50 ++++++++++++++++++++--------------------- kernel/auditsc.c | 10 ++++---- security/selinux/ss/services.c | 32 +++++++++++++------------- 4 files changed, 56 insertions(+), 51 deletions(-) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditfilter.c50
-rw-r--r--kernel/auditsc.c10
2 files changed, 30 insertions, 30 deletions
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index e98db08fc6df..40a9931a13e2 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -470,11 +470,11 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
470 case AUDIT_ARG2: 470 case AUDIT_ARG2:
471 case AUDIT_ARG3: 471 case AUDIT_ARG3:
472 break; 472 break;
473 case AUDIT_SE_USER: 473 case AUDIT_SUBJ_USER:
474 case AUDIT_SE_ROLE: 474 case AUDIT_SUBJ_ROLE:
475 case AUDIT_SE_TYPE: 475 case AUDIT_SUBJ_TYPE:
476 case AUDIT_SE_SEN: 476 case AUDIT_SUBJ_SEN:
477 case AUDIT_SE_CLR: 477 case AUDIT_SUBJ_CLR:
478 str = audit_unpack_string(&bufp, &remain, f->val); 478 str = audit_unpack_string(&bufp, &remain, f->val);
479 if (IS_ERR(str)) 479 if (IS_ERR(str))
480 goto exit_free; 480 goto exit_free;
@@ -611,11 +611,11 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule)
611 data->fields[i] = f->type; 611 data->fields[i] = f->type;
612 data->fieldflags[i] = f->op; 612 data->fieldflags[i] = f->op;
613 switch(f->type) { 613 switch(f->type) {
614 case AUDIT_SE_USER: 614 case AUDIT_SUBJ_USER:
615 case AUDIT_SE_ROLE: 615 case AUDIT_SUBJ_ROLE:
616 case AUDIT_SE_TYPE: 616 case AUDIT_SUBJ_TYPE:
617 case AUDIT_SE_SEN: 617 case AUDIT_SUBJ_SEN:
618 case AUDIT_SE_CLR: 618 case AUDIT_SUBJ_CLR:
619 data->buflen += data->values[i] = 619 data->buflen += data->values[i] =
620 audit_pack_string(&bufp, f->se_str); 620 audit_pack_string(&bufp, f->se_str);
621 break; 621 break;
@@ -654,11 +654,11 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b)
654 return 1; 654 return 1;
655 655
656 switch(a->fields[i].type) { 656 switch(a->fields[i].type) {
657 case AUDIT_SE_USER: 657 case AUDIT_SUBJ_USER:
658 case AUDIT_SE_ROLE: 658 case AUDIT_SUBJ_ROLE:
659 case AUDIT_SE_TYPE: 659 case AUDIT_SUBJ_TYPE:
660 case AUDIT_SE_SEN: 660 case AUDIT_SUBJ_SEN:
661 case AUDIT_SE_CLR: 661 case AUDIT_SUBJ_CLR:
662 if (strcmp(a->fields[i].se_str, b->fields[i].se_str)) 662 if (strcmp(a->fields[i].se_str, b->fields[i].se_str))
663 return 1; 663 return 1;
664 break; 664 break;
@@ -774,11 +774,11 @@ static struct audit_entry *audit_dupe_rule(struct audit_krule *old,
774 * the originals will all be freed when the old rule is freed. */ 774 * the originals will all be freed when the old rule is freed. */
775 for (i = 0; i < fcount; i++) { 775 for (i = 0; i < fcount; i++) {
776 switch (new->fields[i].type) { 776 switch (new->fields[i].type) {
777 case AUDIT_SE_USER: 777 case AUDIT_SUBJ_USER:
778 case AUDIT_SE_ROLE: 778 case AUDIT_SUBJ_ROLE:
779 case AUDIT_SE_TYPE: 779 case AUDIT_SUBJ_TYPE:
780 case AUDIT_SE_SEN: 780 case AUDIT_SUBJ_SEN:
781 case AUDIT_SE_CLR: 781 case AUDIT_SUBJ_CLR:
782 err = audit_dupe_selinux_field(&new->fields[i], 782 err = audit_dupe_selinux_field(&new->fields[i],
783 &old->fields[i]); 783 &old->fields[i]);
784 break; 784 break;
@@ -1537,11 +1537,11 @@ static inline int audit_rule_has_selinux(struct audit_krule *rule)
1537 for (i = 0; i < rule->field_count; i++) { 1537 for (i = 0; i < rule->field_count; i++) {
1538 struct audit_field *f = &rule->fields[i]; 1538 struct audit_field *f = &rule->fields[i];
1539 switch (f->type) { 1539 switch (f->type) {
1540 case AUDIT_SE_USER: 1540 case AUDIT_SUBJ_USER:
1541 case AUDIT_SE_ROLE: 1541 case AUDIT_SUBJ_ROLE:
1542 case AUDIT_SE_TYPE: 1542 case AUDIT_SUBJ_TYPE:
1543 case AUDIT_SE_SEN: 1543 case AUDIT_SUBJ_SEN:
1544 case AUDIT_SE_CLR: 1544 case AUDIT_SUBJ_CLR:
1545 return 1; 1545 return 1;
1546 } 1546 }
1547 } 1547 }
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 316657855165..1d24fade17e6 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -321,11 +321,11 @@ static int audit_filter_rules(struct task_struct *tsk,
321 if (ctx) 321 if (ctx)
322 result = audit_comparator(ctx->loginuid, f->op, f->val); 322 result = audit_comparator(ctx->loginuid, f->op, f->val);
323 break; 323 break;
324 case AUDIT_SE_USER: 324 case AUDIT_SUBJ_USER:
325 case AUDIT_SE_ROLE: 325 case AUDIT_SUBJ_ROLE:
326 case AUDIT_SE_TYPE: 326 case AUDIT_SUBJ_TYPE:
327 case AUDIT_SE_SEN: 327 case AUDIT_SUBJ_SEN:
328 case AUDIT_SE_CLR: 328 case AUDIT_SUBJ_CLR:
329 /* NOTE: this may return negative values indicating 329 /* NOTE: this may return negative values indicating
330 a temporary error. We simply treat this as a 330 a temporary error. We simply treat this as a
331 match for now to avoid losing information that 331 match for now to avoid losing information that