selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ondrej Mosnacek <omosnace@redhat.com>
To: William Roberts <bill.c.roberts@gmail.com>
Cc: SElinux list <selinux@vger.kernel.org>,
	William Roberts <william.c.roberts@intel.com>
Subject: Re: [PATCH] libsemange: add missing header sepol/policydb.h
Date: Fri, 28 Feb 2020 09:17:11 +0100	[thread overview]
Message-ID: <CAFqZXNv4g8fdreQgSqrEumjPVYhT5btjiMcSYezZm7LaEJRW_A@mail.gmail.com> (raw)
In-Reply-To: <20200227224706.29892-1-william.c.roberts@intel.com>

On Thu, Feb 27, 2020 at 11:47 PM <bill.c.roberts@gmail.com> wrote:
> From: William Roberts <william.c.roberts@intel.com>
>
> Fix below compilation issue:
> direct_api.c: In function ‘semanage_direct_commit’:
> direct_api.c:1466:13: error: implicit declaration of function ‘sepol_policydb_optimize’; did you mean ‘sepol_policydb_to_image’? [-Werror=implicit-function-declaration]
>     retval = sepol_policydb_optimize(out);

It is probably a good idea to include it explicitly, but it is already
included indirectly via <sepol/module.h>, so I'm not sure how you got
the above error. Maybe your build flags weren't set properly and the
compiler was including older system headers instead of the local ones?

(BTW, there is a typo in the subject line - 'libsemange' is missing an 'a'.)

>
> Signed-off-by: William Roberts <william.c.roberts@intel.com>
> ---
>  libsemanage/src/direct_api.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libsemanage/src/direct_api.c b/libsemanage/src/direct_api.c
> index 1088a0ac6165..92f0a17b0156 100644
> --- a/libsemanage/src/direct_api.c
> +++ b/libsemanage/src/direct_api.c
> @@ -23,6 +23,7 @@
>  #include <sepol/handle.h>
>  #include <sepol/cil/cil.h>
>  #include <selinux/selinux.h>
> +#include <sepol/policydb.h>
>
>  #include <assert.h>
>  #include <fcntl.h>
> --
> 2.17.1
>

-- 
Ondrej Mosnacek <omosnace at redhat dot com>
Software Engineer, Security Technologies
Red Hat, Inc.


  reply	other threads:[~2020-02-28  8:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 22:47 [PATCH] libsemange: add missing header sepol/policydb.h bill.c.roberts
2020-02-28  8:17 ` Ondrej Mosnacek [this message]
2020-02-28 12:43   ` William Roberts
2020-02-28 13:32     ` [PATCH] libsemanage: check libsepol version bill.c.roberts
2020-03-01 19:24       ` Nicolas Iooss
2020-03-01 19:53         ` William Roberts
2020-03-01 20:21           ` Nicolas Iooss
2020-03-01 20:33             ` William Roberts
     [not found]               ` <CAJfZ7=kocVtoWs2fo8JkH+7FicnORGGVQEH51tG95u2nGoaPTw@mail.gmail.com>
     [not found]                 ` <CAFftDdpkV9furWPR1VzuSV6ew93+Rij3bF7gw2Lup9aa8VMrSw@mail.gmail.com>
2020-03-01 21:43                   ` Nicolas Iooss
2020-03-01 22:19                     ` William Roberts
2020-03-02 15:24                     ` Stephen Smalley
2020-03-02 15:32                       ` William Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFqZXNv4g8fdreQgSqrEumjPVYhT5btjiMcSYezZm7LaEJRW_A@mail.gmail.com \
    --to=omosnace@redhat.com \
    --cc=bill.c.roberts@gmail.com \
    --cc=selinux@vger.kernel.org \
    --cc=william.c.roberts@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).