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

21374 Commits

Author SHA1 Message Date
Tom Gundersen
ff89f8b917 Merge pull request #576 from zonque/resolved-cleanups
resolved: assorted cleanups
2015-07-13 19:30:30 +02:00
Daniel Mack
818ef443f0 resolved: make LLMNR checks conditional
Make all LLMNR related packet inspections conditional to p->protocol.
Use switch-case statements while at it, which will make future additions
more readable.
2015-07-13 11:28:30 -04:00
Daniel Mack
8b757a3861 resolved: separate LLMNR specific header bits
The C and T bits in the DNS packet header definitions are specific to LLMNR.
In regular DNS, they are called AA and RD instead. Reflect that by calling
the macros accordingly, and alias LLMNR specific macros.

While at it, define RA, AD and CD getters as well.
2015-07-13 11:28:29 -04:00
Daniel Mack
22a37591ed resolved: use a #define for LLMNR port
De-duplicate some magic numbers.
2015-07-13 11:28:29 -04:00
Daniel Mack
5f402ae84b resolved: move LLMNR related functions into separate file 2015-07-13 11:28:29 -04:00
Daniel Mack
f7c735017e Merge pull request #573 from cmacq2/html-man-fixes
Reproducible ID/name values for auto generated anchors in HTML output
2015-07-13 10:46:26 -04:00
Johan Ouwerkerk
d77c25b116 doc: configure docbook stylesheet to generate reproducible IDs
This makes auto generated anchor tags in HTML output reproducible.
2015-07-13 16:30:30 +02:00
Beniamino Galvani
e43a8393ea dhcp: add support for vendor specific DHCP option
This adds support for option 43 (Vendor Specific Information) to
libsystemd-network DHCP code. The option carries an opaque object of n
octets, interpreted by vendor-specific code on the clients and
servers.

[@zonque: adopted to new unhexmem() API]
2015-07-12 14:26:32 -04:00
Daniel Mack
89a2faeed5 Merge pull request #566 from teg/util-base64-2
util: add base64 handling
2015-07-12 14:10:39 -04:00
Tom Gundersen
13a5d76b32 basic: util - add base64mem() function similar to hexmem()
This implements RFC4648 for a slightly more compact representation of
binary data compared to hex (6 bits per character rather than 4).
2015-07-12 19:24:14 +02:00
Tom Gundersen
30494563f2 basic: util - fix errorhandling in unhexmem()
We were ignoring failures from unhexchar, which meant that invalid
hex characters were being turned into garbage rather than the string
rejected.

Fix this by making unhexmem return an error code, also change the API
slightly, to return the size of the returned memory, reflecting the
fact that the memory is a binary blob,and not a string.

For convenience, still append a trailing NULL byte to the returned
memory (not included in the returned size), allowing callers to
treat it as a string without doing a second copy.
2015-07-12 19:11:34 +02:00
Daniel Mack
9e400131f7 Merge pull request #561 from cmacq2/html-man-fixes
Html man fixes
2015-07-12 11:33:27 -04:00
Tom Gundersen
39fced0162 Merge pull request #558 from poettering/logind-bus-policy
logind: bring bus policy up-to-date
2015-07-12 11:44:45 +02:00
Tom Gundersen
72c39d1afe Merge pull request #556 from poettering/sd-bus-life-cycle
man: go further into details regarding life-cycle of default bus conn…
2015-07-12 11:44:14 +02:00
Tom Gundersen
fdbbf0eeda Merge pull request #554 from poettering/ntp-pool
build-sys: warn if people don't change the default NTP servers when b…
2015-07-12 11:43:51 +02:00
Tom Gundersen
e239b628e0 Merge pull request #553 from poettering/rt-group-sched
README: document that RT group sched should be turned off
2015-07-12 11:43:10 +02:00
Johan Ouwerkerk
aa1169774b Use a top-to-bottom numbering scheme for generating ids of subheadings and terms.
This scheme fixes permalinks to distinguish between items that would previously have the same ID attribute.

Where possible the generated ID values are the same as those generated with the previous versions of the stylesheet
to retain backwards compatibility with published links.

