Re: [PATCH] libselinux: drop set but not used internal variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 10, 2022 at 9:17 AM James Carter <jwcart2@xxxxxxxxx> wrote:
>
> On Wed, Nov 9, 2022 at 3:24 PM Christian Göttsche
> <cgzones@xxxxxxxxxxxxxx> wrote:
> >
> > The internal variable avc_netlink_trouble is only assigned but never
> > read from.
> > Unused since the initial commit 13cd4c896068 ("initial import from svn
> > trunk revision 2950").
> >
> > Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
>
> Acked-by: James Carter <jwcart2@xxxxxxxxx>
>

Merged.
Thanks,
Jim

> > ---
> >  libselinux/src/avc_internal.c | 2 --
> >  libselinux/src/avc_internal.h | 3 ---
> >  libselinux/src/sestatus.c     | 1 -
> >  3 files changed, 6 deletions(-)
> >
> > diff --git a/libselinux/src/avc_internal.c b/libselinux/src/avc_internal.c
> > index 71a1357b..ffc663e5 100644
> > --- a/libselinux/src/avc_internal.c
> > +++ b/libselinux/src/avc_internal.c
> > @@ -51,7 +51,6 @@ char avc_prefix[AVC_PREFIX_SIZE] = "uavc";
> >  int avc_running = 0;
> >  int avc_enforcing = 1;
> >  int avc_setenforce = 0;
> > -int avc_netlink_trouble = 0;
> >
> >  /* process setenforce events for netlink and sestatus */
> >  int avc_process_setenforce(int enforcing)
> > @@ -295,7 +294,6 @@ void avc_netlink_loop(void)
> >
> >         close(fd);
> >         fd = -1;
> > -       avc_netlink_trouble = 1;
> >         avc_log(SELINUX_ERROR,
> >                 "%s:  netlink thread: errors encountered, terminating\n",
> >                 avc_prefix);
> > diff --git a/libselinux/src/avc_internal.h b/libselinux/src/avc_internal.h
> > index a9a4aa0b..54f0ce28 100644
> > --- a/libselinux/src/avc_internal.h
> > +++ b/libselinux/src/avc_internal.h
> > @@ -180,7 +180,4 @@ int avc_ss_set_auditdeny(security_id_t ssid, security_id_t tsid,
> >                          security_class_t tclass, access_vector_t perms,
> >                          uint32_t seqno, uint32_t enable) ;
> >
> > -/* netlink kernel message code */
> > -extern int avc_netlink_trouble ;
> > -
> >  #endif                         /* _SELINUX_AVC_INTERNAL_H_ */
> > diff --git a/libselinux/src/sestatus.c b/libselinux/src/sestatus.c
> > index 89c1f621..fbe64301 100644
> > --- a/libselinux/src/sestatus.c
> > +++ b/libselinux/src/sestatus.c
> > @@ -343,7 +343,6 @@ error:
> >                 if (avc_using_threads)
> >                 {
> >                         fallback_netlink_thread = avc_create_thread(&avc_netlink_loop);
> > -                       avc_netlink_trouble = 0;
> >                 }
> >
> >                 fallback_sequence = 0;
> > --
> > 2.38.1
> >




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux