diff options
author | marha <marha@users.sourceforge.net> | 2010-02-25 07:51:00 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-02-25 07:51:00 +0000 |
commit | dca37d126746d995167a31f58d3a395ae162f5d4 (patch) | |
tree | 6f5a0e00be9e5f70d6bc341d4abdb1f14c8f79a2 /xorg-server/Xext/xselinux_label.c | |
parent | 23fda7c555e6c749b1d9727be5e5571a0559b9b3 (diff) | |
parent | 24bc15a386e37908396c3f6088f6fc98ceaa0f46 (diff) | |
download | vcxsrv-dca37d126746d995167a31f58d3a395ae162f5d4.tar.gz vcxsrv-dca37d126746d995167a31f58d3a395ae162f5d4.tar.bz2 vcxsrv-dca37d126746d995167a31f58d3a395ae162f5d4.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/Xext/xselinux_label.c')
-rw-r--r-- | xorg-server/Xext/xselinux_label.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/xorg-server/Xext/xselinux_label.c b/xorg-server/Xext/xselinux_label.c index 239536cf3..9b5023a53 100644 --- a/xorg-server/Xext/xselinux_label.c +++ b/xorg-server/Xext/xselinux_label.c @@ -177,20 +177,17 @@ SELinuxSelectionToSID(Atom selection, SELinuxSubjectRec *subj, /* Check for an override context next */ if (subj->sel_use_sid) { - sidget(tsid = subj->sel_use_sid); + tsid = subj->sel_use_sid; goto out; } - sidget(tsid = obj->sid); + tsid = obj->sid; /* Polyinstantiate if necessary to obtain the final SID */ - if (obj->poly) { - sidput(tsid); - if (avc_compute_member(subj->sid, obj->sid, - SECCLASS_X_SELECTION, &tsid) < 0) { - ErrorF("SELinux: a compute_member call failed!\n"); - return BadValue; - } + if (obj->poly && avc_compute_member(subj->sid, obj->sid, + SECCLASS_X_SELECTION, &tsid) < 0) { + ErrorF("SELinux: a compute_member call failed!\n"); + return BadValue; } out: *sid_rtn = tsid; @@ -217,7 +214,7 @@ SELinuxPropertyToSID(Atom property, SELinuxSubjectRec *subj, /* Check for an override context next */ if (subj->prp_use_sid) { - sidget(tsid = subj->prp_use_sid); + tsid = subj->prp_use_sid; goto out; } @@ -234,10 +231,8 @@ SELinuxPropertyToSID(Atom property, SELinuxSubjectRec *subj, if (avc_compute_member(subj->sid, tsid2, SECCLASS_X_PROPERTY, &tsid) < 0) { ErrorF("SELinux: a compute_member call failed!\n"); - sidput(tsid2); return BadValue; } - sidput(tsid2); } out: *sid_rtn = tsid; @@ -273,10 +268,8 @@ SELinuxEventToSID(unsigned type, security_id_t sid_of_window, } freecon(ctx); /* Cache the SID value */ - if (!SELinuxArraySet(&arr_events, type, sid)) { - sidput(sid); + if (!SELinuxArraySet(&arr_events, type, sid)) return BadAlloc; - } } /* Perform a transition to obtain the final SID */ |