1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00
Commit Graph

16933 Commits

Author SHA1 Message Date
Tom Gundersen
4bd5ace3e7 units: networkd - order after udev
This way we are sure that /dev/net/tun has been given the right permissions before we try to connect to it.
Ideally, we should create tun/tap devices over netlink, and then this whole issue would go away.
2014-09-08 15:07:51 +02:00
Tom Gundersen
1eb808756e networkd: netdev - failing to create a netdev is not fatal, just fail that netdev 2014-09-08 15:07:51 +02:00
Tom Gundersen
6f44acfb48 networkd: tuntap - return correct error when /dev/net/tun cannot be opened 2014-09-08 15:07:51 +02:00
Daniel Mack
e44da745d1 service: hook up custom endpoint logic
If BusPolicy= was passed, the parser function will have created
an ExecContext->bus_endpoint object, along with policy information.

In that case, create a kdbus endpoint, and pass its path name to the
namespace logic, to it will be mounted over the actual 'bus' node.

At endpoint creation time, no policy is updloaded. That is done after
fork(), through a separate call. This is necessary because we don't
know the real uid of the process earlier than that.
2014-09-08 14:15:02 +02:00
Daniel Mack
060e088e94 exit-status: add new exit code for custom endpoint errors 2014-09-08 14:12:56 +02:00
Daniel Mack
a610cc4f18 namespace: add support for custom kdbus endpoint
If a path to a previously created custom kdbus endpoint is passed in,
bind-mount a new devtmpfs that contains a 'bus' node, which in turn in
bind-mounted with the custom endpoint. This tmpfs then mounted over the
kdbus subtree that refers to the current bus.

This way, we can fake the bus node in order to lock down services with
a kdbus custom endpoint policy.
2014-09-08 14:12:56 +02:00
Daniel Mack
5019962312 bus: parse BusPolicy directive in service files
Add a new directive called BusPolicy to define custom endpoint policies. If
one such directive is given, an endpoint object in the service's ExecContext is
created and the given policy is added to it.
2014-09-08 14:12:54 +02:00
Daniel Mack
e7d718afdb bus: add code to create custom endpoints and set their policy
Custom endpoints are alternative connection points to a bus, allowing
specific policy to be uploaded.

Add two functions to bus-kernel. One to create such endpoints, and another
one for setting a policy for them.
2014-09-08 11:06:45 +02:00
Daniel Mack
bb7dd0b04a bus: add kdbus endpoint types
Add types to describe endpoints and associated policy entries,
and add a BusEndpoint instace to ExecContext.
2014-09-08 11:06:45 +02:00
Daniel Mack
5369c77d2e bus: factor out bus policy items
In order to re-use the policy definitions, factor them out into their own
files.
2014-09-08 11:06:45 +02:00
Marcel Holtmann
de68938a2c hwdb: Update database of Bluetooth company identifiers 2014-09-08 05:06:18 +02:00
Michael Biebl
67826132ad man: fix references to systemctl man page which is now in section 1
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=760613
2014-09-06 13:45:18 +02:00
Lennart Poettering
3bcde97e85 update TODO 2014-09-05 21:49:44 +02:00
Daniel Mack
5b89f67f03 exit-status: fix URL in comment
The LSB sites have moved, so update the URL.
2014-09-05 13:48:05 +02:00
Daniel Mack
d35fbf6bdf exec: move code executed after fork into exec_child()
This factors out one conditional branch that has grown way too big, and
makes the code more readable by using return statements rather than jump
labels.
2014-09-05 12:19:39 +02:00
Daniel Mack
9fa95f8539 exec: factor out most function arguments of exec_spawn() to ExecParameters
This way, the list of arguments to that function gets more comprehensive,
and we can get around passing lots of NULL and 0 arguments from socket.c,
swap.c and mount.c.

It also allows for splitting up the code in exec_spawn().

