Merge branch 'my-XACE-modular' into my-XACE-SELINUX

This commit is contained in:
Eamon Walsh 2006-09-08 15:30:12 -04:00 committed by Eamon Walsh
commit fb34c02861
5 changed files with 18 additions and 16 deletions

View File

@ -33,6 +33,10 @@ MODULE_SRCS = \
sync.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
# MIT Shared Memory extension
@ -77,8 +81,7 @@ XCSECURITY_SRCS = security.c securitysrv.h
if XCSECURITY
BUILTIN_SRCS += $(XCSECURITY_SRCS)
SERVERCONFIGdir = $(libdir)/xserver
SERVERCONFIG_DATA = SecurityPolicy
SERVERCONFIG_DATA += SecurityPolicy
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
endif
@ -157,7 +160,7 @@ libXextmodule_la_SOURCES = $(MODULE_SRCS)
endif
EXTRA_DIST = \
SecurityPolicy \
$(SERVERCONFIG_DATA) \
$(MITSHM_SRCS) \
$(XV_SRCS) \
$(RES_SRCS) \

View File

@ -1131,12 +1131,6 @@ CALLBACK(SecurityClientStateCallback)
XID authId = AuthorizationIDOfClient(client);
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;
AUTHID(client) = authId;
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,

View File

@ -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 "windowstr.h"
#include "scrnintstr.h"

View File

@ -3612,8 +3612,13 @@ CloseDownRetainedResources()
}
}
extern int clientPrivateLen;
extern unsigned *clientPrivateSizes;
extern unsigned totalClientSize;
void InitClient(ClientPtr client, int i, pointer ospriv)
{
bzero(client, totalClientSize);
client->index = i;
client->sequence = 0;
client->clientAsMask = ((Mask)i) << CLIENTOFFSET;
@ -3664,10 +3669,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv)
#endif
}
extern int clientPrivateLen;
extern unsigned *clientPrivateSizes;
extern unsigned totalClientSize;
int
InitClientPrivates(ClientPtr client)
{

View File

@ -80,7 +80,7 @@ extern int extensionPrivateLen;
extern unsigned *extensionPrivateSizes;
extern unsigned totalExtensionSize;
static int
static void
InitExtensionPrivates(ExtensionEntry *ext)
{
register char *ptr;
@ -107,7 +107,6 @@ InitExtensionPrivates(ExtensionEntry *ext)
else
ppriv->ptr = (pointer)NULL;
}
return 1;
}
_X_EXPORT ExtensionEntry *
@ -127,9 +126,10 @@ AddExtension(char *name, int NumEvents, int NumErrors,
return((ExtensionEntry *) NULL);
ext = (ExtensionEntry *) xalloc(totalExtensionSize);
if (!ext || !InitExtensionPrivates(ext))
if (!ext)
return((ExtensionEntry *) NULL);
bzero(ext, totalExtensionSize);
InitExtensionPrivates(ext);
ext->name = (char *)xalloc(strlen(name) + 1);
ext->num_aliases = 0;
ext->aliases = (char **)NULL;