mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 04:32:44 +00:00 
			
		
		
		
	Base: Launch Clipboard at session start-up
The clipboard service hasn't been ported to user-based portals with others services as it is needed at `GUI::Application` creation and thus before the first login, as the `LoginServer` needs one. This problem as been solved thanks to session-based portals, a clipboard portal is now created at boot for the "login" session and another for each "user" session. With a user-based portal, the "login" portal would have needed to be created for the `root` user, exposing us to security issues. It now, can be owned by the `window` user.
This commit is contained in:
		
							parent
							
								
									1be337353b
								
							
						
					
					
						commit
						3197c1793a
					
				
					 3 changed files with 8 additions and 3 deletions
				
			
		|  | @ -20,10 +20,10 @@ User=window | ||||||
| StdIO=/dev/tty0 | StdIO=/dev/tty0 | ||||||
| 
 | 
 | ||||||
| [Clipboard] | [Clipboard] | ||||||
| Socket=/tmp/portal/clipboard | Socket=/tmp/session/%sid/portal/clipboard | ||||||
| SocketPermissions=600 | SocketPermissions=600 | ||||||
| Priority=low | Priority=low | ||||||
| User=anon | User=window | ||||||
| 
 | 
 | ||||||
| [Shell@tty0] | [Shell@tty0] | ||||||
| Executable=/bin/Shell | Executable=/bin/Shell | ||||||
|  |  | ||||||
|  | @ -1,3 +1,8 @@ | ||||||
|  | [Clipboard] | ||||||
|  | Socket=/tmp/session/%sid/portal/clipboard | ||||||
|  | SocketPermissions=600 | ||||||
|  | Priority=low | ||||||
|  | 
 | ||||||
| [ConfigServer] | [ConfigServer] | ||||||
| Socket=/tmp/session/%sid/portal/config | Socket=/tmp/session/%sid/portal/config | ||||||
| SocketPermissions=600 | SocketPermissions=600 | ||||||
|  |  | ||||||
|  | @ -16,7 +16,7 @@ namespace GUI { | ||||||
| class ConnectionToClipboardServer final | class ConnectionToClipboardServer final | ||||||
|     : public IPC::ConnectionToServer<ClipboardClientEndpoint, ClipboardServerEndpoint> |     : public IPC::ConnectionToServer<ClipboardClientEndpoint, ClipboardServerEndpoint> | ||||||
|     , public ClipboardClientEndpoint { |     , public ClipboardClientEndpoint { | ||||||
|     IPC_CLIENT_CONNECTION(ConnectionToClipboardServer, "/tmp/portal/clipboard"sv) |     IPC_CLIENT_CONNECTION(ConnectionToClipboardServer, "/tmp/session/%sid/portal/clipboard"sv) | ||||||
| 
 | 
 | ||||||
| private: | private: | ||||||
|     ConnectionToClipboardServer(NonnullOwnPtr<Core::Stream::LocalSocket> socket) |     ConnectionToClipboardServer(NonnullOwnPtr<Core::Stream::LocalSocket> socket) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Lucas CHOLLET
						Lucas CHOLLET