While at it, make ExecContext const in execute.c.
2014-09-05 12:18:57 +02:00
Lennart Poettering
a4390b6be8 man: make it more clear that the concepts systemctl(1) manage are introduced in systemd(1)
Based on a suggestion of Ken Coar.
2014-09-04 21:42:52 +02:00
Lennart Poettering
782c265292 hibernate-resume: let's move all hibernate-resume tools into the same directory
They are closely related, so let's move them together, and clean up the
.c file naming while we are at it.
2014-09-04 21:42:52 +02:00
Tom Gundersen
78c958f82e networkd: link - allow loopback links to be manage, but ignore DHCP/IPv4LL 2014-09-04 20:55:26 +02:00
Michael Biebl
36e46fe9b6 build: don't install busname units and target if kdbus support is disabled 2014-09-04 16:19:32 +02:00
Tom Gundersen
a821cbb00c networkd: link - clarify log message when receiving address for unknown link 2014-09-04 14:16:56 +02:00
Tom Gundersen
bd2efe9219 networkd: link - do not manage loopback links
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=83134.
2014-09-04 14:16:25 +02:00
Tom Gundersen
51d1817152 networkd: link - save link flags when the link is added
Don't wait for the link to be fully synchronised.
2014-09-04 14:10:57 +02:00
Tom Gundersen
a61bb41c29 networkd: move carrier gained/lost handling from link_update_flags() to link_update()
This allows us also to simplify link_has_carrier() a bit.
2014-09-04 14:10:57 +02:00
Zbigniew Jędrzejewski-Szmek
83a1ff25e5 Update TODO 2014-09-03 22:56:13 -04:00
Zbigniew Jędrzejewski-Szmek
7a465961c1 man: fix typo 2014-09-03 22:56:02 -04:00
Zbigniew Jędrzejewski-Szmek
eb6c7d2075 systemd: fix argument ordering in UnsetAndSetEnvironment
Fixup for v208-615-g718db96199.
2014-09-03 22:55:56 -04:00
Zbigniew Jędrzejewski-Szmek
78bd12a05a localed: check for partially matching converted keymaps
If a user specifies multiple X11 keymaps, with a (at least the first
one) nonempty variant, and we don't match the whole combo, use
a converted keymap which includes the variant in preference to
the default, variantless, keymap.

E.g.: We would convert X11 config "layout=fr variant=mac" to "fr-mac",
but "layout=fr,us variant=mac," to "fr", because we don't have a
converted keymap which would match "fr,us", and we don't have a legacy
mapping for "fr,us". This is unexpected, and if we cannot match both,
it is still better to match the primary mapping and use "fr-mac".
2014-09-03 22:55:54 -04:00
Zbigniew Jędrzejewski-Szmek
81fd105a5f localed: introduce helper function to simplify matching 2014-09-03 22:55:52 -04:00
Zbigniew Jędrzejewski-Szmek
502f961425 localed: log locale/keymap changes in detail
Converting X11 to legacy keymaps and back is a fucking mess. Let's
make it at least possible to request detailed logs of what is being
changed and why (LOG_DEBUG level).

At LOG_INFO level, we would log the requested change of X11 or console
keymap, but not the resulting change after conversion to console or X11.
Make sure that every change of configuration on disk has a matching
line in the logs.
2014-09-03 22:55:16 -04:00
Zbigniew Jędrzejewski-Szmek
af76d302c1 localed: remove free_and_copy
It was mostly a duplicate of free_and_strdup().
2014-09-03 22:53:23 -04:00
Zbigniew Jędrzejewski-Szmek
28efac0d37 localed: double free in error path and modernization
Very unlikely to trigger, but in principle strv_free
could be called twice: once explictly, and once from cleanup.
2014-09-03 14:47:02 -04:00
Umut Tezduyar Lindskog
4df5c00b6e build-sys: configure option to disable hibernation 2014-09-03 19:40:51 +02:00
Lennart Poettering
2915a7bdc5 man: two fixes, reported on irc by 'wget' 2014-09-03 19:31:22 +02:00
Lennart Poettering
533bb267f1 update TODO 2014-09-03 19:02:18 +02:00
Lennart Poettering
6dc2852c64 base-file-system: always generate error messages locally
Functions either should generate error messages for everything they do
themselves, or for nothing and let the caller do it. But they certainly
shouldn't generate errors for some messages but not for others. Since
the function in this case is one that generates messages on its own, it
really should do that for everything, not just for some things, hence.
2014-09-03 19:00:24 +02:00
Lukas Nykryn
64e84dbb14 update TODO
Yum was creating <container>/var/run/yum.pid and hence this directory
was created before filesystem package could create the symlink
/var/run -> /run.
This should be now fixed in yum.
2014-09-03 14:03:14 +02:00
Harald Hoyer
f3b8fbb1da initrd-parse-etc.service: ignore return code of daemon-reload
It seems the return code of systemctl daemon-reload can be !=0 in some
circumstances, which causes a failure of the unit and breaks booting in
the initrd.
2014-09-03 13:28:31 +02:00
Harald Hoyer
6f4f8056d3 base_filesystem_create: do not try to create "/root" if it exists
The check, if the directory/file already exists is only executed, if
there is a symlink target specified. In case of "/root", there is none,
so it is unconditionally tried to create the directory.

