Repository navigation
Add Namespaces setting - #798
Conversation
86f5ec4 to
a1b6a22
Compare
|
I have rebased this on the current |
| } | ||
| } | ||
|
|
||
| // enter Linux namespaces |
There was a problem hiding this comment.
this block of code is linux specific, should be wrapped in a #ifdef Q_OS_LINUX
There was a problem hiding this comment.
Does SDDM support or plans to support other OSs?
There was a problem hiding this comment.
FreeBSD users might be interested in using SDDM but personally I'm not working on that goal.
| qCritical("open(%s) failed: %s", qPrintable(ns), strerror(errno)); | ||
| exit(Auth::HELPER_OTHER_ERROR); | ||
| } | ||
| if (setns(fd, 0) != 0) { |
There was a problem hiding this comment.
not an expert of namespaces but shouldn't the second argument be CLONE_NEWNET?
There was a problem hiding this comment.
Indeed, I documented that Namespaces= joins network namespaces, but wrote the code that allows to join any kind of namespace. I do not see any benefits from this limitation, so I'd rather update the documentation.
| with setns() before starting the user session. For example, to enter | ||
| network namespace `mynet` created with `ip netns add mynet`, the value | ||
| might be `/run/netns/mynet`. | ||
| Default value is empty. |
There was a problem hiding this comment.
Add something along the line of "This setting is relevant only on Linux, it is completely ignored on other operating systems".
I know it is redundant but it's clearer
This option holds a comma-separated list of paths bound to Linux namespaces to enter with setns() before starting the user session. The main intention is to let user sessions start in a protected network namespace, while the display server remains in the initial network namespace to talk to udev, and udev remains in the initial network namespace to talk to systemd. [ChangeLog][General] Add "Namespaces" setting under "General" to enter specified Linux namespaces before starting the user session
|
Updated. (Tested by rebuilding and restarting.) |
|
Thank you! |
This option holds a comma-separated list of paths bound to Linux network
namespaces to enter with setns() before starting the user session.
The main intention is to let user sessions start in a protected network
namespace, while the display server remains in the initial network namespace to
talk to udev, and udev remains in the initial network namespace to talk to
systemd.
[ChangeLog][General] Add "Namespaces" setting under "General" to enter specified
Linux namespaces before starting the user session
In my case, user sessions run in a network namespace with only OpenVPN-created network interfaces for consistent quality of the internet, sidestepping arbitrary deficiencies of various internet provides I happen to use and ensuring that user applications will not connect to the internet directly while OpenVPN connection is down (e.g. it is reconnecting).
To check this functionality, either run
sudo ip netns add mynetand configure sddm withor use
Namespaces=/proc/1/ns/netas a no-op.