diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2014-02-19 09:16:17 -0500 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2014-02-19 16:11:48 -0500 |
commit | 9eb9c9327563014ad6a807814e7975424642d5b9 (patch) | |
tree | 050b6180a59af9ee7622c80171d734f319c178f0 /libselinux/man/man3/getfilecon.3 | |
parent | 1cb368636bdaf465cd63178a0692db38865e943b (diff) | |
download | android_external_selinux-9eb9c9327563014ad6a807814e7975424642d5b9.tar.gz android_external_selinux-9eb9c9327563014ad6a807814e7975424642d5b9.tar.bz2 android_external_selinux-9eb9c9327563014ad6a807814e7975424642d5b9.zip |
Get rid of security_context_t and fix const declarations.
In attempting to enable building various part of Android with -Wall -Werror,
we found that the const security_context_t declarations in libselinux
are incorrect; const char * was intended, but const security_context_t
translates to char * const and triggers warnings on passing
const char * from the caller. Easiest fix is to replace them all with
const char *. And while we are at it, just get rid of all usage of
security_context_t itself as it adds no value - there is no true
encapsulation of the security context strings and callers already
directly use string functions on them. typedef left to permit
building legacy users until such a time as all are updated.
This is a port of Change-Id I2f9df7bb9f575f76024c3e5f5b660345da2931a7
from Android, augmented to deal with all of the other code in upstream
libselinux and updating the man pages too.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'libselinux/man/man3/getfilecon.3')
-rw-r--r-- | libselinux/man/man3/getfilecon.3 | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libselinux/man/man3/getfilecon.3 b/libselinux/man/man3/getfilecon.3 index ea79b31f..5bb575b5 100644 --- a/libselinux/man/man3/getfilecon.3 +++ b/libselinux/man/man3/getfilecon.3 @@ -5,17 +5,17 @@ getfilecon, fgetfilecon, lgetfilecon \- get SELinux security context of a file .SH "SYNOPSIS" .B #include <selinux/selinux.h> .sp -.BI "int getfilecon(const char *" path ", security_context_t *" con ); +.BI "int getfilecon(const char *" path ", char **" con ); .sp -.BI "int getfilecon_raw(const char *" path ", security_context_t *" con ); +.BI "int getfilecon_raw(const char *" path ", char **" con ); .sp -.BI "int lgetfilecon(const char *" path ", security_context_t *" con ); +.BI "int lgetfilecon(const char *" path ", char **" con ); .sp -.BI "int lgetfilecon_raw(const char *" path ", security_context_t *" con ); +.BI "int lgetfilecon_raw(const char *" path ", char **" con ); .sp -.BI "int fgetfilecon(int "fd ", security_context_t *" con ); +.BI "int fgetfilecon(int "fd ", char **" con ); .sp -.BI "int fgetfilecon_raw(int "fd ", security_context_t *" con ); +.BI "int fgetfilecon_raw(int "fd ", char **" con ); . .SH "DESCRIPTION" .BR getfilecon () |