summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* swap: remove if/else with the same data pathStefan Beller2014-01-05
| | | | | | | This was introduced in e1770af812 (2012-02-03, swap: replace failure boolean by result enum). This just removes unneeded lines of code, no functional change.
* man: document some more bus functionsZbigniew Jędrzejewski-Szmek2014-01-05
|
* networkd: refuse to use .network files with missing Address/Gateway keyTom Gundersen2014-01-05
| | | | | | | | | | | | These keys are mandatory in [Address]/[Route] sections. Otherwise, we hit an assert: ens3: setting addresses Assertion 'address->family == 2 || address->family == 10' failed at /build/amd64-generic/tmp/portage/sys-apps/systemd-9999-r1/work/systemd-9999/src/network/networkd-address.c:137, function address_configure(). Aborting. Reported-by: Alex Polvi <alex.polvi@coreos.com> At the same time make sure Route's Destination and Gateway uses the same address family.
* sd-event: add missing symbol, sd_event_source_set_io_fdDave Reisner2014-01-04
| | | | | This appears to have been omitted in 30caf8f3afd29da8 when the the function was added.
* udev: net_id - handle virtio busesTom Gundersen2014-01-04
| | | | This was already supported in path_id, so should be uncontroversial.
* Revert "net-util: add support for Type=ethernet"Tom Gundersen2014-01-04
| | | | | | | This reverts commit 4cd1214db6cf4b262e8ce6381bc710091b375c96. This may still be fixed in the kernel, revert this for now until we see how it all shakes out.
* systemctl: improve readability on failed commandsThomas Hindoe Paaboel Andersen2014-01-04
| | | | | | | | | | | | Not long ago a failed command would print: "Failed to start something.service: ..." regardless of whether the command was to start/stop/restart/etc. With e3e0314 this was improved to print the method used. E.g. for stopping: "Failed to StopUnit something.service: ..." This patch matches the method to a more human readable word. E.g: "Failed to stop something.service: ..."
* man: document a batch of bus functionsZbigniew Jędrzejewski-Szmek2014-01-04
|
* net-util: add support for Type=ethernetTom Gundersen2014-01-03
| | | | | When DEVTYPE is not set for a nic, it means it is a wired/ethernet device.
* networkd: link hash uses 64, not 32 bit keysTom Gundersen2014-01-03
|
* networkd: print the ifindex of added linksTom Gundersen2014-01-03
| | | | This debug information may be useful when comapring to dropped rtnetlink messages.
* networkd: improve loggingTom Gundersen2014-01-03
| | | | This gives a bit better messages when a link is added twice.
* networkd: improve link state change loggingTom Gundersen2014-01-03
|
* networkd: add some debug info about notifications we ignoreTom Gundersen2014-01-03
|
* bus: always create --user bus when kdbus is activeKay Sievers2014-01-03
| | | | | We set the variable in the unit file for --user, so this check is always true.
* networkd: link - explicitly set the link to be up if the call to IFF_UP succeedsTom Gundersen2014-01-03
| | | | No need to wait for the NEWLINK message to arrive.
* networkd: fix memory leak in error pathZbigniew Jędrzejewski-Szmek2014-01-02
|
* networkd: do not deference null pointer in cleanupZbigniew Jędrzejewski-Szmek2014-01-02
|
* core: fix gcc unused variable warningZbigniew Jędrzejewski-Szmek2014-01-02
|
* bus: fix memleak in sd_bus_creds_new_from_pidZbigniew Jędrzejewski-Szmek2014-01-02
|
* Introduce cleanup functions for cap_freeZbigniew Jędrzejewski-Szmek2014-01-02
| | | | | Unfortunately a different cleanup function is necessary per type, because cap_t** and char** are incompatible with void**.
* rtnl: fix memory corruptions after reallocZbigniew Jędrzejewski-Szmek2014-01-02
| | | | | | struct sd_rtnl_message would keep two additional pointers into the hdr field. Every time hdr was realloced, those pointers should be adjusted, but weren't. It seems less error-prone to keep offsets instead.
* bus: break reference cycle between bus and messagesZbigniew Jędrzejewski-Szmek2014-01-02
| | | | | | | | | | Because messages in the read and write queues hold a reference on the bus, and the bus holds a reference on each of them, we would never free the bus if the read or write queues were not empty. Explicitly substract the number of messages in those queue from the bus reference count when deciding whether to free or not. A simple test which creates and unrefs simple objects is added.
* Use format patterns for usec_t, pid_t, nsec_t, usec_tZbigniew Jędrzejewski-Szmek2014-01-02
| | | | | | | | It is nicer to predefine patterns using configure time check instead of using casts everywhere. Since we do not need to use any flags, include "%" in the format instead of excluding it like PRI* macros.
* Move bus path definitions to def.hZbigniew Jędrzejewski-Szmek2014-01-02
|
* core/service: check if mainpid matches only if it is setZbigniew Jędrzejewski-Szmek2014-01-02
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=1047304
* core/manager: print info about interesting signalsZbigniew Jędrzejewski-Szmek2014-01-02
| | | | | | Information about signals which are not routinely received by systemd are printed at info level. This should make it easier to see what is happening in the system.
* core/service: tweak messages on operation timeoutsZbigniew Jędrzejewski-Szmek2014-01-02
|
* libsystemd-dhcp: don't assert on client_stop()Tom Gundersen2014-01-03
| | | | We need to be able to stop the dhcp client at any time, and the function appears to be written to handle this.
* networkd: dhcp - avoid null pointer dereferenceTom Gundersen2014-01-03
|
* networkd: add more asserts and ignore all events when link has failedTom Gundersen2014-01-03
|
* networkd: only track state of links we are managingTom Gundersen2014-01-02
| | | | | If a network is not (yet) set for a link, we do not care about its state (as we anyway don't know what to do with it).
* networkd: improve loggingTom Gundersen2014-01-02
| | | | Remove redundant messages, add some debugging ones and make wording more uniform.
* networkd: fix NULL pointer derefKay Sievers2014-01-02
|
* networkd: fix getting initial stateTom Gundersen2014-01-02
| | | | We were requesting the state and then ignoring it...
* networkd: add DHCPv4 supportTom Gundersen2014-01-01
| | | | | | | | | This adds basic DHCPv4 support. Link-sense is enabled unconditionally, but the plan is to make that configurable. I tested this in a VM with lots of NICs and over wifi in the various coffee shops I found this Christmas, but more testing would definitely be appreciated.
* networkd: distinguish between static and dynamic addresses/routesTom Gundersen2014-01-01
| | | | | | Static addresses/routes are associated with a network. Dynamic addresses/routes are associtade with links (as the corresponding network may be shared by several links).
* network: add support for dropping addressTom Gundersen2014-01-01
|
* build-sys: make test output a bit nicerZbigniew Jędrzejewski-Szmek2013-12-31
|
* dhcp: fix creation of req_opts arrayZbigniew Jędrzejewski-Szmek2013-12-31
| | | | | | | GREEDY_REALLOC needs to have two size variables: one for the allocated size, and a second one for the used size. Using the allocated size only lead to leaving some elements unitialized and assigning some more than once.
* sleep-config: fix double freeZbigniew Jędrzejewski-Szmek2013-12-31
| | | | | | | | | Before 34a3baa4d 'sleep-config: Dereference pointer before check for NULL' oom conditions would not be detected properly. After that commit, a double free was performed. Rework the whole function to be easier to understand, and also replace strv_split_nulstr with strv_new, since we know the strings anyway.
* boot-efi: Remove superfluous assignmentStefan Beller2013-12-31
| | | | | 2 lines after the changed line we assign err to efi_get_variable(...) unconditionally, so it makes no sense to initialize it to some value.
* sleep-config: Dereference pointer before check for NULLStefan Beller2013-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug pointed out by http://css.csail.mit.edu/stack/ (Optimization-unstable code) It is a similar fix as f146f5e159 (2013-12-30, core: Forgot to dereference pointer when checking for NULL) To explain this bug consider the following similar, but simpler code: if (!p) free(*p) Assume the if condition evaluates to true, then we will access *p, which means the compiler can assume p is a valid pointer, so it could dereference p and use the value *p. Assuming p as a valid pointer, !p will be false. But initally we assumed the condition evaluates to true. By this reasoning the optimizing compiler can deduce, we have dead code. ("The if will never be taken, as *p must be valid, because otherwise accessing *p inside the if would segfault") This led to an error message of the static code checker, so I checked the code in question. As we access *modes and *states before the check in the changed line of this patch, I assume the line to be wrong and we actually wanted to check for *modes and *states being both non null.
* bootchart: Remove unneeded check for NULLStefan Beller2013-12-30
| | | | | | | | | | | | | | Directly before the changed line there is: while ((parent->next_ps && parent->pid != ps->ppid)) parent = parent->next_ps; which looks one element ahead of the list, hence we can rely on parent being non null here. If 'parent' were NULL at that while loop already, it would crash as we're dereferencing 'parent' when checking for next_ps already. Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
* tmpfiles: rename --unsafe to --bootZbigniew Jędrzejewski-Szmek2013-12-30
| | | | | As suggested by Kay, it is better to describe what is done, not what might happen.
* core: Forgot to dereference pointer when checking for NULLStefan Beller2013-12-30
| | | | | Actually we already checked for !rt before, now we'd like to examine the return value of the memory allocation.
* systemd-python: fix listen_fds under Python 2Zbigniew Jędrzejewski-Szmek2013-12-30
|
* systemd-python: fix setting of exception codesZbigniew Jędrzejewski-Szmek2013-12-30
| | | | | | | The return value of 0 would be treated as failure by mistake, resulting in " SystemError: error return without exception set". The way that set_error() is used is changed to be the same everywhere.
* acticate: rename --environment to --setenvZbigniew Jędrzejewski-Szmek2013-12-30
| | | | | | | Nspawn has --setenv, and systemd itself accepts systemd.setenv. It is nice to have the same parameter name everywhere. Old name is accepted, but not advertised.
* udev: LOG_PRIORITY -> LOG_LEVELKay Sievers2013-12-29
|