-
Notifications
You must be signed in to change notification settings - Fork 214
expand namespace #1628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
expand namespace #1628
Conversation
|
testing with xfce4 now, as things are now namespace functions as advertised. demo software from #1627 denied when running in non-root namespace. Any criticism welcome. |
|
Thank you for your contribution! I converted this pull request to a draft because of:
This is not intended to discourage it, but rather to point out that some improvements and discussion are needed. |
|
Of course, no complaints here. I'd prefer things be more refined as well. In terms of what I'm still working on: |
|
Just FYI because the discussion more or less augments your idea: Ideas on XNamespace. · X11Libre · Discussion #440 |
|
@metux Is there some docs/spec for the namespace extension? I have no idea how it is supposed to be used, or what an X client should do to use it. |
not yet, but we IMHO have some piece of config documentation. note there's no X11 protocol extension yet (but planned for the future) - just static configuration. |
|
Pushing my own goalpost along, I took the ideas from that discussion and started work on them. |
I'll put some work into this as well. There's quite a bit of misinfo around how it works because of the limited existing documentation so better documentation is a good idea regardless. |
|
The (new namespace per client connection) is currently highly experimental. And I'm only really exploring it for my own amusement. I'd be fine dropping the idea entirely because of the technical limitations of practically implementing it server-side. Considering how client connections work out, there's no "grouping" (unless the env is set with the cookie) for child processes should the (new namespace per client connection) setting be set. The server can't currently, won't without rework, and arguable shouldn't ever be able to do that. Aside from that, there's still solving the entire "where do we dump unauthorized connections in the first place" problem. Anon namespace works and will keep them isolated but ideally the server just denies the unauthorized connections. |
Window managers probably should always run in root NS, since they usually need a huge amount of control.
This is one of the quite low level tools that probably belong into root NS. Same for various hotkey manager tools. |
Well, 100% would be somewhat self-contradicting, since some clients are supposed to have control over others or global aspects of the Xserver, e.g window managers, input or output configuration tools, hotkey managers, ....
Indeed. These things just haven't been fully finished yet.
Those tools naturally belong into root / privileged NS, because it's their duty to touch privileged things.
What exactly does OBS do with xcomposite ?
Yes, logging indeed needs improvements. For now it's pretty verbose in order to assist development as well as config/policy tuning. |
Deleting namespaces is still an open topic - how shall we deal with existing clients ? |
The latter is what I have currently since there's nothing else but a ref counter tracking connections. I toyed with the idea of actually tracking clients by their clientpriv before I ever tried deleting namespaces but hadn't committed to it yet since I didn't know what should be done with existing clients. I can a imagine lot of crashing if the permissions aren't similar while moving namespace to namespace to begin with, outside of only ever checking if the namespace is empty for deletion.
It (and other screen share software including browsers) use it for sharing 'only' a single window. I toyed around with rerouting access to the window owned by the call but it's a pointless endeavor. there's no reason to make it that complicated.
For practicality sake should I just lump it with SMH using allowScreen then? I only kept them seperate for more grainular control.
Naturally. I wouldn't expect it being any other way, and that's how I've been testing everything - by running 'privileged' clients like the WM in the root namespace, I moreso meant "user applications" |
squashed commit to clean up history Signed-off-by: squishypinkelephant <squishypinkelephant@gmail.com>
1cdee80 to
c023f9e
Compare
fixes the annoyance with programs (firefox and others) spamming new namespaces without breaking the new_ns function Signed-off-by: squishypinkelephant <squishypinkelephant@gmail.com>
Signed-off-by: squishypinkelephant <squishypinkelephant@gmail.com>
Signed-off-by: squishypinkelephant <squishypinkelephant@gmail.com>
Signed-off-by: squishypinkelephant <squishypinkelephant@gmail.com>
c05724a to
e57d506
Compare
Signed-off-by: squishypinkelephant <squishypinkelephant@gmail.com>
e57d506 to
bfbef4e
Compare

expand namespace capabilities to handle (all?) of the major extensions modify checks to enable functionality of a window manager running in the root namespace add in checks for superpower to function properly
try to make the allowMouseMotion permission consistent add globalkeyboard as a specific permission for keypress events sent to root namespace add randr and render permission settings
this should work for better isolation while also allowing everything to "just work" inside a WM
tested inside Xephyr using icewm. some programs ask for absurd things and will make minimizing resource access tricky
regardless, running a window manger in the root namespace, I can open firefix, gimp, krita, dolphin in independent namespaces. xkbcat and other still denied global keyboard by new keyword.
it's a little crude and thrown together but it satisfies what i think is a perfect start for further improvements.