예제 #1
0
파일: appgroup.c 프로젝트: mcr/xorg-xvnc4
static void XagCallClientStateChange(
    CallbackListPtr *pcbl,
    pointer nulldata,
    pointer calldata)
{
    XaceAuthAvailRec* rec = (XaceAuthAvailRec*) calldata;
    ClientPtr pClient = rec->client;

    if (!pClient->appgroup) {
	SecurityAuthorizationPtr pAuth;
	XID authId = rec->authId;

	/* can't use SecurityLookupIDByType here -- client
	 * security state hasn't been setup yet.
	 */
	pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
				SecurityAuthorizationResType);
	if (!pAuth)
	    return;

	pClient->appgroup = (AppGroupPtr)LookupIDByType(pAuth->group,
							RT_APPGROUP);
    }

    if (pClient->appgroup) {
	NewClientInfoRec clientinfo;

	clientinfo.client = pClient;
	XagClientStateChange (NULL, NULL, (pointer)&clientinfo);
    }
}
예제 #2
0
void XagCallClientStateChange(
    ClientPtr client)
{
    if (appGrpList) {
	NewClientInfoRec clientinfo;

	clientinfo.client = client;
	XagClientStateChange (NULL, NULL, (pointer)&clientinfo);
    }
}