As a side effect of the changes xsltproc should no longer complain about duplicate IDs during build.
2015-07-12 08:30:07 +02:00
Nick Owens
a05185279b sd-dhcp-lease: fix handling of multiple routers
currently if a dhcp server sends more than one router, sd-dhcp-lease
does not copy the ip because it assumes it will only ever be 4 bytes. a
dhcp server could send more than one ip in the router list, so we should
copy the first one and ignore the rest of the bytes.
2015-07-11 15:37:01 -07:00
Lennart Poettering
08abe30e78 Merge pull request #559 from poettering/logind-osindications-missing
logind: some firmware implementations remove OsIndications if it is u…
2015-07-11 19:32:58 -03:00
Lennart Poettering
6b62bbbc7b logind: some firmware implementations remove OsIndications if it is unset
We shouldn't fall over that, and just assume it is 0 in this case.

Fixes #499.
2015-07-11 17:32:25 -03:00
Lennart Poettering
559b5cc273 logind: bring bus policy up-to-date
A while back we opened up all of logind's bus calls to unprivileged
users, via PK. However, the dbus1 policy wasn't updated accordingly.

With this change, the dbus1 policy is opened up for all bus calls that
should be available to unprivileged clients.

(also rearranges some calls in the vtable, to make more sense, and be in
line with the order in the bus policy file)

Fixes #471.
2015-07-11 17:03:42 -03:00
Lennart Poettering
b898f9bd7e man: go further into details regarding life-cycle of default bus connection objects
This extends on PR #542.
2015-07-11 16:11:45 -03:00
Lennart Poettering
f4e74be185 README: document that RT group sched should be turned off
https://bugs.freedesktop.org/show_bug.cgi?id=87570
https://bugzilla.redhat.com/show_bug.cgi?id=1229700
2015-07-11 14:49:22 -03:00
Daniel Mack
6f9d58d87f Merge pull request #551 from poettering/fopen-temporary-noerrno
util: make sure we don't clobber errno in error path
2015-07-11 13:35:50 -04:00
Daniel Mack
0dc705bee2 Merge pull request #552 from poettering/path-is-mount-point-simplification
basic: simplify path_is_mount_point() a bit
2015-07-11 13:35:24 -04:00
Lennart Poettering
2ed3de9cc4 build-sys: warn if people don't change the default NTP servers when building systemd
Also, explain the situation in the docs.

Relates to #437
2015-07-11 14:24:29 -03:00
Lennart Poettering
10c03e9e82 basic: simplify path_is_mount_point() a bit
This removes two uses of the ternary operator.
2015-07-11 14:20:44 -03:00
Lennart Poettering
64ee7ab462 util: make sure we don't clobber errno in error path 2015-07-11 14:19:36 -03:00
Lennart Poettering
49aa7ab6e1 Merge pull request #535 from martinpitt/master
units: emergency.service: wait for plymouth to shut down
2015-07-11 12:17:39 -03:00
Susant Sahani
d88ba7f02e TODO: remove DHCP override hostname 2015-07-11 09:27:28 +05:30
Susant Sahani
1adc5d0bcd man: add manual for DHCP override hostname 2015-07-11 09:26:55 +05:30
Daniel Mack
f2db89c99c Merge pull request #548 from vcaputo/fix_path_state_debug_msg
core: include unit in path state transition debug logging.
2015-07-10 20:42:32 -04:00
Vito Caputo
3541bf1f07 core: include unit in path state transition debug logging. 2015-07-10 16:40:46 -07:00
Daniel Mack
537c1656c8 Merge pull request #542 from utezduyar/sd_unref-might-keep-bus-alive
man: sd_unref does not necessarily free the bus
2015-07-10 11:23:18 -04:00
David Herrmann
e6494a07cb logind: rename 'pos' to 'position'
Spell out the proper name. Use 'pos' over 'position', and also update the
logind state file to do the same. Note that this breaks live updates.
However, we only save 'POSITION' on non-seat0, so this shouldn't bother
anyone for real. If you run multi-seat setups, you better restart a
machine on updates, anyway.
2015-07-10 15:25:44 +02:00
David Herrmann
cc85d56245 logind: allow greeters to take over VTs
Make sure a greeter can forcefully spawn a session on a VT that is
in-use. A recent patch prevented this (this used to be possible for all
session types) as it is highly fragile. However, as it turns out,
greeters seem to rely on that feature. Therefore, make sure we allow it
explicitly for greeters.
2015-07-10 15:25:43 +02:00
Umut Tezduyar Lindskog
db03761e16 man: sd_unref does not necessarily free the bus
Document that sd_unref() does not necessarily free the bus,
even if no part of the program explicitly refs it, due to
the queued messages.
2015-07-10 14:32:02 +02:00
Susant Sahani
a7d0ef446e networkd: DHCP override hostname
This patch enhances the DHCP client to send the hostname
reference
http://lists.freedesktop.org/archives/systemd-devel/2014-July/021550.html

