1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +03:00
Commit Graph

13425 Commits

Author SHA1 Message Date
Lennart Poettering
e120204729 core,logind,networkd: check for udev device initialization via enumeration matches
Instead of checking each device after we got it, check wuth an
enumeration filter instead, to make it more efficient.
2013-12-18 18:21:28 +01:00
Lennart Poettering
fa28bc2df7 core: priorize notification fd processing over notification fd process via sd-event's logic 2013-12-18 18:21:27 +01:00
Lennart Poettering
0e6eaa2d98 log: when we log to /dev/console and got disconnected (maybe due to vhangup) reconnect 2013-12-18 18:21:27 +01:00
Lennart Poettering
74f9e0f203 units: run systemd-networkd.service only if CAP_NET_ADMIN capability is around
This has the effect that systemd-networkd won't run in containers
without network namespacing wher CAP_NET_ADMIN is (usually) not
available. It will still run in containers with network namespacing on
(where CAP_NET_ADMIN is usually avilable).

We might remove this condition check again if networkd provides services
to apps that also are useful in containers lacking network namespacing,
however, as long as it doesn't it should be handled like udevd and be
excluded in such containers.
2013-12-18 18:21:27 +01:00
Lennart Poettering
220ec97ad6 core: in a container log to /dev/console if "debug" is specified 2013-12-18 18:21:27 +01:00
Lennart Poettering
99f098257f log: don't reopen /dev/console each time we call log_open()
Instead, force reopen it only if we really really have to.
2013-12-18 18:21:27 +01:00
Lennart Poettering
bf108e5541 service: watch main pid even in final states
In some circumstances, for example when start-up times out we
immediately jump into the final state, at which point we still should
try to watch the main pid so that the SIGCHLD allows us to quickly
move into dead state.
2013-12-18 18:21:27 +01:00
Kay Sievers
f6613dd959 libudev: devices received from udev are always initialized 2013-12-18 17:34:22 +01:00
Thomas Bächler
63966da86d login: Don't stop a running user manager from garbage-collecting the user.
With the current logic, a user will never be garbage-collected, since its
manager will always be around. Change the logic such that a user is
garbage-collected when it has no sessions and linger is disabled.
2013-12-18 10:57:13 +01:00
Kay Sievers
48b9cfcb7c comment out udev's is_initialized call until the problem is sorted out 2013-12-18 05:07:16 +01:00
Lennart Poettering
bf5332d2bf core,logind,networkd: don't pick up devices from udev before they finished udev initialization
Managers shouldn't pick up the devices the manage before udev finished
initialization, hence check explicitly for that.
2013-12-18 03:37:26 +01:00
Lennart Poettering
5e2f14e62b busctl: output a single sorted list of names, including activatable and activated 2013-12-18 02:54:16 +01:00
Lennart Poettering
71ebe743a0 bus: beef up driverd
Add validity checks for all parameters passed in.

Implement ReleaseName and StartServiceByName().

Fix access control in vtable.
2013-12-18 02:54:16 +01:00
Lennart Poettering
45fd5e4d08 bus: when releasing, taking, listing bus names check if they are valid
Given that the kernel does not validate bus names we have to when using
them.
2013-12-18 02:54:16 +01:00
Lennart Poettering
23c3a89b89 tests: fix build 2013-12-18 02:54:16 +01:00
Daniel Mack
ceceaf09f9 bus: sync with kdbus
Two new things here:

a) struct kdbus_notify_name_change now carries two struct
   kdbus_notify_id_change

