lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200810290949.09108.paul.moore@hp.com>
Date:	Wed, 29 Oct 2008 09:49:09 -0400
From:	Paul Moore <paul.moore@...com>
To:	"Manish Katiyar" <mkatiyar@...il.com>
Cc:	kernel-janitors@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH] : Fix compilation warnings in net/netlabel/netlabel_addrlist.c

On Wednesday 29 October 2008 4:06:09 am Manish Katiyar wrote:
> Below patch fixes the following warning.
> net/netlabel/netlabel_addrlist.c:335: warning: unused variable 'dir'
> net/netlabel/netlabel_addrlist.c:369: warning: unused variable 'dir'
>
>
> Signed-off-by: Manish Katiyar <mkatiyar@...il.com>

Hi Manish,

Good catch, I ran compile tests with different SECURITY/NETLABEL/IPV6 
options enabled/disabled but forgot about AUDIT.  I appreciate your 
help finding this and submitting a possible solution but I think the 
better approach would be to conditionally compile out the 
netlbl_af{4,6}list_audit_addr() functions similarly to what we do with 
several of the NetLabel kernel API functions in include/net/netlabel.h, 
see netlbl_enabled() for a simple example.

If you have the time to revise this patch that would be great, just CC 
me on the posting and I'll look it over.  If you don't have time that 
is okay too, just let me know so I can fix it.

Thanks!

> ---
>  net/netlabel/netlabel_addrlist.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/net/netlabel/netlabel_addrlist.c
> b/net/netlabel/netlabel_addrlist.c index b0925a3..65fbec1 100644
> --- a/net/netlabel/netlabel_addrlist.c
> +++ b/net/netlabel/netlabel_addrlist.c
> @@ -332,7 +332,9 @@ void netlbl_af4list_audit_addr(struct
> audit_buffer *audit_buf,
>  					__be32 addr, __be32 mask)
>  {
>  	u32 mask_val = ntohl(mask);
> +#ifdef CONFIG_AUDIT
>  	char *dir = (src ? "src" : "dst");
> +#endif
>
>  	if (dev != NULL)
>  		audit_log_format(audit_buf, " netif=%s", dev);
> @@ -366,7 +368,9 @@ void netlbl_af6list_audit_addr(struct
> audit_buffer *audit_buf,
>  				 const struct in6_addr *addr,
>  				 const struct in6_addr *mask)
>  {
> +#ifdef CONFIG_AUDIT
>  	char *dir = (src ? "src" : "dst");
> +#endif
>
>  	if (dev != NULL)
>  		audit_log_format(audit_buf, " netif=%s", dev);



-- 
paul moore
linux @ hp
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