In case of a readonly filesystem, errno != EEXIST, but errno == EROFS,
so base_filesystem_create() and switch_root does not succeed.

This patch checks for existance not only in the symlink case.
2014-09-03 13:26:27 +02:00
Zbigniew Jędrzejewski-Szmek
a7a0912a36 man: fix file extension in udev rules example
https://bugzilla.redhat.com/show_bug.cgi?id=634736
2014-09-02 19:37:04 -04:00
Kay Sievers
ab4df227d4 Revert "timesyncd: remove retry_timer logic which is covered by the server timeout"
This reverts commit 665c6a9eab.

On Tue, Sep 2, 2014 at 3:17 PM, Miroslav Lichvar <mlichvar@redhat.com> wrote:
>
> With the other patch allowing missed replies included it's now getting
> stuck as there is no timer to send the 2nd and 3rd request.
2014-09-02 15:29:15 +02:00
Kay Sievers
80cd2606b9 timesyncd: don't reset polling interval when reselecting server
Original patch from: Miroslav Lichvar <mlichvar@redhat.com>
2014-09-02 14:33:59 +02:00
Miroslav Lichvar
e8206972be timesyncd: allow two missed replies before reselecting server
After receiving a reply from the server, allow two missed replies before
switching to another server to avoid unnecessary clock hopping when
packets are getting lost in the network.
2014-09-02 14:29:51 +02:00
Kay Sievers
665c6a9eab timesyncd: remove retry_timer logic which is covered by the server timeout 2014-09-02 14:27:34 +02:00
Miroslav Lichvar
63463bf091 timesyncd: wait before reconnecting to first server
When all servers are exhausted, wait for one poll interval before trying
to connect again to the first server in the list. Also, keep increasing
the polling interval to make sure a client not getting any valid replies
will not send requests to any server more frequently than is allowed by
the maximum polling interval.
2014-09-02 13:34:16 +02:00
Tom Gundersen
cedc611207 sd-rtnl: don't assign to unused variable
Reported by Thomas H.P. Andersen <phomes@gmail.com>.
2014-09-01 22:59:52 +02:00
Zbigniew Jędrzejewski-Szmek
70e7d754dd rules: remove firmware loading rules
blueness> poettering, was there a reason for not removing
          50-firmware.rules when you nuked userland firmware
          loading?

Followup for v216-119-gbe2ea723b1.
2014-09-01 12:55:23 -04:00
David Herrmann
b12e56156e login: simplify controller handling
Simplify the way we handler session-controllers and fix several
shortcomings:
 * send ReleaseDevice() signals on forced session takeover
 * fix mem-leaks for busnames in case VT preparation fails (non-critical)
 * avoid passing pre-allocated names to helpers
2014-09-01 14:04:44 +02:00
Thomas Hindoe Paaboel Andersen
13f493dc9a login: fix mem leak 2014-08-31 23:41:10 +02:00
Thomas Hindoe Paaboel Andersen
9e60277835 config-parser: fix mem leak 2014-08-31 23:25:34 +02:00