Merge branch 'my-XACE-modular' into my-XACE-SELINUX
This commit is contained in:
commit
fb34c02861
|
@ -33,6 +33,10 @@ MODULE_SRCS = \
|
||||||
sync.c \
|
sync.c \
|
||||||
xcmisc.c
|
xcmisc.c
|
||||||
|
|
||||||
|
# Extra configuration files ship with some extensions
|
||||||
|
SERVERCONFIGdir = $(libdir)/xserver
|
||||||
|
SERVERCONFIG_DATA =
|
||||||
|
|
||||||
# Optional sources included if extension enabled by configure.ac rules
|
# Optional sources included if extension enabled by configure.ac rules
|
||||||
|
|
||||||
# MIT Shared Memory extension
|
# MIT Shared Memory extension
|
||||||
|
@ -77,8 +81,7 @@ XCSECURITY_SRCS = security.c securitysrv.h
|
||||||
if XCSECURITY
|
if XCSECURITY
|
||||||
BUILTIN_SRCS += $(XCSECURITY_SRCS)
|
BUILTIN_SRCS += $(XCSECURITY_SRCS)
|
||||||
|
|
||||||
SERVERCONFIGdir = $(libdir)/xserver
|
SERVERCONFIG_DATA += SecurityPolicy
|
||||||
SERVERCONFIG_DATA = SecurityPolicy
|
|
||||||
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
|
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -157,7 +160,7 @@ libXextmodule_la_SOURCES = $(MODULE_SRCS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
SecurityPolicy \
|
$(SERVERCONFIG_DATA) \
|
||||||
$(MITSHM_SRCS) \
|
$(MITSHM_SRCS) \
|
||||||
$(XV_SRCS) \
|
$(XV_SRCS) \
|
||||||
$(RES_SRCS) \
|
$(RES_SRCS) \
|
||||||
|
|
|
@ -1131,12 +1131,6 @@ CALLBACK(SecurityClientStateCallback)
|
||||||
XID authId = AuthorizationIDOfClient(client);
|
XID authId = AuthorizationIDOfClient(client);
|
||||||
SecurityAuthorizationPtr pAuth;
|
SecurityAuthorizationPtr pAuth;
|
||||||
|
|
||||||
/* allocate space for security state */
|
|
||||||
STATEPTR(client) = xalloc(sizeof(SecurityClientStateRec));
|
|
||||||
if (!STATEPTR(client))
|
|
||||||
FatalError("Client %d: couldn't allocate security state\n",
|
|
||||||
client->index);
|
|
||||||
|
|
||||||
TRUSTLEVEL(client) = XSecurityClientTrusted;
|
TRUSTLEVEL(client) = XSecurityClientTrusted;
|
||||||
AUTHID(client) = authId;
|
AUTHID(client) = authId;
|
||||||
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
|
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
|
||||||
|
|
|
@ -17,6 +17,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
********************************************************/
|
********************************************************/
|
||||||
|
|
||||||
|
#ifdef HAVE_DIX_CONFIG_H
|
||||||
|
#include <dix-config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "windowstr.h"
|
#include "windowstr.h"
|
||||||
#include "scrnintstr.h"
|
#include "scrnintstr.h"
|
||||||
|
|
|
@ -3612,8 +3612,13 @@ CloseDownRetainedResources()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern int clientPrivateLen;
|
||||||
|
extern unsigned *clientPrivateSizes;
|
||||||
|
extern unsigned totalClientSize;
|
||||||
|
|
||||||
void InitClient(ClientPtr client, int i, pointer ospriv)
|
void InitClient(ClientPtr client, int i, pointer ospriv)
|
||||||
{
|
{
|
||||||
|
bzero(client, totalClientSize);
|
||||||
client->index = i;
|
client->index = i;
|
||||||
client->sequence = 0;
|
client->sequence = 0;
|
||||||
client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
|
client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
|
||||||
|
@ -3664,10 +3669,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int clientPrivateLen;
|
|
||||||
extern unsigned *clientPrivateSizes;
|
|
||||||
extern unsigned totalClientSize;
|
|
||||||
|
|
||||||
int
|
int
|
||||||
InitClientPrivates(ClientPtr client)
|
InitClientPrivates(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
|
|
@ -80,7 +80,7 @@ extern int extensionPrivateLen;
|
||||||
extern unsigned *extensionPrivateSizes;
|
extern unsigned *extensionPrivateSizes;
|
||||||
extern unsigned totalExtensionSize;
|
extern unsigned totalExtensionSize;
|
||||||
|
|
||||||
static int
|
static void
|
||||||
InitExtensionPrivates(ExtensionEntry *ext)
|
InitExtensionPrivates(ExtensionEntry *ext)
|
||||||
{
|
{
|
||||||
register char *ptr;
|
register char *ptr;
|
||||||
|
@ -107,7 +107,6 @@ InitExtensionPrivates(ExtensionEntry *ext)
|
||||||
else
|
else
|
||||||
ppriv->ptr = (pointer)NULL;
|
ppriv->ptr = (pointer)NULL;
|
||||||
}
|
}
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_X_EXPORT ExtensionEntry *
|
_X_EXPORT ExtensionEntry *
|
||||||
|
@ -127,9 +126,10 @@ AddExtension(char *name, int NumEvents, int NumErrors,
|
||||||
return((ExtensionEntry *) NULL);
|
return((ExtensionEntry *) NULL);
|
||||||
|
|
||||||
ext = (ExtensionEntry *) xalloc(totalExtensionSize);
|
ext = (ExtensionEntry *) xalloc(totalExtensionSize);
|
||||||
if (!ext || !InitExtensionPrivates(ext))
|
if (!ext)
|
||||||
return((ExtensionEntry *) NULL);
|
return((ExtensionEntry *) NULL);
|
||||||
bzero(ext, totalExtensionSize);
|
bzero(ext, totalExtensionSize);
|
||||||
|
InitExtensionPrivates(ext);
|
||||||
ext->name = (char *)xalloc(strlen(name) + 1);
|
ext->name = (char *)xalloc(strlen(name) + 1);
|
||||||
ext->num_aliases = 0;
|
ext->num_aliases = 0;
|
||||||
ext->aliases = (char **)NULL;
|
ext->aliases = (char **)NULL;
|
||||||
|
|
Loading…
Reference in New Issue