1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

22444 Commits

Author SHA1 Message Date
Evgeny Vereshchagin
79af4b6c1c shell-completion: cgtop bash completion: -n,--iterations,-d,--delay require arg 2015-09-21 17:09:40 +00:00
Lennart Poettering
de45f28e09 Merge pull request #1249 from lnykryn/sysv-symlinks
sysv-generator: follow symlinks in /etc/rc.d/init.d
2015-09-21 19:00:28 +02:00
Lennart Poettering
acf0813d21 Merge pull request #1321 from evverx/cgtop-recurisive-option
shell-completion: update systemd-cgtop bash completion: --recursive
2015-09-21 18:59:38 +02:00
Evgeny Vereshchagin
73b73b762c shell-completion: update systemd-cgtop bash completion: --recursive 2015-09-21 16:54:58 +00:00
Lennart Poettering
f1f679c5b6 Merge pull request #1320 from ronnychevalier/rc/core_fix_group_ownership
core: fix group ownership when Group is set
2015-09-21 18:21:53 +02:00
Ronny Chevalier
5bc7452b32 core: fix group ownership when Group is set
When Group is set in the unit, the runtime directories are owned by
this group and not the default group of the user (same for cgroup paths
and standard outputs)

Fix #1231
2015-09-21 18:14:44 +02:00
Ronny Chevalier
cc3ddc851f test-execute: add tests for RuntimeDirectory 2015-09-21 18:14:44 +02:00
Lennart Poettering
35bb18851a Merge pull request #1315 from systemd-mailing-devs/1442692671-10134-1-git-send-email-dev@benjarobin.fr
systemd-notify: Always pass a valid pid to sd_pid_notify
2015-09-21 18:10:49 +02:00
Alban Crequy
0c5c00f6ef Merge pull request #1318 from alban/alban/container-exit-code4
containers: systemd exits with non-zero code
2015-09-21 17:51:21 +02:00
Alban Crequy
287419c119 containers: systemd exits with non-zero code
When a systemd service running in a container exits with a non-zero
code, it can be useful to terminate the container immediately and get
the exit code back to the host, when systemd-nspawn returns. This was
not possible to do. This patch adds the following to make it possible:

- Add a read-only "ExitCode" property on PID 1's "Manager" bus object.
  By default, it is 0 so the behaviour stays the same as previously.
- Add a method "SetExitCode" on the same object. The method fails when
  called on baremetal: it is only allowed in containers or in user
  session.
- Add support in systemctl to call "systemctl exit 42". It reuses the
  existing code for user session.
- Add exit.target and systemd-exit.service to the system instance.
- Change main() to actually call systemd-shutdown to exit() with the
  correct value.
- Add verb 'exit' in systemd-shutdown with parameter --exit-code
- Update systemctl manpage.

I used the following to test it:

| $ sudo rkt --debug --insecure-skip-verify run \
|            --mds-register=false --local docker://busybox \
|            --exec=/bin/chroot -- /proc/1/root \
|            systemctl --force exit 42
| ...
| Container rkt-895a0cba-5c66-4fa5-831c-e3f8ddc5810d failed with error code 42.
| $ echo $?
| 42

