Commit Graph

11 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult ab9b93168e Xnamespace: filter device access
Filter device access, whitelist several commonly used operations that
should be safe (eg. query keyboard layout).

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult b48aca8539 Xnamespace: filter transparency
Silently drop transparency flag if namespace isn't allowed to use it.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult 856b0e0292 Xnamespace: filter extension access
Whitelist several extension calls that are safe. Also allow namespaces
to be configured for unrestricted access.

TBD: doesn't actually reject yet

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult 20ccb6ec9d Xnamespace: filter raw mouse motion and keyboard access
Only namespaces with allowMouseOption flag enabled can receive
raw mouse motion events. Raw key press events are always blocked.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult c281a8a44f Xnamespace: isolate root window property access
Redirecting access to root window properties to the per-namespace
virtual root windows. This isolates a lot of communication via root
window, e.g. the cut buffers.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult 6646a7b4f3 Xnamespace: create per-namespace fake root windows
For each namespace creating a fake (invisible) root window, which can be
used for storing per-namespace properties (eg. cut buffers), etc.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult 13f0e53659 Xnamespace: add selection isolation
Selection names (as seen by the client) are internally prefixed with the
namespace ID, so each client can only access those within it's namespace.

If a client within namespace "foo" want's to operate on "PRIMARY",
it actually will be doing so on "<foo>PRIMARY", w/o ever noticing it.
Events will sent back to the client still pointing to "PRIMARY".

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult 0398858521 Xnamespace: assign incoming clients to namespaces
The association is done by matching client's and namespace's
authentication token.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult 33a66a7810 Xnamespace: add per-client private data
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult bc4c35d045 Xnamespace: add basic namespace config structures
Adding data structure and initial data for namespace configuration.

Built-in namespaces are ROOT and ANONYMOUS.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00
Enrico Weigelt, metux IT consult f6e190f3a9 Xnamespace: namespace extension skeleton
Add tiny skeleton for the namespace extension. Disabled by default,
can be enabled via +extension arg, but doesn't actually do something yet.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-06-30 20:39:05 +02:00