All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition
@ 2017-01-04 21:46 Nicolas Iooss
  2017-01-04 21:46 ` [PATCH 2/2] libsemanage: increment the right index variable in for loop Nicolas Iooss
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nicolas Iooss @ 2017-01-04 21:46 UTC (permalink / raw)
  To: selinux

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 libsemanage/src/genhomedircon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
index 7ceeafb7b5d9..fd6d391984b6 100644
--- a/libsemanage/src/genhomedircon.c
+++ b/libsemanage/src/genhomedircon.c
@@ -246,7 +246,7 @@ static int fcontext_matches(const semanage_fcontext_t *fcontext, void *varg)
 
 	/* Only match ALL or DIR */
 	type = semanage_fcontext_get_type(fcontext);
-	if (type != SEMANAGE_FCONTEXT_ALL && type != SEMANAGE_FCONTEXT_ALL)
+	if (type != SEMANAGE_FCONTEXT_ALL)
 		return 0;
 
 	len = strlen(oexpr);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] libsemanage: increment the right index variable in for loop
  2017-01-04 21:46 [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition Nicolas Iooss
@ 2017-01-04 21:46 ` Nicolas Iooss
  2017-01-06 19:31   ` James Carter
  2017-01-06 19:31 ` [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition James Carter
  2017-01-09 16:34 ` Stephen Smalley
  2 siblings, 1 reply; 5+ messages in thread
From: Nicolas Iooss @ 2017-01-04 21:46 UTC (permalink / raw)
  To: selinux

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
---
 libsemanage/src/semanage_store.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
index 58a58ef9452e..f468faba4b64 100644
--- a/libsemanage/src/semanage_store.c
+++ b/libsemanage/src/semanage_store.c
@@ -1158,7 +1158,7 @@ cleanup:
 	free(all_modinfos);
 
 	if (status != 0) {
-		for (i = 0; i < j; j++) {
+		for (i = 0; i < j; i++) {
 			semanage_module_info_destroy(sh, &(*modinfo)[i]);
 		}
 		free(*modinfo);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition
  2017-01-04 21:46 [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition Nicolas Iooss
  2017-01-04 21:46 ` [PATCH 2/2] libsemanage: increment the right index variable in for loop Nicolas Iooss
@ 2017-01-06 19:31 ` James Carter
  2017-01-09 16:34 ` Stephen Smalley
  2 siblings, 0 replies; 5+ messages in thread
From: James Carter @ 2017-01-06 19:31 UTC (permalink / raw)
  To: Nicolas Iooss, selinux

On 01/04/2017 04:46 PM, Nicolas Iooss wrote:
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Applied.

Thanks,

> ---
>  libsemanage/src/genhomedircon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libsemanage/src/genhomedircon.c b/libsemanage/src/genhomedircon.c
> index 7ceeafb7b5d9..fd6d391984b6 100644
> --- a/libsemanage/src/genhomedircon.c
> +++ b/libsemanage/src/genhomedircon.c
> @@ -246,7 +246,7 @@ static int fcontext_matches(const semanage_fcontext_t *fcontext, void *varg)
>
>  	/* Only match ALL or DIR */
>  	type = semanage_fcontext_get_type(fcontext);
> -	if (type != SEMANAGE_FCONTEXT_ALL && type != SEMANAGE_FCONTEXT_ALL)
> +	if (type != SEMANAGE_FCONTEXT_ALL)
>  		return 0;
>
>  	len = strlen(oexpr);
>


-- 
James Carter <jwcart2@tycho.nsa.gov>
National Security Agency

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] libsemanage: increment the right index variable in for loop
  2017-01-04 21:46 ` [PATCH 2/2] libsemanage: increment the right index variable in for loop Nicolas Iooss
@ 2017-01-06 19:31   ` James Carter
  0 siblings, 0 replies; 5+ messages in thread
From: James Carter @ 2017-01-06 19:31 UTC (permalink / raw)
  To: Nicolas Iooss, selinux

On 01/04/2017 04:46 PM, Nicolas Iooss wrote:
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>

Applied.

Thanks,

> ---
>  libsemanage/src/semanage_store.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
> index 58a58ef9452e..f468faba4b64 100644
> --- a/libsemanage/src/semanage_store.c
> +++ b/libsemanage/src/semanage_store.c
> @@ -1158,7 +1158,7 @@ cleanup:
>  	free(all_modinfos);
>
>  	if (status != 0) {
> -		for (i = 0; i < j; j++) {
> +		for (i = 0; i < j; i++) {
>  			semanage_module_info_destroy(sh, &(*modinfo)[i]);
>  		}
>  		free(*modinfo);
>


-- 
James Carter <jwcart2@tycho.nsa.gov>
National Security Agency

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition
  2017-01-04 21:46 [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition Nicolas Iooss
  2017-01-04 21:46 ` [PATCH 2/2] libsemanage: increment the right index variable in for loop Nicolas Iooss
  2017-01-06 19:31 ` [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition James Carter
@ 2017-01-09 16:34 ` Stephen Smalley
  2 siblings, 0 replies; 5+ messages in thread
From: Stephen Smalley @ 2017-01-09 16:34 UTC (permalink / raw)
  To: Nicolas Iooss, selinux

On Wed, 2017-01-04 at 22:46 +0100, Nicolas Iooss wrote:
> Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
> ---
>  libsemanage/src/genhomedircon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libsemanage/src/genhomedircon.c
> b/libsemanage/src/genhomedircon.c
> index 7ceeafb7b5d9..fd6d391984b6 100644
> --- a/libsemanage/src/genhomedircon.c
> +++ b/libsemanage/src/genhomedircon.c
> @@ -246,7 +246,7 @@ static int fcontext_matches(const
> semanage_fcontext_t *fcontext, void *varg)
>  
>  	/* Only match ALL or DIR */
>  	type = semanage_fcontext_get_type(fcontext);
> -	if (type != SEMANAGE_FCONTEXT_ALL && type !=
> SEMANAGE_FCONTEXT_ALL)
> +	if (type != SEMANAGE_FCONTEXT_ALL)

The comment suggests the second test should be against
SEMANAGE_FCONTEXT_DIR, not removed altogether.

>  		return 0;
>  
>  	len = strlen(oexpr);

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-01-09 16:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-04 21:46 [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition Nicolas Iooss
2017-01-04 21:46 ` [PATCH 2/2] libsemanage: increment the right index variable in for loop Nicolas Iooss
2017-01-06 19:31   ` James Carter
2017-01-06 19:31 ` [PATCH 1/2] libsemanage: genhomedircon: remove duplicated test condition James Carter
2017-01-09 16:34 ` Stephen Smalley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.