Fix set* functions parameter
PATCH 1/1 Fix set* functions parameter
In general, functions in the set* family (like setcon and setfilecon) receives a security_context_t as a parameter. This patch includes the correspondent typemap for it, allowing those functions to be sucessfully called.
Index: selinuxswig.i
===================================================================
RCS file: /cvsroot/selinux/nsa/selinux-usr/libselinux/src/selinuxswig.i,v retrieving revision 1.3
selinuxswig.i +4 -0
@@ -30,6 +30,10 @@ } %typemap(argout) security_context_t * { $result = t_output_helper($result, PyString_FromString(*$1)); +} + +%typemap(in) security_context_t { + $1 = (security_context_t)PyString_AsString($input); } extern int is_selinux_enabled(void);
Quoted 3 lines · Glauber de Oliveira Costa
In general, functions in the set* family (like setcon and setfilecon) receives a
security_context_tas a parameter. This patch includes the correspondent typemap for it, allowing those functions to be sucessfully called.
Thanks, merged as part of Dan's larger libselinux patch.
Signature · 8 lines
Stephen Smalley National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.