libsemanage: genhomedircon: remove duplicated test condition
PATCH 1/2 libsemanage: genhomedircon: remove duplicated test condition
Signed-off-by Nicolas Iooss <[email protected]>
--- libsemanage/src/genhomedircon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libsemanage/src/genhomedircon.c +1 -1
@@ -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);
Signature · 1 line
2.11.0
PATCH 2/2 libsemanage: increment the right index variable in for loop
Signed-off-by Nicolas Iooss <[email protected]>
--- libsemanage/src/semanage_store.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libsemanage/src/semanage_store.c +1 -1
@@ -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);
Signature · 1 line
2.11.0
James Carter
AppliedRe: [PATCH 2/2] libsemanage: increment the right index variable in for loop
Quoted 1 line · Nicolas Iooss
Signed-off-by Nicolas Iooss <[email protected]>
Applied.
Thanks,
Quoted 18 lines
--- libsemanage/src/semanage_store.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libsemanage/src/semanage_store.c +1
-1@@ -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);
Signature · 2 lines
James Carter <[email protected]> National Security Agency
James Carter
AppliedQuoted 1 line · Nicolas Iooss
Signed-off-by Nicolas Iooss <[email protected]>
Applied.
Thanks,
Quoted 18 lines
--- libsemanage/src/genhomedircon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libsemanage/src/genhomedircon.c +1
-1@@ -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);
Signature · 2 lines
James Carter <[email protected]> National Security Agency
Quoted 17 lines · Nicolas Iooss
Signed-off-by Nicolas Iooss <[email protected]>---
libsemanage/src/genhomedircon.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)libsemanage/src/genhomedircon.c +0
-0@@ -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);libsemanage/src/genhomedircon.c +0
-1- if (type != SEMANAGE_FCONTEXT_ALL && type !=
SEMANAGE_FCONTEXT_ALL)
libsemanage/src/genhomedircon.c static int fcontext_matches(const semanage_fcontext_t *fcontext, void *varg) · line 249
Quoted 1 line
libsemanage/src/genhomedircon.c +1
-0+if (type !=SEMANAGE_FCONTEXT_ALL )
The comment suggests the second test should be against SEMANAGE_FCONTEXT_DIR, not removed altogether.
Quoted 3 lines
return 0;
len = strlen(oexpr);