mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-22 14:02:17 +00:00
libselinux: declare parameter of security_load_policy(3) const
security_load_policy(3) takes a read-only memory address for a binary policy to be loaded. Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
a6c572b1af
commit
c760a2bff6
@ -279,7 +279,7 @@ extern int security_validatetrans_raw(const char *scon,
|
||||
const char *newcon);
|
||||
|
||||
/* Load a policy configuration. */
|
||||
extern int security_load_policy(void *data, size_t len);
|
||||
extern int security_load_policy(const void *data, size_t len);
|
||||
|
||||
/* Get the context of an initial kernel security identifier by name.
|
||||
Caller must free via freecon */
|
||||
|
@ -5,7 +5,7 @@ security_load_policy \- load a new SELinux policy
|
||||
.SH "SYNOPSIS"
|
||||
.B #include <selinux/selinux.h>
|
||||
.sp
|
||||
.BI "int security_load_policy(void *" data ", size_t "len );
|
||||
.BI "int security_load_policy(const void *" data ", size_t "len );
|
||||
.sp
|
||||
.BI "int selinux_mkload_policy(int " preservebools ");"
|
||||
.sp
|
||||
|
@ -23,7 +23,7 @@
|
||||
#define MNT_DETACH 2
|
||||
#endif
|
||||
|
||||
int security_load_policy(void *data, size_t len)
|
||||
int security_load_policy(const void *data, size_t len)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
int fd, ret;
|
||||
|
Loading…
Reference in New Issue
Block a user