mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	sway/ipc: Support multiple users.
This commit is contained in:
		
							parent
							
								
									ae93c6e6fe
								
							
						
					
					
						commit
						f94f8fde7e
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -81,7 +81,11 @@ struct sockaddr_un *ipc_user_sockaddr(void) {
 | 
				
			||||||
  assert(ipc_sockaddr != NULL);
 | 
					  assert(ipc_sockaddr != NULL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ipc_sockaddr->sun_family = AF_UNIX;
 | 
					  ipc_sockaddr->sun_family = AF_UNIX;
 | 
				
			||||||
  strcpy(ipc_sockaddr->sun_path, "/tmp/sway-ipc.sock");
 | 
					
 | 
				
			||||||
 | 
					  int path_size = sizeof(ipc_sockaddr->sun_path);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // Without logind:
 | 
				
			||||||
 | 
					  assert(snprintf(ipc_sockaddr->sun_path, path_size, "/tmp/sway-ipc.%i.sock", getuid()) < path_size);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return ipc_sockaddr;
 | 
					  return ipc_sockaddr;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue