summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2015-07-15sd-bus: fix object tree to be deeper than 2 levelsDavid Herrmann1-1/+1
So right now our object-tree is limited to 2 levels at most ('/' and '/foo/...../bar'). We never link any intermediate levels, even though that was clearly the plan. Fix the bus_node_allocate() helper to actually link all intermediate nodes, too, not just the root node. This fixes a simple inverse ptr-diff bug. The downside of this fix is that we clearly never tested (nor used) the object tree in any way. The only reason that the introspection works is that our enumerators shortcut the object tree. Lets see whether that code actually works.. Thanks to: Nathaniel McCallum <nathaniel@themccallums.org> ..for reporting this. See #524 for an actual example code.
2015-07-15sd-device: never return NULL+0David Herrmann1-0/+8
It is highly confusing if a getter function returns 0, but the value is set to NULL. This, right now, triggers assertions as code relies on the returned values to be non-NULL. Like with sd-bus-creds and friends, return 0 only if a value is actually available. Discussed with Tom, and actually fixes real bugs as in #512.
2015-07-15sd-boot: ignore missing /etc/machine-idDavid Herrmann1-1/+1
If /etc/machine-id is missing (eg., gold images), we should not fail installing sd-boot. This is a perfectly fine use-case and we should simply skip installing the default loader config in that case.
2015-07-14basic: util - fix memleak on error in unbase64mem()Tom Gundersen1-2/+2
2015-07-14Merge pull request #538 from mischief/multiple-routersTom Gundersen1-1/+2
sd-dhcp-lease: fix handling of multiple routers We only support one router, but in case more than one is given, we now ignore subsequent ones, rather than fall over.
2015-07-14Merge pull request #586 from teg/resolved-rrs-3Daniel Mack3-10/+104
resolved: minor improvements to RR handling
2015-07-14resolved: improve printing of unknown RRsTom Gundersen1-5/+5
This implements the recommendations from RFC3597.
2015-07-14Merge pull request #585 from teg/resolved-harden-2Daniel Mack11-153/+229
resolved: harden
2015-07-14Merge commit 'refs/pull/436/head' of https://github.com/systemd/systemdDavid Herrmann2-16/+34
This merges: sd-netlink: respect attribute type flags ..fixing a conflict due to a typo fix.
2015-07-14resolved: rr - add DS supportTom Gundersen3-0/+70
Needed for DNSSEC.
2015-07-14resolved: rr - print formated timestamps in RRSIGTom Gundersen1-3/+27
2015-07-14resolved: use one UDP socket per transactionTom Gundersen6-104/+107
We used to have one global socket, use one per transaction instead. This has the side-effect of giving us a random UDP port per transaction, and hence increasing the entropy and making cache poisoining significantly harder to achieve. We still reuse the same port number for packets belonging to the same transaction (resent packets).
2015-07-14resolved: implement RFC5452Tom Gundersen1-3/+13
This improves the resilience against cache poisoning by being stricter about only accepting responses that match precisely the requst they are in reply to. It should be noted that we still only use one port (which is picked at random), rather than one port for each transaction. Port randomization would improve things further, but is not required by the RFC.
2015-07-14resolved: pin the server used in a transactionTom Gundersen5-16/+34
We want to discover information about the server and use that in when crafting packets to be resent.
2015-07-14Merge pull request #530 from dvdhrm/resolve-host-dbusDaniel Mack1-4/+0
resolve-host: enable dbus-activation
2015-07-14resolved: reference count the dns serversTom Gundersen4-31/+73
We want to reference the servers from their active transactions, so make sure they stay around as long as the transaction does.
2015-07-14resolved: packet - ensure there is space for IP+UDP headersTom Gundersen3-3/+6
Currently we only make sure our links can handle the size of the payload witohut taking the headers into account.
2015-07-14networkd: tap add support for vnet_hdrSusant Sahani3-0/+5
This patch adds support to configure IFF_VNET_HDR flag for a tap device. It allows whether sending and receiving large pass larger (GSO) packets. This greatly increases the achievable throughput.
2015-07-14resolved: rr - print DNSKEY and RRSIG in base64Tom Gundersen1-2/+2
As mandated by RFC4034.
2015-07-13resolved: make LLMNR checks conditionalDaniel Mack1-14/+28
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-13resolved: separate LLMNR specific header bitsDaniel Mack3-7/+15
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-13resolved: use a #define for LLMNR portDaniel Mack4-6/+9
De-duplicate some magic numbers.
2015-07-13resolved: move LLMNR related functions into separate fileDaniel Mack5-451/+507
2015-07-12dhcp: add support for vendor specific DHCP optionBeniamino Galvani4-3/+58
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-12basic: util - add base64mem() function similar to hexmem()Tom Gundersen3-0/+279
This implements RFC4648 for a slightly more compact representation of binary data compared to hex (6 bits per character rather than 4).
2015-07-12basic: util - fix errorhandling in unhexmem()Tom Gundersen5-20/+60
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-12Merge pull request #558 from poettering/logind-bus-policyTom Gundersen2-2/+74
logind: bring bus policy up-to-date
2015-07-11sd-dhcp-lease: fix handling of multiple routersNick Owens1-1/+2
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-11logind: some firmware implementations remove OsIndications if it is unsetLennart Poettering1-1/+13
We shouldn't fall over that, and just assume it is 0 in this case. Fixes #499.
2015-07-11logind: bring bus policy up-to-dateLennart Poettering2-2/+74
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-11Merge pull request #551 from poettering/fopen-temporary-noerrnoDaniel Mack1-1/+1
util: make sure we don't clobber errno in error path
2015-07-11Merge pull request #552 from poettering/path-is-mount-point-simplificationDaniel Mack1-2/+4
basic: simplify path_is_mount_point() a bit
2015-07-11basic: simplify path_is_mount_point() a bitLennart Poettering1-2/+4
This removes two uses of the ternary operator.
2015-07-11util: make sure we don't clobber errno in error pathLennart Poettering1-1/+1
2015-07-10Merge pull request #548 from vcaputo/fix_path_state_debug_msgDaniel Mack1-1/+1
core: include unit in path state transition debug logging.
2015-07-10core: include unit in path state transition debug logging.Vito Caputo1-1/+1
2015-07-10logind: rename 'pos' to 'position'David Herrmann3-15/+15
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-10logind: allow greeters to take over VTsDavid Herrmann1-2/+5
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-09Merge pull request #531 from dvdhrm/boot-buildidLennart Poettering1-5/+16
boot: use BUILD_ID if VERSION_ID is not available
2015-07-09Merge pull request #532 from dvdhrm/bus-managed-rootLennart Poettering2-2/+5
sd-bus: include queried path in GetManagedObjects
2015-07-09basic/util.c fopen_temporary(): close fd if failedcee11-0/+1
2015-07-09Merge pull request #529 from dvdhrm/bus-slot-descriptionLennart Poettering2-2/+2
sd-bus: sd_bus_slot_get_description() should return const strings
2015-07-09sd-bus: include queried path in GetManagedObjectsDavid Herrmann2-2/+5
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-09boot: use BUILD_ID if VERSION_ID is not presentDavid Herrmann1-2/+10
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-09boot: fix memleaks in os-release parserDavid Herrmann1-3/+6
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-09resolve-host: enable dbus-activationDavid Herrmann1-4/+0
Right now, systemd-resolve-host fails if resolved is not running. However, resolved supports bus-activation (at least on kdbus) just fine. Enable this so we can use resolve-host at all times. This was disabled right from the beginning, without any comment why.
2015-07-09sd-bus: sd_bus_slot_get_description() should return const stringsDavid Herrmann2-2/+2
All other *_get_description() functions use 'const char**', so make sure sd_bus_slot_get_description() does the same. This changes API, but ABI stays stable. I think this is fine, but I wouldn't mind bumping SONAME. Reported in #528.
2015-07-09Reload manager defaults at daemon-reloadThomas Blume1-14/+28
"systemctl daemon-reload" should also update the manager defaults from /etc/systemd/system.conf. For details, see: http://lists.freedesktop.org/archives/systemd-devel/2015-June/033062.html Amended to use manager_set_defaults() as common function.
2015-07-08machine: remove unused variablesThomas Hindoe Paaboel Andersen1-2/+0
2015-07-08Merge pull request #516 from utezduyar/consistent-get-callback-returnLennart Poettering3-20/+4
property callback returns are consistent