selinux: Stop using security_context_t
This is apparently deprecated now and is and was always just char *.
This commit is contained in:
parent
6f63873da5
commit
f3a98334e6
|
@ -37,8 +37,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#define USE_SEL offsetof(SELinuxSubjectRec, sel_use_sid)
|
||||
|
||||
typedef struct {
|
||||
security_context_t octx;
|
||||
security_context_t dctx;
|
||||
char *octx;
|
||||
char *dctx;
|
||||
CARD32 octx_len;
|
||||
CARD32 dctx_len;
|
||||
CARD32 id;
|
||||
|
@ -48,10 +48,10 @@ typedef struct {
|
|||
* Extension Dispatch
|
||||
*/
|
||||
|
||||
static security_context_t
|
||||
static char *
|
||||
SELinuxCopyContext(char *ptr, unsigned len)
|
||||
{
|
||||
security_context_t copy = malloc(len + 1);
|
||||
char *copy = malloc(len + 1);
|
||||
|
||||
if (!copy)
|
||||
return NULL;
|
||||
|
@ -84,7 +84,7 @@ static int
|
|||
SELinuxSendContextReply(ClientPtr client, security_id_t sid)
|
||||
{
|
||||
SELinuxGetContextReply rep;
|
||||
security_context_t ctx = NULL;
|
||||
char *ctx = NULL;
|
||||
int len = 0;
|
||||
|
||||
if (sid) {
|
||||
|
@ -117,7 +117,7 @@ ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset)
|
|||
{
|
||||
PrivateRec **privPtr = &client->devPrivates;
|
||||
security_id_t *pSid;
|
||||
security_context_t ctx = NULL;
|
||||
char *ctx = NULL;
|
||||
char *ptr;
|
||||
int rc;
|
||||
|
||||
|
@ -165,7 +165,7 @@ ProcSELinuxGetCreateContext(ClientPtr client, unsigned offset)
|
|||
static int
|
||||
ProcSELinuxSetDeviceContext(ClientPtr client)
|
||||
{
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
security_id_t sid;
|
||||
DeviceIntPtr dev;
|
||||
SELinuxSubjectRec *subj;
|
||||
|
|
|
@ -114,7 +114,7 @@ SELinuxLabelClient(ClientPtr client)
|
|||
int fd = XaceGetConnectionNumber(client);
|
||||
SELinuxSubjectRec *subj;
|
||||
SELinuxObjectRec *obj;
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
|
||||
subj = dixLookupPrivate(&client->devPrivates, subjectKey);
|
||||
obj = dixLookupPrivate(&client->devPrivates, objectKey);
|
||||
|
@ -169,7 +169,7 @@ SELinuxLabelInitial(void)
|
|||
XaceScreenAccessRec srec;
|
||||
SELinuxSubjectRec *subj;
|
||||
SELinuxObjectRec *obj;
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
void *unused;
|
||||
|
||||
/* Do the serverClient */
|
||||
|
@ -773,7 +773,7 @@ SELinuxResourceState(CallbackListPtr *pcbl, void *unused, void *calldata)
|
|||
subj = dixLookupPrivate(&wClient(pWin)->devPrivates, subjectKey);
|
||||
|
||||
if (subj->sid) {
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
int rc = avc_sid_to_context_raw(subj->sid, &ctx);
|
||||
|
||||
if (rc < 0)
|
||||
|
@ -791,7 +791,7 @@ SELinuxResourceState(CallbackListPtr *pcbl, void *unused, void *calldata)
|
|||
obj = dixLookupPrivate(&pWin->devPrivates, objectKey);
|
||||
|
||||
if (obj->sid) {
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
int rc = avc_sid_to_context_raw(obj->sid, &ctx);
|
||||
|
||||
if (rc < 0)
|
||||
|
@ -847,7 +847,7 @@ void
|
|||
SELinuxFlaskInit(void)
|
||||
{
|
||||
struct selinux_opt avc_option = { AVC_OPT_SETENFORCE, (char *) 0 };
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
int ret = TRUE;
|
||||
|
||||
switch (selinuxEnforcingState) {
|
||||
|
|
|
@ -97,7 +97,7 @@ static int
|
|||
SELinuxAtomToSIDLookup(Atom atom, SELinuxObjectRec * obj, int map, int polymap)
|
||||
{
|
||||
const char *name = NameForAtom(atom);
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
int rc = Success;
|
||||
|
||||
obj->poly = 1;
|
||||
|
@ -255,7 +255,7 @@ SELinuxEventToSID(unsigned type, security_id_t sid_of_window,
|
|||
{
|
||||
const char *name = LookupEventName(type);
|
||||
security_id_t sid;
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
|
||||
type &= 127;
|
||||
|
||||
|
@ -291,7 +291,7 @@ SELinuxEventToSID(unsigned type, security_id_t sid_of_window,
|
|||
int
|
||||
SELinuxExtensionToSID(const char *name, security_id_t * sid_rtn)
|
||||
{
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
|
||||
/* Look in the mappings of extension names to contexts */
|
||||
if (selabel_lookup_raw(label_hnd, &ctx, name, SELABEL_X_EXT) < 0) {
|
||||
|
@ -347,10 +347,10 @@ SELinuxTypeToClass(RESTYPE type)
|
|||
return (security_class_t) (unsigned long) tmp;
|
||||
}
|
||||
|
||||
security_context_t
|
||||
char *
|
||||
SELinuxDefaultClientLabel(void)
|
||||
{
|
||||
security_context_t ctx;
|
||||
char *ctx;
|
||||
|
||||
if (selabel_lookup_raw(label_hnd, &ctx, "remote", SELABEL_X_CLIENT) < 0)
|
||||
FatalError("SELinux: failed to look up remote-client context\n");
|
||||
|
|
|
@ -99,7 +99,7 @@ int
|
|||
|
||||
security_class_t SELinuxTypeToClass(RESTYPE type);
|
||||
|
||||
security_context_t SELinuxDefaultClientLabel(void);
|
||||
char *SELinuxDefaultClientLabel(void);
|
||||
|
||||
void
|
||||
SELinuxLabelInit(void);
|
||||
|
|
Loading…
Reference in New Issue