summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-05-07udevd: remove unused functionHEADmasterThomas Hindoe Paaboel Andersen1-4/+0
2015-05-06udevd: don't explicitly count the number of workersTom Gundersen1-13/+8
Simply query the size of the hashmap keeping all the worker contexts instead.
2015-05-06udevd: keep workers in a hashmap rather than a listTom Gundersen1-82/+74
This makes the code somewhat more readable.
2015-05-06udevd: worker - drop reference countingTom Gundersen1-30/+32
Make the worker context have the same life-span as the worker process. It is created on fork() and free'd on SIGCHLD. The change means that we can get worker_returned() for a worker context that is no longer around, this is not a problem and we can just drop the message. The only use for worker_returned() is to know to reschedule events to workers that are still around, so if the worker has already exited it is not important to keep track of. We still print a debug statement in this case to be on the safe side.
2015-05-06device: avoid null pointer dereferenceThomas Hindoe Paaboel Andersen1-1/+1
2015-05-06udev: fix weird coding-styleDavid Herrmann1-1/+1
Eeeew!
2015-05-06test-libudev: add error handlingThomas Hindoe Paaboel Andersen1-1/+4
CID#1296244
2015-05-06udevd: worker - allow passing NULL to worker_unref()Tom Gundersen1-2/+1
2015-05-06udevd: worker - use _exit() rather than exit()Tom Gundersen1-1/+1
Follow the coding style and avoid the exit handlers.
2015-05-06udevd: modernize error handlingTom Gundersen1-48/+36
We never return magic exit codes, but just EXIT_FAILUER or EXIT_SUCCESS.
2015-05-06udevd: use kernel cmdline parserTom Gundersen1-43/+36
2015-05-06udevd: worker - move some fields from the worker to the eventTom Gundersen1-11/+14
2015-05-06udevd: worker - introduce worker_attach_event()Tom Gundersen1-13/+13
2015-05-06udevd: worker - make refcounting clearerTom Gundersen1-16/+32
Take and drop explicit references where it makes sense.
2015-05-06udevd: worker - only allocate the worker struct in the main processTom Gundersen1-12/+13
This is not used in the worker, so avoid having to free it there.
2015-05-06udevd: rename worker_new() to worker_spawn()Tom Gundersen1-2/+2
2015-05-06udevd: don't track worker exitcodeTom Gundersen1-10/+2
We used to use this to track failed events so they could be retriggered, but that is no longer done, so the code can be dropped.
2015-05-06udev: fix coding styleSusant Sahani1-2/+1
2015-05-06systemctl: null-initialize pointer with cleanup attributeDaniel Buch1-1/+1
2015-05-06machinectl: remove unused variableThomas Hindoe Paaboel Andersen1-1/+1
2015-05-06bus: don't switch to kdbus if not requestedDavid Herrmann6-8/+37
Whenever systemd is re-executed, it tries to create a system bus via kdbus. If the system did not have kdbus loaded during bootup, but the module is loaded later on manually, this will cause two system buses running (kdbus and dbus-daemon in parallel). This patch makes sure we never try to create kdbus buses if it wasn't explicitly requested on the command-line.
2015-05-06timedated: remove unnecessary gotoZbigniew Jędrzejewski-Szmek1-3/+0
Not needed since 99f861310d3f05f4.
2015-05-06tmpfiles: try to handle read-only file systems gracefullyMichael Olbrich1-2/+11
On read-only filesystems trying to create the target will not fail with EEXIST but with EROFS. Handle EROFS by checking if the target already exists, and if empty when truncating. This avoids reporting errors if tmpfiles doesn't actually needs to do anything. [zj: revert condition to whitelist rather then blacklisting, and add goto to avoid stat'ting twice.]
2015-05-05shared/utmp-wtmp: fix copy/paste errorMichael Olbrich1-1/+1
2015-05-05Add audit type generated files to gitignoreZbigniew Jędrzejewski-Szmek1-1/+1
They are not currently used, but the Makefile rules don't know that. It's easier to ignore them, then to special-case creation rules.
2015-05-05lockfile-util.[ch]: Split out from util.[ch]Colin Walters6-136/+195
Continuing the general trend of splitting up util.[ch]. I specifically want to reuse this code in https://github.com/GNOME/libglnx and having it split up will make future copy-pasting easier.
2015-05-05Fix permissions on /run/systemd/nspawn/locksSeth Jennings1-2/+2
machined is getting an EACCES when trying to create the lock file for images because the mode on /run/systemd/nspawn/locks is 0600. mkdir("/run/systemd/nspawn/locks", 0600) = -1 EEXIST (File exists) stat("/run/systemd/nspawn/locks", {st_mode=S_IFDIR|0600, st_size=40, ...}) = 0 open("/run/systemd/nspawn/locks/inode-41:256", O_RDWR|O_CREAT|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC, 0600) = -1 EACCES (Permission denied) This commit adjusts the mode to 0700 to correct the issue.
2015-05-05treewide: fix typosTorstein Husebø1-1/+1
2015-05-05core: be more strict when manipulating slices names and unescaping paths ↵Lennart Poettering4-40/+178
from unit names Let's better be safe then sorry.
2015-05-05core: bus name units should not allow aliases or instancesLennart Poettering1-0/+3
2015-05-05core: rework unit name validation and manipulation logicLennart Poettering34-834/+1033
A variety of changes: - Make sure all our calls distuingish OOM from other errors if OOM is not the only error possible. - Be much stricter when parsing escaped paths, do not accept trailing or leading escaped slashes. - Change unit validation to take a bit mask for allowing plain names, instance names or template names or an combination thereof. - Refuse manipulating invalid unit name
2015-05-05util: be a bit safer in path_is_safe()Lennart Poettering1-1/+1
We should be more strict when verifying paths with path_is_safe() for potentially dangerous constructs, and that includes lengths of PATH_MAX-1 and larger. Be more accurate here.
2015-05-05cgroup-util: be more strict when processing slice unit namesLennart Poettering2-2/+8
2015-05-04generators: rename add_{root,usr}_mount to add_{sysroot,sysroot_usr}_mountZbigniew Jędrzejewski-Szmek3-21/+38
This makes it obvious that those functions are only usable in the initramfs. Also, add a warning when noauto, nofail, or automount is used for the root fs, instead of silently ignoring. Using those options would be a sign of significant misconfiguration, and if we bother to check for them, than let's go all the way and complain. Other various small cleanups and reformattings elsewhere.
2015-05-04network: Implement fallback DHCPv6 prefix handling for older kernelsPatrik Flykt4-3/+67
When setting IPv6 addresses acquired by DHCPv6, systemd-networkd sets the IFA_F_NOPREFIXROUTE flag in the IFA_FLAGS netlink attribute. As the flag and the attribute are present starting with Linux 3.14, older kernels will need systemd-network to manage prefix route expiry. By default, DHCPv6 addresses are first assigned setting the IFA_F_NOPREFIXROUTE flag in the IFA_FLAGS netlink attribute. Should the address assignment fail, the same assignment is tried without the IFA_FLAGS attribute. Should also the second attempt fail, an error is printed and address assignment ends with failure. As successful use of the IFA_FLAGS netlink attribute is recorded in the Link structure, the DHCPv6 code will know if the kernel or systemd-network fallback code handles expiring prefixes. The prefix expiration and IPv6 address updating fallback code is resurrected from the parts deleted with commit 47d45d3cde45d6545367570264e4e3636bc9e345. This patch can be removed once the minimum kernel requirements are greater than or equal to 3.14.
2015-05-02fstab-generator: fix memleakZbigniew Jędrzejewski-Szmek1-3/+3
filtered was used to store an allocated string twice. The first allocation was thus lost. The string is not needed for anything, so simply skip the allocation. Fixup for deb0a77cf0b409141c4.
2015-04-30terminal: update for simpler sd-bus api'sThomas Hindoe Paaboel Andersen5-25/+13
2015-04-30core: simplify %r and %R logic a bitLennart Poettering1-15/+24
Do not calculate the cgroup path manually, just use normal unit fields and calls for that.
2015-04-30core: catch some special cases in cg_slice_to_path()Lennart Poettering2-2/+19
2015-04-30sym: adding missing symbols to .sym fileLennart Poettering1-2/+9
2015-04-30sd-bus,sd-login: add api for querying the slice within the the user systemd ↵Lennart Poettering10-64/+184
instance of a process units are organized in slice trees, not only for the system instance, but also for user systemd instances, expose this properly.
2015-04-30core: simplify unit type detection logicLennart Poettering7-12/+26
Introduce a new call unit_type_supported() and make use of it everywhere. Also, drop Manager parameter from per-type supported method prototype.
2015-04-30sd-bus: when we get ENOTTY on the HELLO ioctl assume incompatible API versionLennart Poettering2-4/+20
As perparation for future incompatible kdbus kernel API changes.
2015-04-30core: rework cgroup path parse logicLennart Poettering4-69/+172
Various cleanups, be stricter when parsing unit paths. Most importantly: return the root slice "-.slice" when asked for slice of paths that contain no slice component.
2015-04-29networkd: introduce vti6 tunnelSusant Sahani7-0/+53
This patch add support to create vti6 tunnel test: vt6.network [Match] Name=wlan0 [Network] Tunnel=ip6vti vti6.netdev [NetDev] Name=ip6vti Kind=vti6 [Tunnel] Local=2a00:ffde:4567:edde::4987 Remote=2001:473:fece:cafe::5179 ip link 11: ip6_vti0@NONE: <NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default link/tunnel6 :: brd :: 12: ip6vti@wlan0: <POINTOPOINT,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT group default link/tunnel6 2a00:ffde:4567:edde::4987 peer 2001:473:fece:cafe::5179
2015-04-29networkd: tunnel improve loggingSusant Sahani1-176/+64
Replaces a lof ot strerror() usage with log_netdev_error_errno()
2015-04-29sd-bus: properly handle creds that are known but undefined for a processLennart Poettering10-102/+211
A number of fields do not apply to all processes, including: there a processes without a controlling tty, without parent process, without service, user services or session. To distuingish these cases from the case where we simply don't have the data, always return ENXIO for them, while returning ENODATA for the case where we really lack the information. Also update the credentials dumping code to show this properly. Fields that are known but do not apply are now shown as "n/a". Note that this also changes some of the calls in process-util.c and cgroup-util.c to return ENXIO for these cases.
2015-04-29core: fix event source annotationsMantas Mikulėnas3-3/+9
These looked like a mass-replace gone slightly wrong – two statements with no { }'s, and no error checking.
2015-04-29tree-wide: get rid of a few more explicit bus parametersLennart Poettering4-10/+8
2015-04-29core: for queued reload message there is no need to store the bus explicitlyLennart Poettering3-16/+6
After all it can be derived from the message directly, and already is.