xace: drop the name argument from the property callback.
This commit is contained in:
parent
c9fb8a3533
commit
e1cc68add0
|
@ -1708,7 +1708,7 @@ SecurityCheckPropertyAccess(CallbackListPtr *pcbl, pointer unused,
|
|||
XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata;
|
||||
ClientPtr client = rec->client;
|
||||
WindowPtr pWin = rec->pWin;
|
||||
ATOM propertyName = rec->propertyName;
|
||||
ATOM propertyName = rec->pProp->propertyName;
|
||||
Mask access_mode = rec->access_mode;
|
||||
PropertyAccessPtr pacl;
|
||||
char action = SecurityDefaultAction;
|
||||
|
|
|
@ -96,7 +96,6 @@ int XaceHook(int hook, ...)
|
|||
va_arg(ap, ClientPtr),
|
||||
va_arg(ap, WindowPtr),
|
||||
va_arg(ap, PropertyPtr),
|
||||
va_arg(ap, Atom),
|
||||
va_arg(ap, Mask),
|
||||
XaceAllowOperation /* default allow */
|
||||
};
|
||||
|
|
|
@ -20,7 +20,6 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#ifndef _XACESTR_H
|
||||
#define _XACESTR_H
|
||||
|
||||
#include <X11/Xdefs.h>
|
||||
#include "dixstruct.h"
|
||||
#include "resource.h"
|
||||
#include "extnsionst.h"
|
||||
|
@ -61,7 +60,6 @@ typedef struct {
|
|||
ClientPtr client;
|
||||
WindowPtr pWin;
|
||||
PropertyPtr pProp;
|
||||
Atom propertyName;
|
||||
Mask access_mode;
|
||||
int rval;
|
||||
} XacePropertyAccessRec;
|
||||
|
|
|
@ -1067,7 +1067,7 @@ XSELinuxProperty(CallbackListPtr *pcbl, pointer unused, pointer calldata)
|
|||
ClientPtr tclient;
|
||||
access_vector_t perm = 0;
|
||||
security_id_t propsid;
|
||||
char *propname = NameForAtom(rec->propertyName);
|
||||
char *propname = NameForAtom(rec->pProp->propertyName);
|
||||
|
||||
tclient = wClient(pWin);
|
||||
if (!client || !tclient || !HAVESTATE(tclient))
|
||||
|
|
|
@ -144,7 +144,7 @@ ProcRotateProperties(ClientPtr client)
|
|||
DEALLOCATE_LOCAL(props);
|
||||
return BadMatch;
|
||||
}
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, atoms[i],
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp,
|
||||
DixReadAccess|DixWriteAccess))
|
||||
{
|
||||
case XaceErrorOperation:
|
||||
|
@ -277,8 +277,8 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
|
|||
memmove((char *)data, (char *)value, totalSize);
|
||||
pProp->size = len;
|
||||
pProp->devPrivates = NULL;
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, property,
|
||||
DixWriteAccess))
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp,
|
||||
DixCreateAccess))
|
||||
{
|
||||
case XaceErrorOperation:
|
||||
xfree(data);
|
||||
|
@ -295,7 +295,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property,
|
|||
}
|
||||
else
|
||||
{
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp, property,
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, pClient, pWin, pProp,
|
||||
DixWriteAccess))
|
||||
{
|
||||
case XaceErrorOperation:
|
||||
|
@ -517,8 +517,7 @@ ProcGetProperty(ClientPtr client)
|
|||
|
||||
if (stuff->delete)
|
||||
access_mode |= DixDestroyAccess;
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp,
|
||||
stuff->property, access_mode))
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, pProp, access_mode))
|
||||
{
|
||||
case XaceErrorOperation:
|
||||
client->errorValue = stuff->property;
|
||||
|
@ -671,8 +670,7 @@ ProcDeleteProperty(register ClientPtr client)
|
|||
}
|
||||
|
||||
switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin,
|
||||
FindProperty(pWin, stuff->property), stuff->property,
|
||||
DixDestroyAccess))
|
||||
FindProperty(pWin, stuff->property), DixDestroyAccess))
|
||||
{
|
||||
case XaceErrorOperation:
|
||||
client->errorValue = stuff->property;
|
||||
|
|
Loading…
Reference in New Issue
Block a user