summaryrefslogtreecommitdiff
path: root/src/shared/dev-setup.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-21path-util: get rid of prefix_root()Lennart Poettering1-2/+2
prefix_root() is equivalent to path_join() in almost all ways, hence let's remove it. There are subtle differences though: prefix_root() will try shorten multiple "/" before and after the prefix. path_join() doesn't do that. This means prefix_root() might return a string shorter than both its inputs combined, while path_join() never does that. I like the path_join() semantics better, hence I think dropping prefix_root() is totally OK. In the end the strings generated by both functon should always be identical in terms of path_equal() if not streq(). This leaves prefix_roota() in place. Ideally we'd have path_joina(), but I don't think we can reasonably implement that as a macro. or maybe we can? (if so, sounds like something for a later PR) Also add in a few missing OOM checks
2019-03-14util: split out nulstr related stuff to nulstr-util.[ch]Lennart Poettering1-1/+1
2018-11-29dev-setup: generalize logic we use to create "inaccessible" device nodesLennart Poettering1-0/+59
Let's generalize this, so that we can use this in nspawn later on, which is pretty useful as we need to be able to mask files from the inner child of nspawn too, where the host's /run/systemd/inaccessible directory is not visible anymore. Moreover, if nspawn can create these nodes on its own before the payload this means the payload can run with fewer privileges.
2018-06-14tree-wide: remove Lennart's copyright linesLennart Poettering1-3/+0
These lines are generally out-of-date, incomplete and unnecessary. With SPDX and git repository much more accurate and fine grained information about licensing and authorship is available, hence let's drop the per-file copyright notice. Of course, removing copyright lines of others is problematic, hence this commit only removes my own lines and leaves all others untouched. It might be nicer if sooner or later those could go away too, making git the only and accurate source of authorship information.
2018-06-14tree-wide: drop 'This file is part of systemd' blurbLennart Poettering1-2/+0
This part of the copyright blurb stems from the GPL use recommendations: https://www.gnu.org/licenses/gpl-howto.en.html The concept appears to originate in times where version control was per file, instead of per tree, and was a way to glue the files together. Ultimately, we nowadays don't live in that world anymore, and this information is entirely useless anyway, as people are very welcome to copy these files into any projects they like, and they shouldn't have to change bits that are part of our copyright header for that. hence, let's just get rid of this old cruft, and shorten our codebase a bit.
2018-04-06tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek1-13/+0
Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
2017-11-19Add SPDX license identifiers to source files under the LGPLZbigniew Jędrzejewski-Szmek1-0/+1
This follows what the kernel is doing, c.f. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5fd54ace4721fc5ce2bb5aef6318fcf17f421460.
2016-02-10tree-wide: remove Emacs lines from all filesDaniel Mack1-2/+0
This should be handled fine now by .dir-locals.el, so need to carry that stuff in every file.
2015-12-06shared: include what we useThomas Hindoe Paaboel Andersen1-0/+1
The next step of a general cleanup of our includes. This one mostly adds missing includes but there are a few removals as well.
2015-10-27util-lib: split out allocation calls into alloc-util.[ch]Lennart Poettering1-0/+1
2015-10-27user-util: move UID/GID related macros from macro.h to user-util.hLennart Poettering1-2/+3
2015-05-21nspawn: finish user namespace supportLennart Poettering1-9/+20
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen1-5/+0
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2014-10-23label: unify code to make directories, symlinksLennart Poettering1-20/+2
2014-10-23selinux: clean up selinux label function namingLennart Poettering1-2/+2
2014-10-23mac: rename apis with mac_{selinux/smack}_ prefixWaLyong Cho1-2/+2
2014-03-19core: Beef up PrivateDevices=Lennart Poettering1-1/+1
Also mount /dev/kdbus, /dev/mqueue and /dev/hugepages into the /dev for namespaced services.
2014-01-20exec: introduce PrivateDevices= switch to provide services with a private /devLennart Poettering1-8/+8
Similar to PrivateNetwork=, PrivateTmp= introduce PrivateDevices= that sets up a private /dev with only the API pseudo-devices like /dev/null, /dev/zero, /dev/random, but not any physical devices in them.
2013-06-10dev-setup: do not create a dangling /proc/kcore symlinkZbigniew Jędrzejewski-Szmek1-1/+7
https://bugs.freedesktop.org/show_bug.cgi?id=65382 https://bugs.gentoo.org/472060?id=472060
2012-08-21dev-setup: make NULL as parameter for dev_setup() equivalent to ""Lennart Poettering1-8/+11
2012-08-21dev-setup: allow a path prefix for use in chrootsDave Reisner1-3/+13
With this adjustment, we can reuse this code elsewhere, such as in nspawn.
2012-04-17udev: unify /dev static symlink setupKay Sievers1-0/+65