xace: add creation hook for new input devices.
Unfortunately, more information is needed to properly label the device. This will come from the configuration file, the hotplug messages, etc. It will either have to be passed into this function, or this hook moved down into the callers.
This commit is contained in:
		
							parent
							
								
									b77d272d75
								
							
						
					
					
						commit
						59cebcd2e9
					
				| 
						 | 
				
			
			@ -119,7 +119,6 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart)
 | 
			
		|||
    dev->name = (char *)NULL;
 | 
			
		||||
    dev->type = 0;
 | 
			
		||||
    dev->id = devid;
 | 
			
		||||
    inputInfo.numDevices++;
 | 
			
		||||
    dev->public.on = FALSE;
 | 
			
		||||
    dev->public.processInputProc = (ProcessInputProc)NoopDDA;
 | 
			
		||||
    dev->public.realInputProc = (ProcessInputProc)NoopDDA;
 | 
			
		||||
| 
						 | 
				
			
			@ -156,6 +155,15 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart)
 | 
			
		|||
    dev->inited = FALSE;
 | 
			
		||||
    dev->enabled = FALSE;
 | 
			
		||||
 | 
			
		||||
    /*  security creation/labeling check
 | 
			
		||||
     */
 | 
			
		||||
    if (XaceHook(XACE_DEVICE_ACCESS, serverClient, dev, DixCreateAccess)) {
 | 
			
		||||
	xfree(dev);
 | 
			
		||||
	return NULL;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    inputInfo.numDevices++;
 | 
			
		||||
 | 
			
		||||
    for (prev = &inputInfo.off_devices; *prev; prev = &(*prev)->next)
 | 
			
		||||
        ;
 | 
			
		||||
    *prev = dev;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue