summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* man: add systemd-sysv-generator(8)Zbigniew Jędrzejewski-Szmek2014-11-272-0/+109
| | | | | | | | In principle SysV stuff is only for compatibility, but we are stuck with it for the forseeable future, so documentation might as well be provided. https://bugs.debian.org/771172
* fix build with --enable-terminalThomas Hindoe Paaboel Andersen2014-11-271-1/+1
| | | | Broke with 086891e5c119abb9854237fc32e736fe2d67234c
* kmod-setup: simplify kernel command line parsingLennart Poettering2014-11-271-19/+1
|
* kdbus: set kernel attach mask before creating the first busLennart Poettering2014-11-276-29/+103
|
* selinux: log selinux log messages with LOG_AUTH facilityLennart Poettering2014-11-271-1/+1
|
* log: rearrange log function namingLennart Poettering2014-11-2751-665/+671
| | | | | | | | | | - Rename log_meta() → log_internal(), to follow naming scheme of most other log functions that are usually invoked through macros, but never directly. - Rename log_info_object() to log_object_info(), simply because the object should be before any other parameters, to follow OO-style programming style.
* log: be a bit less wasteful when allocating buffersLennart Poettering2014-11-271-2/+2
|
* log: add an "error" parameter to all low-level logging calls and intrdouce ↵Lennart Poettering2014-11-2721-153/+209
| | | | | | | | | | | | | | | | | | | | log_error_errno() as log calls that take error numbers This change has two benefits: - The format string %m will now resolve to the specified error (or to errno if the specified error is 0. This allows getting rid of a ton of strerror() invocations, a function that is not thread-safe. - The specified error can be passed to the journal in the ERRNO= field. Now of course, we just need somebody to convert all cases of this: log_error("Something happened: %s", strerror(-r)); into thus: log_error_errno(-r, "Something happened: %m");
* sd-bus: set creds info for "org.freedesktop.DBus.Local" generated messages, tooLennart Poettering2014-11-273-2/+22
|
* sd-bus: when we get the list of well-known names back from kdbus we ↵Lennart Poettering2014-11-272-0/+15
| | | | shouldn't confuse the empty list with unknown information
* sd-bus: deal with whitespace in matchesLennart Poettering2014-11-271-0/+3
|
* sd-bus: unify logic how we patch the message source of driver messagesLennart Poettering2014-11-271-11/+14
|
* sd-bus: fake valid well-known-names metadata for faked bus messagesLennart Poettering2014-11-273-2/+21
|
* sd-bus: optimize how we generate the well-known-names lists in messages from ↵Lennart Poettering2014-11-272-5/+29
| | | | kdbus
* sd-bus: be stricter with mismatches between dbus1 and kdbus message headersLennart Poettering2014-11-272-5/+35
|
* bus-proxy: beef up policy enforcementLennart Poettering2014-11-274-284/+452
| | | | | | | | | | | | | | | | | - actually return permission errors to clients - use the right ucreds field - fix error paths when we cannot keep track of locally acquired names due to OOM - avoid unnecessary global variables - log when the policy denies access - enforce correct policy rule order - always request all the metadata its we need to make decisions
* update TODOLennart Poettering2014-11-271-1/+2
|
* bus-proxy: check passed parameter signature of all driver method callsLennart Poettering2014-11-273-8/+59
|
* networkd: fix kernel rtnl receive buffer overrun errorAlin Rauta2014-11-273-0/+12
| | | | | | | | | | | | | | | | | | | | | | We got the following error when running systemd on a device with many ports: "rtnl: kernel receive buffer overrun Event source 'rtnl-receive-message' returned error, disabling: No buffer space available" I think the kernel socket receive buffer queue should be increased. The default value is taken from: "/proc/sys/net/core/rmem_default", but we can overwrite it using SO_RCVBUF socket option. This is already done in networkd for other sockets. For example, the bus socket (sd-bus/bus-socket.c) has a receive queue of 8MB. In our case, the default is 208KB. Increasing the buffer receive queue for manager socket to 512KB should be enough to get rid of the above error. [tomegun: bump the limit even higher to 8M]
* resolve: reject empty TXT recordsStanisław Pitucha2014-11-271-0/+7
| | | | | | | TXT records should have at least one character, so enforce this. Before 0f84a72 parser SIGSEGV'd on ->txt.strings being NULL, but even if this is fixed we should reject invalid TXT records.
* resolve: set error code on failureStanisław Pitucha2014-11-271-1/+3
| | | | | Set the error code in case of incorrect name. This prevents continuing and failing an assert(name) later on.
* resolve: fix redirection loops in compressed RRStanisław Pitucha2014-11-271-2/+5
| | | | | | | | | | | Loops in RR compression were only detected for the first entry. Multiple redirections should be allowed, each one checking for an infinite loop on its own starting point. Also update the pointer on each redirection to avoid longer loops of labels and redirections, in names like: (start) [len=1] "A", [ptr to start] (David: rename variable to "jump_barrier" and add reference to RFC)
* core: fix transaction destructiveness check once moreMichal Schmidt2014-11-271-1/+1
| | | | | | | | | | | | | | The previous fix e0312f4db "core: fix check for transaction destructiveness" broke test-engine (noticed by Zbyszek). Apparently I had a wrong idea of the intended semantics of --fail. The manpage says the operation should fail if it "conflicts with a pending job (more specifically: causes an already pending start job to be reversed into a stop job or vice versa)". So let's check job_type_is_conflicting, instead of !is_superset. This makes both test-engine and TEST-03-JOBS pass again.
* resolve: fix NULL deref on strv comparisonDavid Herrmann2014-11-273-8/+15
| | | | | | | | A strv might be NULL if it is empty. The txt.strings comparison doesn't take that into account. Introduce strv_equal() to provide a proper helper for this and fix resolve to use it. Thanks to Stanisław Pitucha <viraptor@gmail.com> for reporting this!
* bus: prefix custom endpoints with "$UID-"David Herrmann2014-11-271-10/+10
| | | | | | The kdbus module will later get a policy that endpoint-names are restricted to "<uid>-<name>" just like bus-names. Make sure that systemd is already compatible to that.
* hwdb: add a new db for the DPI/frequency settings of micePeter Hutterer2014-11-273-1/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pointer acceleration for relative input devices (mice, trackballs, etc.) applies to the deltas of the device. Alas, those deltas have no physical reference point - a delta of 10 may be caused by a large movement of a low-dpi mouse or by a minute movement of a high-dpi mouse. Which makes pointer acceleration a bit useless and high-dpi devices essentially unusable. In an ideal world, we could read the DPI from the device directly and work with that. In the world we actually live in, we need to compile this list manually. This patch introduces the database, with the usual match formats and a single property to be set on a device: MOUSE_DPI That is either a single value for most mice, or a list of values for mice that can change resolution at runtime. The exact format is detailed in the hwdb file. Note that we're explicitly overshooting the requirements we have for libinput atm. Frequency could be detected in software and we don't actually use the list of multiple resolutions (because we can't detect when they change anyway). However, we might as well collect those values from the get-go, adding/modifying what will eventually amount to hundreds of entries is a bit cumbersome. Note: we rely on the input_id builtin to tag us as mouse first, ordering of the rules is important. (David: fixed up typos and moved hwdb file into ./hwdb/)
* unit-name: fix escaping logic in unit_name_mangle_with_suffix()Ivan Shapovalov2014-11-271-25/+26
| | | | | | | | | | Make screened character set consistent with unit_name_mangle() by splitting off the escaping loop into a separate function. Before this fix, unit names such as `foo@bar.target` would get transformed into `foo\x40bar.target` when unit_name_mangle_with_suffix() is used. https://bugs.freedesktop.org/show_bug.cgi?id=86711
* coredump: use openatZbigniew Jędrzejewski-Szmek2014-11-271-19/+18
|
* journalctl: print all possible lines immediately with --follow + --sinceAndrej Manduch2014-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | When I tryed to run journalctl with --follow and --since arguments it behaved very strangely. First It prints logs from what I specified in --since argument, then printed 10 lines (as is default in --follow) and when app put something new in to log journalctl printed everithing from the last printed line. How to reproduce: 1. run: journalctl -m --since 14:00 --follow Then you'll see 10 lines of logs since 14:00. After that wait until some app add something in the journal or just run `systemd-cat echo test` 2. After that journalctl will print every single line since 14:00 and will follow as expected. As long as --since and --follow will eventually print all relevant lines, I seen no reason why not to print them right away and not after first new message in journal. Relevant bugzillas: https://bugs.freedesktop.org/show_bug.cgi?id=71546 https://bugs.freedesktop.org/show_bug.cgi?id=64291
* coredump: collect all /proc data useful for bug reportingJakub Filak2014-11-271-2/+150
| | | | | | | | | | | | /proc/[pid]: - status - maps - limits - cgroup - cwd - root - environ - fd/ & fdinfo/ joined in open_fds
* util: add function getting proc environJakub Filak2014-11-273-57/+103
| | | | | On the contrary of env, the added function returns all characters cescaped, because it improves reproducibility.
* networkd: route - allow routes without a gatewayGavin Li2014-11-271-14/+18
| | | | | | | | | | For IPv6, the kernel returns EINVAL if a route is added with the RTA_GATEWAY attribute set to in6addr_any (::). A route without a gateway is useful in some situations, such as layer 3 tunneling (sit, gre, etc.). This patch prevents the RTA_GATEWAY attribute from being added when route.in_addr is ip6addr_any (::).
* build-sys: do not install tmpfiles and sysusers files by defaultŁukasz Stelmach2014-11-271-3/+11
|
* timesyncd: do not keep listening socket open foreverSean Young2014-11-271-7/+13
| | | | This also makes the source port less predicatable.
* logind: Support logind.conf.d directories in the usual search pathsJosh Triplett2014-11-275-7/+74
| | | | | | | | | | | This makes it possible to drop in logind configuration snippets from a package or other configuration management mechanism. Add documentation to the header of /etc/logind.conf pointing the user at /etc/logind.conf.d/*.conf. Introduce a new helper, conf_parse_many, to parse configuration files in a search path.
* Introduce CONF_DIRS_NULSTR helper to define standard conf dirsJosh Triplett2014-11-276-45/+20
| | | | | | | Several different systemd tools define a nulstr containing a standard series of configuration file directories, in /etc, /run, /usr/local/lib, /usr/lib, and (#ifdef HAVE_SPLIT_USR) /lib. Factor that logic out into a new helper macro, CONF_DIRS_NULSTR.
* journald: proceed even if some sockets are unknownZbigniew Jędrzejewski-Szmek2014-11-261-4/+2
| | | | | | | | | | | | | | | | systemd-journald would refuse to start if it received an unknown socket from systemd. This is annoying, because the failure more for systemd-journald is unpleasant: systemd will keep restarting journald, but most likely the same error will occur every time. It is better to continue. journald will try to open missing sockets on its own, so things should mostly work. One question is whether to close the sockets which cannot be parsed or to keep them open. Either way we might lose some messages. This failure is most likely for the audit socket (selinux issues), which can be opened multiple times so this not a problem, so I decided to keep them open because it makes it easier to debug the issue after the system is fully started.
* swap: restore support for nofailZbigniew Jędrzejewski-Szmek2014-11-264-50/+70
| | | | | | | | | | | | | | | | systemd stops adding automatic dependencies on swap.target to swap units. If a dependency is required, it has to be added by unit configuration. fstab-generator did that already, except that now it is modified to create a Requires or Wants type dependency, depending on whether nofail is specified in /etc/fstab. This makes .swap units obey the nofail/noauto options more or less the same as .mount units. Documentation is extended to clarify that, and to make systemd.mount(5) and system.swap(5) more similar. The gist is not changed, because current behaviour actually matches existing documentation. https://bugs.freedesktop.org/show_bug.cgi?id=86488
* manager: print fatal errors on the console tooZbigniew Jędrzejewski-Szmek2014-11-263-15/+54
| | | | | | When booting in quiet mode, fatal messages would not be shown at all to the user. https://bugzilla.redhat.com/show_bug.cgi?id=1155468
* manager: log some fatal errors at emergency levelZbigniew Jędrzejewski-Szmek2014-11-264-26/+29
| | | | | | This adds a new log_emergency() function, which is equivalent to log_error() for non-PID-1, and logs at the highest priority for PID 1. Some messages which occur before freezing are converted to use it.
* bus-policy: actually test messages against the newly added test.confLennart Poettering2014-11-262-2/+23
|
* bus-policy: also add in other bus policy tests from dbus1Lennart Poettering2014-11-264-1/+96
| | | | dbus1 only checks if these files parse correctly so let's do the same for now.
* bus-policy: steal a test case for prefix ownership from dbus1, and make sure ↵Lennart Poettering2014-11-264-4/+36
| | | | it passes with the bus proxy enforcement
* sd-bus: make sure that when we connect to the system bus we have enough ↵Lennart Poettering2014-11-261-1/+3
| | | | creds to make security decisions
* core: make sure we have enough information when doing selinux decisionsLennart Poettering2014-11-262-1/+10
| | | | | Let's ask for the security relevant bits in a race-free way, and augment the rest from /proc.
* update TODOLennart Poettering2014-11-261-1/+0
|
* sd-bus: update peeking into receieved messages, with recent kernel change we ↵Lennart Poettering2014-11-261-6/+13
| | | | need to FREE them after all
* core: fix check for transaction destructivenessMichal Schmidt2014-11-261-1/+1
| | | | | | | When checking if the transaction is destructive, we need to check if the previously installed job is a superset of the new job (and hence the new job will fold into the installed one without changing it), not the other way around.
* core: drop now-redundant special-casing of JOB_NOPMichal Schmidt2014-11-261-2/+2
| | | | | | | job_type_is_conflicting(X, JOB_NOP) correctly gives: false. job_type_allows_late_merge(JOB_NOP) && job_type_is_superset(X, JOB_NOP) correctly gives: true.
* core: fix assertion failure in checking a transaction with a JOB_NOPMichal Schmidt2014-11-262-4/+13
| | | | | | | | | Several functions called from transaction_activate() need to correctly handle the case where a JOB_NOP job is being checked against a unit's pending job. The assumption that JOB_NOP never merges with other job types was correct, but since the job_type_is_*() functions are implemented using the merge lookup, they need to special-case JOB_NOP to avoid hitting assertion failures.