b) a new KDBUS_CMD_BYEBYE ioctl that has no user yet in systemd
2013-12-18 00:20:55 +01:00
Tom Gundersen
d638dee035 networkd: bridge - fix state machine
We were entering BRIDGE_STATE_CREATED rather than BRIDGE_STATE_READY.
2013-12-17 22:08:12 +01:00
Tom Gundersen
ef1ba6065c networkd: link - remove useless states
Rework the state-machine a bit.
2013-12-17 22:08:12 +01:00
Tom Gundersen
22936833e1 networkd: rename link_update_flags to link_update
We are likely to track more than the flags in the future.
2013-12-17 22:08:12 +01:00
Thomas Hindoe Paaboel Andersen
2b49a47041 bus-util: return errors when encountered
Introduced in:
9f6eb1cd58
313333b403
2013-12-17 21:56:49 +01:00
Shawn Landden
919ce0b7af _noreturn_ --> noreturn for C11 compat
also define noreturn w/o <stdnoreturn.h>
2013-12-17 21:51:24 +01:00
Shawn Landden
73020ab241 util: no need for in_initrd() cache to be thread-local
the process only has one working directory, and a race is
harmless
2013-12-17 21:45:43 +01:00
Shawn Landden
ec202eae8e __thread --> thread_local for C11 compat
Also make thread_local available w/o including <threads.h>.
(as the latter hasn't been implemented, but this part is trivial)
2013-12-17 21:45:43 +01:00
Lennart Poettering
06db8540cd update TODO 2013-12-17 21:45:43 +01:00
Lukasz Skalski
5232c42ec4 libsystemd-bus: true/false instead of yes/no in msg dump
Due to this patch, message dump (for message which includes boolean
type) is more consistent with dbus-send (which display true/false
instead of yes/no for boolean). It's only simple 'cosmetics change'.

** For dbus-send **

dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply / org.freedesktop.DBus.NameHasOwner string:org.freedesktop.login1

method return sender=org.freedesktop.DBus -> dest=:1.97 reply_serial=2
   boolean true

** For libsystemd-bus (without this patch) **

‣ Type=method_call  Endian=l  Flags=0  Version=2 Serial=8
  Destination=org.freedesktop.DBus  Path=/org/freedesktop/DBus  Interface=org.freedesktop.DBus  Member=NameHasOwner
  MESSAGE "s" {
  	STRING "org.freedesktop.login1";
  };

‣ Type=method_return  Endian=l  Flags=1  Version=2 Serial=51  ReplySerial=8
  Sender=:1.59  Destination=:1.67
  UniqueName=:1.59  WellKnownNames={org.freedesktop.DBus}
  MESSAGE "b" {
  	BOOLEAN yes;
  };

For me true/false seems to be better readable than yes/no for BOOLEAN.
2013-12-17 21:45:43 +01:00
Thomas Hindoe Paaboel Andersen
0d647f7f73 journal-file.c: remove redundant assignment of variable
we also do 'last_index = (uint64_t) -1;' at the end of the while
loop so there is no reason to also do it here.
2013-12-17 20:55:20 +01:00
Lennart Poettering
c966ef4a76 bus: properly return an error code when release_name fails abnormally 2013-12-17 20:39:15 +01:00
Lukasz Skalski
3263ef39b8 bus-driverd: Fix return code in driver_request_name
RequestName return codes should be consistent with Dbus Specification.

VALUE - DESCRIPTION
1-The caller is now the primary owner of the name, replacing any previous owner,
2-The name already had an owner (QUEUE flag was not specified),
3-The name already has an owner (QUEUE flag was specified),
4-Application trying to request ownership of a name is already the owner of it.
2013-12-17 20:37:24 +01:00
Lennart Poettering
a69f4254a8 journald: before closing /dev/kmsg let's unregister the event source 2013-12-17 20:02:21 +01:00
Lennart Poettering
c0f71f469f journald: close /dev/kmsg again if we cannot make use of it 2013-12-17 19:57:46 +01:00
Lennart Poettering
445ea9be52 journald: downgrade warning message when /dev/kmsg does not exist 2013-12-17 19:57:46 +01:00
Patrik Flykt
97b9372db1 dhcp: Properly handle unsuccessful cases for DHCP Ack
Ignore DHCP Ack packets if they are found to be erroneous or have
an unexpected xid by setting the result to zero instead of propagating
an error. Also remember to report a DHCP Nak and stop the DHCP client.
2013-12-17 16:24:16 +01:00
Thomas Hindoe Paaboel Andersen
187dc6e554 udev link-config: add asserts to silence scan-build 2013-12-17 16:09:52 +01:00
Thomas Hindoe Paaboel Andersen
6a70535669 bus: removed unused variable in driverd
acked by Daniel Mack
2013-12-17 16:07:00 +01:00
Lennart Poettering
382aa8d036 bus: make driverd code more similar to other daemons, and make it exit on idle among other things 2013-12-17 15:45:31 +01:00
Lennart Poettering
f83f897489 busctl: on kdbus the bus driver is a service like any other, hence don't skip it 2013-12-17 15:45:31 +01:00
Lennart Poettering
e1c433c621 bus: remarshal messages when necessary before sending 2013-12-17 15:45:31 +01:00
Lennart Poettering
603938e0a9 activate: fix error checking on epoll_ctl() 2013-12-17 15:42:33 +01:00
Lennart Poettering
15e913230c bus: install unit files for new driver service 2013-12-17 15:42:33 +01:00
Daniel Mack
816a3f9ec5 bus: sync with kdbus
kdbus_cmd_{ep,ns,bus}_make are now consolidated, and bloom_size has
become an item of the dynamically sized list.
2013-12-17 13:45:02 +01:00
Daniel Mack
613ec4b836 bus: sync up with kdbus 2013-12-17 12:25:20 +01:00
Lukasz Skalski
f92f3ff967 bus-driverd: Fix unique name return in driver_get_name_owner 2013-12-17 11:16:49 +01:00
Tom Gundersen
a53692f7b4 man: networkd - clarify Address/Gateway keys in [Network] section 2013-12-17 09:24:57 +01:00
Tom Gundersen
ae4c67a7c6 networkd: add support for Route sections 2013-12-17 09:24:57 +01:00
Tom Gundersen
b0d27a2508 networkd: correct logging message 2013-12-17 09:24:57 +01:00
Marc-Antoine Perennou
b9eaf3d1eb rtnl: fix for 32bits
Commit 0a0dc69b65 broke tests for 32 bits
2013-12-17 00:45:19 -05:00
Zbigniew Jędrzejewski-Szmek
e7335f5491 build-sys: fix distcheck 2013-12-16 23:59:07 -05:00
Shawn Landden
08c6f819cb journal: fix against (theoretical) undefined behavior
While all the libc implementations I know return NULL when memchr's size
parameter is 0, without accessing any memory, passing NULL to memchr is
still invalid:

C11 7.24.1p2: Where an argument declared as "size_t n" specifies the length
of the array for a function, n can have the value zero on a call to that
function. Unless explicitly stated otherwise in the description of a
particular function in this subclause, pointer arguments on such a call
shall still have valid values, as described in 7.1.4. On such a call, a
function that locates a character finds no occurrence, a function that
compares two character sequences returns zero, and a function that copies
characters copies zero characters.

see http://llvm.org/bugs/show_bug.cgi?id=18247
2013-12-16 23:46:01 -05:00
Zbigniew Jędrzejewski-Szmek
7fd97d7829 man: describe journalctl --show-cursor 2013-12-16 23:40:10 -05:00
Zbigniew Jędrzejewski-Szmek
a94200d0b4 bus-driverd: actually add --version 2013-12-16 23:21:51 -05:00