Fixes https://github.com/systemd/systemd/issues/1290
2015-09-21 17:32:45 +02:00
Ronny Chevalier
5625be76c7 test-ipv4ll: use unsigned instead of an array for a seed
ipv4ll use an unsigned instead of an uint8_t array. Hence, use an
unsigned seed instead of declaring an array and then dereferencing it
later.
2015-09-21 16:52:52 +02:00
Ronny Chevalier
56065db421 sd-ipv4ll: do not assert_return when seed == 0
Now that seed is an unsigned and not an array, we do not need to assert
on it.
2015-09-21 16:52:52 +02:00
Tom Gundersen
a1b7a5bbdd Merge pull request #1288 from teg/ipv4acd-3
sd-ipv4acd: split out as separate library from sd-ipv4ll
2015-09-21 15:13:18 +02:00
Lennart Poettering
26ce779618 Merge pull request #1311 from jsynacek/kill-errors-v2
core: extend KillUnit() to return error when no unit was killed
2015-09-21 15:04:23 +02:00
Lennart Poettering
213634e476 Merge pull request #1314 from evverx/cgtop-machine
cgtop: add -M/--machine
2015-09-21 14:55:48 +02:00
Evgeny Vereshchagin
96a6426f30 cgtop: add -M/--machine 2015-09-21 12:04:45 +00:00
Jan Synacek
ac5e3a505e core: extend KillUnit() to return error when no unit was killed 2015-09-21 10:05:49 +02:00
Lennart Poettering
8c710f3ce6 Merge pull request #1292 from gebi/resolve-specifier-in-runtime-directory
load-fragment: resolve specifiers in RuntimeDirectory
2015-09-20 19:15:04 +02:00
Lennart Poettering
4b8b34855e Merge pull request #1305 from mrkara/master
[l10n] Added Turkish translation
2015-09-20 19:14:37 +02:00
Lennart Poettering
570b3e835e Merge pull request #1309 from nazgul77/master
[l10n] Update German translation
2015-09-20 19:14:09 +02:00
nazgul77
5252cfb433 Update German translation 2015-09-20 14:54:34 +02:00
Benjamin Robin
9de009a9f5 systemd-notify: Always pass a valid pid to sd_pid_notify
If the option --pid was used, take the pid from this option, unless take
the parend pid. Using 0 as pid (ucred of systemd-notify) will result 99% of the
time in a failure with this error: "Cannot find unit for notify message of PID"

Shouldn't we use always the ppid, since the MAINPID is something else ?

Signed-off-by: Benjamin Robin <dev@benjarobin.fr>
2015-09-20 04:02:20 +02:00
Muhammet Kara
7c54a17a10 [l10n] Added Turkish translation 2015-09-19 08:35:32 +03:00
Lennart Poettering
dcc26ae383 Merge pull request #1303 from evverx/show-controller
cgls: show controller without args too
2015-09-19 01:49:25 +02:00
Evgeny Vereshchagin
58033c91e3 cgls: show controller without args too 2015-09-18 18:14:38 +00:00
Tom Gundersen
7b713b81c2 sd-ipv4{acd,ll}: add simple test programs
These programs should be run manually, typically two instances on a
veth pair to check conflict detection.

Both test programs take the ifname as input, the ACD also takes the
IP address to check, whereas LL (optionally) takes the seed, which
determines the sequence of IP addresses to try.
2015-09-18 15:14:43 +02:00
Tom Gundersen
e3dca0089b sd-ipv4acd: introduce new library split out from sd-ipv4ll
This splits the Address Conflict Detection out of the Link Local
library so that we can reuse it for DHCP and static addresses in
the future.

Implements RFC5227.
2015-09-18 15:14:43 +02:00
Tom Gundersen
6af9144f5f sd-ipv4ll: simplify conflict handling
Use stop() and start() to drop some pulicate code.
2015-09-18 15:14:43 +02:00
Tom Gundersen
b45e4eb679 sd-ipv4ll: rework callbacks
Firstly, no longer distinguish between STOP and INIT states.

Secondly, do not trigger STOP events when calls to sd_ipv4ll_*() fail. The
caller is the one who would receive the event and will already know that the
call to sd_ipv4ll_*() has failed, so it is redundant.

STOP events will now only be triggered by calling sd_ipv4ll_stop() explicitly
or by some internal error in the library triggered by receiving a packet or
an expiring timeout (i.e., any error that would otherwise not be reported
back to the consumer of the library).

Lastly, follow CODING_STYLE and always return NULL on unref. Protect from
objects being destroyed in callbacks accordingly.
2015-09-18 15:14:43 +02:00
Tom Gundersen
5707940ed3 sd-ipv4ll: don't allow changing MAC address whilst running
This requires the caller to stop and restart the statemachine if they want to
change the MAC address.
2015-09-18 15:14:42 +02:00
Tom Gundersen
94a355a130 sd-ipv4ll: code cleanups
Simplify timeout handling.
2015-09-18 15:14:42 +02:00
Tom Gundersen
028e0b2056 sd-ipv4ll: remove duplicate packet verification
Most packets are filtered out by the BPF, so only check for the parts that may
actually differ.
2015-09-18 15:14:42 +02:00
Tom Gundersen
25d6213b43 sd-ipv4ll: minor cleanups 2015-09-18 15:14:42 +02:00
Tom Gundersen
b26f7e8ec9 sd-ipv4ll: split out on_conflict() from on_packet() 2015-09-18 15:14:42 +02:00
Tom Gundersen
8e5787b5e0 sd-ipv4ll: split run_state_machine() into on_packet() and on_timeout()
Simplify the code a bit, no functional change.
2015-09-18 15:14:42 +02:00
Tom Gundersen
996d16975b sd-ipv4ll: filter out unwanted ARP packets in the kernel
We currently process every ARP packet, but we should only care about the ones
relating to our IP address.

Also rename ipv4ll helpers to apr-utils.[ch], and rework the helpers a bit.
2015-09-18 15:14:42 +02:00
Daniel Mack
2b2eac39e8 Merge pull request #1297 from NoXPhasma/g9fix
G9/G9x change to default resolutions
2015-09-18 14:53:35 +02:00
NoXPhasma
7703518c20 G9/G9x change to default resolutions 2015-09-18 14:28:16 +02:00
Lennart Poettering
16a012b1d0 Merge pull request #1241 from ssahani/net
networkd: add support for accept ra
2015-09-18 13:04:50 +02:00
Daniel Mack
080986a0b6 Merge pull request #1293 from NoXPhasma/G9
Add G9 and G9x [Call of Duty MW3 Edition] to hwdb
2015-09-18 12:17:52 +02:00
NoXPhasma
29264ff382 Add G9 and G9x [Call of Duty MW3 Edition] 2015-09-18 11:55:38 +02:00
Michael Gebetsroither
9b5864d9d9 load-fragment: resolve specifiers in RuntimeDirectory 2015-09-18 11:39:03 +02:00
Martin Pitt
10f4371fd7 Revert "keymap: Add Corsair K70"
This breaks the same vendor/product ID with the German keyboard layout. As this
is a hack around some weird keyboard driver bug, let's revert until this is
understood better.

See https://github.com/systemd/systemd/issues/1243

This reverts commit a2aa71a954.
2015-09-17 16:10:19 +02:00
Daniel Mack
83563d169c Merge pull request #1285 from michich/fix-dbus-fd-recv
sd-bus: correct size calculation in DBus fd receive
2015-09-17 00:05:58 +02:00
Michal Schmidt
a0f5ab70f3 sd-bus: correct size calculation in DBus fd receive
The size of the allocated array for received file descriptors was
incorrectly calculated. This did not matter when a single file
descriptor was received, but for more descriptors the allocation was
insufficient.
2015-09-16 23:53:32 +02:00
Lennart Poettering
5ee50f525f Merge pull request #1269 from zonque/netcls
cgroup: add support for net_cls controllers
2015-09-16 20:59:31 +02:00
Daniel Mack
7ed1f63d50 Merge pull request #1279 from teg/resolved-cname-cache
resolevd: cache - improve CNAME handling
2015-09-16 17:59:11 +02:00
Tom Gundersen
5eefe544ef resolved: cache - cache what we can of negative redirect chains
When a NXDATA or a NODATA response is received for an alias it may
include CNAME records from the redirect chain. We should cache the
response for each of these names to avoid needless roundtrips in
the future.

It is not sufficient to do the negative caching only for the
canonical name, as the included redirection chain is not guaranteed
to be complete. In fact, only the final CNAME record from the chain
is guaranteed to be included.

We take care not to cache entries that redirects outside the current
zone, as the SOA will then not be valid.
2015-09-16 17:03:18 +02:00
Tom Gundersen
5643c00afe resolved: cache - handle CNAME redirection
CNAME records are special in the way they are treated by DNS servers,
and our cache should mimic that behavior: In case a domain name has an
alias, its CNAME record is returned in place of any other.

Our cache was not doing this despite caching the CNAME records, this
entailed needless lookups to re-resolve the CNAME.
2015-09-16 17:03:17 +02:00
Tom Gundersen
8e427d9be9 resolved: cache - only allow putting a single question key at a time
Only one key is allowed per transaction now, so let's simplify things and only allow putting
one question key into the cache at a time.
2015-09-16 17:03:17 +02:00