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