Tested with
Example conf:

[Match]
Name=eth1

[Network]
DHCP=v4

[DHCP]
SendHostname=true
Hostname=test
2015-07-10 15:42:27 +05:30
Martin Pitt
ac59f0c12c units: emergency.service: wait for plymouth to shut down
Merely calling "plymouth quit" isn't sufficient, as plymouth needs some time to
shut down. This needs plymouth --wait (which is a no-op when it's not running).

Fixes invisible emergency shell with plymouth running endlessly.

https://launchpad.net/bugs/1471258
2015-07-10 05:43:52 +02:00
Lennart Poettering
8b258a645a tmpfiles: don't recursively descend into journal directories in /var
Do so only in /run. We shouldn't alter ACLs for existing files in /var,
but only for new files. If the admin made changes to the ACLs they
shouls stay in place.

We should still do recursive ACL changes for files in /run, since those
are not persistent, and will hence lack ACLs on every boot.

Also, /var/log/journal might be quit large, /run/log/journal is usually
not, hence we should avoid the recursive descending on /var, but not on
/run.

Fixes #534
2015-07-09 18:46:01 -03:00
Lennart Poettering
35914919a4 update TODO 2015-07-09 14:50:40 -03:00
Lennart Poettering
c01ff965b4 nss-mymachines: map userns users of containers to real user names
Given a container "foo", that maps user id $UID to container user, using
user namespaces, this NSS module extenstion will now map the $UID to a
name "vu-foo-$TUID" for the translated UID $UID.

Similar, userns groups are mapped to "vg-foo-$TGID" for translated GIDs
of $GID.

This simple change should make userns users more discoverable. Also,
given that many tools like "adduser" check NSS before allocating a UID,
should lower the chance of UID range conflicts between tools.
2015-07-09 14:46:20 -03:00
Lennart Poettering
43694a8cc7 Merge pull request #531 from dvdhrm/boot-buildid
boot: use BUILD_ID if VERSION_ID is not available
2015-07-09 11:50:03 -03:00
Lennart Poettering
0aa7a4c225 Merge pull request #532 from dvdhrm/bus-managed-root
sd-bus: include queried path in GetManagedObjects
2015-07-09 11:47:55 -03:00
cee1
ac5213569c basic/util.c fopen_temporary(): close fd if failed 2015-07-09 10:41:23 -04:00
Lennart Poettering
d711ea2b95 Merge pull request #529 from dvdhrm/bus-slot-description
sd-bus: sd_bus_slot_get_description() should return const strings
2015-07-09 11:38:11 -03:00
Daniel Mack
254214bfcd Merge pull request #426 from tblume/reload-system-conf-at-daemon-reload
Reload manager defaults at daemon-reload
2015-07-09 10:01:06 -04:00
David Herrmann
92d16a53e3 sd-bus: include queried path in GetManagedObjects
If GetManagedObjects is called on /foo/bar, then it should also include
the object /foo/bar, if it exists. Right now, we only include objects
underneath /foo/bar/.

This follows the behavior of existing dbus implementations.

Obsoletes #527 and fixes #525. Reported by: Nathaniel McCallum
2015-07-09 13:30:16 +02:00
David Herrmann
59658d1958 boot: use BUILD_ID if VERSION_ID is not present
According to os-release(5), VERSION_ID is not mandatory and BUILD_ID only
needs to be unique underneath VERSION_ID. Therefore, assuming a missing
VERSION_ID field means 'empty', we can rely on BUILD_ID to be unique.

Use BUILD_ID if VERSION_ID is not present. This way, rolling-release
distros can still provide a proper os-release entry without crafting
random VERSION_ID strings.

This fixes #186.
2015-07-09 13:07:27 +02:00
David Herrmann
d8c64b7f90 boot: fix memleaks in os-release parser
There is no guarantee that the os-release section contains each key only
once, nor any guarantee that all keys are present. Make sure we properly
free memory in both cases.

Not that it matters much, as we're short-living, anyway. But correct code
is always nicer to read..
2015-07-09 13:02:54 +02:00