(!1920) Xres: XResQueryClients: enable security filtering
Pass each client we're considering to report through XaceHookClientAccess(), so security extensions have a chance to filter them out. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									a003e6e273
								
							
						
					
					
						commit
						7d7c6ff5c9
					
				| 
						 | 
					@ -13,6 +13,7 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "dix/registry_priv.h"
 | 
					#include "dix/registry_priv.h"
 | 
				
			||||||
#include "os/client_priv.h"
 | 
					#include "os/client_priv.h"
 | 
				
			||||||
 | 
					#include "Xext/xace.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "misc.h"
 | 
					#include "misc.h"
 | 
				
			||||||
#include "os.h"
 | 
					#include "os.h"
 | 
				
			||||||
| 
						 | 
					@ -229,10 +230,12 @@ ProcXResQueryClients(ClientPtr client)
 | 
				
			||||||
    num_clients = 0;
 | 
					    num_clients = 0;
 | 
				
			||||||
    for (i = 0; i < currentMaxClients; i++) {
 | 
					    for (i = 0; i < currentMaxClients; i++) {
 | 
				
			||||||
        if (clients[i]) {
 | 
					        if (clients[i]) {
 | 
				
			||||||
 | 
					            if (XaceHookClientAccess(client, clients[i], DixReadAccess) == Success) {
 | 
				
			||||||
                current_clients[num_clients] = i;
 | 
					                current_clients[num_clients] = i;
 | 
				
			||||||
                num_clients++;
 | 
					                num_clients++;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    rep = (xXResQueryClientsReply) {
 | 
					    rep = (xXResQueryClientsReply) {
 | 
				
			||||||
        .type = X_Reply,
 | 
					        .type = X_Reply,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue