Re: [PATCH 7/9] Audit: internally use the new LSM audit hooks

From: Paul Moore
Date: Mon Mar 03 2008 - 18:52:41 EST


On Saturday 01 March 2008 3:01:11 pm Ahmed S. Darwish wrote:
> Convert Audit to use the new LSM Audit hooks instead of
> the exported SELinux interface.
>
> Basically, use:
> security_audit_rule_init
> secuirty_audit_rule_free
> security_audit_rule_known
> security_audit_rule_match
>
> instad of (respectively) :
> selinux_audit_rule_init
> selinux_audit_rule_free
> audit_rule_has_selinux
> selinux_audit_rule_match
>
> Signed-off-by: Casey Schaufler <casey@xxxxxxxxxxxxxxxx>
> Signed-off-by: Ahmed S. Darwish <darwish.07@xxxxxxxxx>
> ---
>
> audit.c | 7 ------
> auditfilter.c | 61
> ++++++++++++++++------------------------------------------ auditsc.c
> | 9 +++-----
> 3 files changed, 22 insertions(+), 55 deletions(-)

For some reason some of your patches are not coming through with correct
diffstats (notice the lack of a path relative to the kernel base?).
Don't worry too much about it as it's not grounds to reject the patch
(at least in my mind) but it's worth looking into on your end for the
next time you submit patches.

> Andrew, please atomically merge patch #7 and patch #8. Although
> a system with patch7 and without patch8 will be compiled fine,
> the SELinux Audit hooks are not set up yet. This means below
> audit hooks will point to the dummy hooks instead of SELinux
> ones even if SELinux is enabled.
>
> I could not setup the SELinux hooks first cause they have
> the same name of the old exported SELinux interface with a
> difference of one parameter.

In cases like this where you need patches applied atomically to ensure
correct operation you can always combine the two patches into one
(assuming they are still small enough to be posted, which shouldn't be
a problem here). Small patches are nice and easy to review, but that
doesn't mean you have to break everything up if it is awkward.

I've looked over patches #7, #8, and #9 and they look okay to me, but
I'm not tagging them 'Reviewed-by' because they go beyond areas of the
kernel that I feel comfortable reviewing at this point. Rest assured
there are other on the To/CC line that can help you out (I see James
Morris already Ack'd your entire patch set).

Thanks for all your work on this, it's a nice improvement.

--
paul moore
linux security @ hp
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/