From: Sven Vermeulen <sven.vermeulen@siphos.be>
To: selinux@tycho.nsa.gov
Subject: SETools patch for libselinux-2.3
Date: Wed, 28 May 2014 19:04:11 +0200 [thread overview]
Message-ID: <20140528170411.GA13025@siphos.be> (raw)
In libselinux-2.3, the interface of the lsetfilecon_raw function has been
changed:
-extern int lsetfilecon_raw(const char *path, security_context_t con);
+extern int lsetfilecon_raw(const char *path, const char * con);
The call to lsetfilecon_raw in setools' secmds/replcon.cc needs to be
updated accordingly, as it otherwise fails during build:
replcon.cc: In function ‘int replcon_lsetfilecon(const char*, security_context_t)’:
replcon.cc:73:25: warning: NULL used in arithmetic [-Wpointer-arith]
replcon.cc:73:25: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘long int’ to binary ‘operator!=’
The below patch fixes this (but makes the setools version depend on
libselinux-2.3 now).
With thanks to Arfrever Frehtes Taifersar Arahesis for the patch (I worked
around it first by just calling lsetfilecon_raw directly). Something about
weakly linked functions...
Index: secmds/replcon.cc
===================================================================
--- secmds/replcon.cc (revision 4973)
+++ secmds/replcon.cc (working copy)
@@ -60,7 +60,7 @@
{NULL, 0, NULL, 0}
};
-extern int lsetfilecon_raw(const char *, security_context_t) __attribute__ ((weak));
+extern int lsetfilecon_raw(const char *, const char *) __attribute__ ((weak));
/**
* As that setools must work with older libselinux versions that may
next reply other threads:[~2014-05-28 17:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 17:04 Sven Vermeulen [this message]
2014-06-10 1:22 ` SETools patch for libselinux-2.3 Christopher J. PeBenito
2014-06-11 22:26 ` Nicolas Iooss
2014-06-12 12:27 ` Stephen Smalley
2014-06-12 15:42 ` Christopher J. PeBenito
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=20140528170411.GA13025@siphos.be \
--to=sven.vermeulen@siphos.be \
--cc=selinux@tycho.nsa.gov \
/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 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.