summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-07-20Merge pull request #549 from ssahani/dhcpTom Gundersen
networkd: allow hostname override
2015-07-20Merge pull request #626 from ↵Daniel Mack
systemd-mailing-devs/1437135133-9646-2-git-send-email-vivenzio.pagliari@nokia.com man: Typo fix in systemd.preset manpage
2015-07-19Merge pull request #614 from teg/bitmap-overflowDaniel Mack
basic: bitmap - complete fix for bitshift overflow
2015-07-17basic: bitmap - complete fix for bitshift overflowTom Gundersen
The bug found by David existed in several places, fix them all. Also extend the tests to cover these cases.
2015-07-17Typo fix in systemd.preset manpageVivenzio Pagliari
2015-07-17Merge pull request #611 from dvdhrm/bitmap-fixesTom Gundersen
Bitmap fixes
2015-07-17Merge pull request #607 from ssahani/vxlan1David Herrmann
networkd: move config parsers to specific header files
2015-07-17Merge pull request #610 from utezduyar/include-signal-headerDavid Herrmann
cgtop: include missing signal.h for sigwinch
2015-07-17bitmap: avoid 32bit integer overflow in shiftDavid Herrmann
We really must use 64bit integers to calculate long-long shifts. Otherwise, we will never get higher masks than 2^31.
2015-07-17bitmap: allow bitmap_iterate() on NULL bitmapDavid Herrmann
Make sure we properly treat NULL bitmaps as empty. Right now, we don't (which really looks like a typo).
2015-07-17cgtop: include missing signal.h for sigwinchUmut Tezduyar Lindskog
2015-07-16logind: never select closing sessions for a VTDavid Herrmann
If a session is in closing state (and already got rid of its VT), then never re-select it for that VT. There is no reason why we should grant something to a session that is already going away *AND* already got rid of exactly that.
2015-07-16build: add ./test-bitmap to .gitignoreDavid Herrmann
Make sure to ignore build files of Tom's recent test-bitmap addition.
2015-07-16logind: prefer new sessions over older ones on VT switchesDavid Herrmann
Our seat->positions[] array keeps track of the 'preferred' session on a VT. The only situation this is used, is to select the session to activate when a VT is activated. In the normal case, there's only one session per VT so the selection is trivial. Older greeters, however, implement take-overs when they start sessions on the same VT that the greeter ran on. We recently limited such take-overs to VTs where a greeter is running on, to force people to never share VTs in new code that is written. For legacy reasons, we need to be compatible to old greeters, though. Hence, we allow those greeters to implement take-over. In such take-overs, however, we should really make sure that the new sessions gets preferred over the old one under all circumstances. Hence, make sure we override the previous preferred session with a new session.
2015-07-16Merge pull request #605 from dvdhrm/test-bus-proxyTom Gundersen
sd-bus: add new test for NameAcquired via proxy/dbus-daemon
2015-07-16networkd: move config_parse_tunnel_addressSusant Sahani
move config_parse_tunnel_address from networkd.h to tunnel specific file networkd-netdev-tunnel.h
2015-07-16networkd: move config_parse_vxlan_group_addressSusant Sahani
move config_parse_vxlan_group_address from networkd.h to networkd-netdev-vxlan.h
2015-07-16sd-bus: add new test for NameAcquired via proxy/dbus-daemonDavid Herrmann
This adds test-bus-proxy which should be used to test correct behavior of systemd-bus-proxyd. The first test that was added is to verify we actually receive NameAcquired signals for ourselves on bus-connect.
2015-07-16Merge pull request #602 from teg/bitmap-iteratorDavid Herrmann
bitmap: use external iterator
2015-07-16sd-bus: properly match ID changesDavid Herrmann
If the caller does not specify arg1 for NameOwnerChanged matches, we really must take the ID from arg2 or arg3, if provided. They are guaranteed to be identical to arg1 if either is supplied, but there is no strict requiredment that arg1 is supplied. Hence, make sure to always take the more restrictive match. Otherwise, we install rather wide matches without anyone requiring them.
2015-07-16sd-bus: destination-matches cannot match NameOwnerChangedDavid Herrmann
Make sure we don't install NameOwnerChanged matches if the caller passed a destination='' match (except if it is the broadcast address). Per spec, all NameOwnerChanged signals are broadcasts. Only the NameLost/NameAcquired signals are unicasts, but those are never received through sd-bus. Instead, the bus-proxy synthesizes them and it already installs proper matches for them.
2015-07-16sd-bus: fix invalid stack access on test-bus-marshalDavid Herrmann
Make sure we actually parse "unsigned long long" if we encode a uint64_t. Otherwise, we will get random data from the stack.
2015-07-16bitmap: use external iteratorTom Gundersen
Reuse the Iterator object from hashmap.h and expose a similar API. This allows us to do { Iterator i; unsigned n; BITMAP_FOREACH(n, b, i) { Iterator j; unsigned m; BITMAP_FOREACH(m, b, j) { ... } } } without getting confused. Requested by David.
2015-07-16sd-bus: fix gvariant structure encodingDavid Herrmann
In gvariant, all fixed-size objects need to be sized a multiple of their alignment. If a structure has only fixed-size members, it is required to be fixed size itself. If you imagine a structure like (ty), you have an 8-byte member followed by an 1-byte member. Hence, the overall inner-size is 9. The alignment of the object is 8, though. Therefore, the specs mandates final padding after fixed-size structures, to make sure it's sized a multiple of its alignment (=> 16). On the gvariant decoder side, we already account for this in bus_gvariant_get_size(), as we apply overall padding to the size of the structure. Therefore, our decoder correctly skips such final padding when parsing fixed-size structure. On the gvariant encoder side, however, we don't account for this final padding. This patch fixes the structure and dict-entry encoders to properly place such padding at the end of non-uniform fixed-size structures. The problem can be easily seen by running: $ busctl --user monitor and $ busctl call --user org.freedesktop.systemd1 / org.foobar foobar "(ty)" 777 8 The monitor will fail to parse the message and print an error. With this patch applied, everything works fine again. This patch also adds a bunch of test-cases to force non-uniform structures with non-pre-aligned positions. Thanks to Jan Alexander Steffens <jan.steffens@gmail.com> for spotting this and narrowing it down to non-uniform gvariant structures. Fixes #597.
2015-07-15Merge pull request #588 from teg/resolved-nsecDaniel Mack
resolved: add basic NSEC and NSEC3 support
2015-07-15build: add convenience target 'build-sources'David Herrmann
This target allows to trigger a build of $(BUILT_SOURCES) manually. This is handy if you tend to use 'make systemd-foobar' to directly build a single binary. Those do not pull in $(BUILT_SOURCES), unfortunately. See automake docs for that.
2015-07-15sd-bus: fix object tree to be deeper than 2 levelsDavid Herrmann
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 Herrmann
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 Herrmann
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-14resolved: rr - add NSEC3 supportTom Gundersen
Needed for DNSSEC.
2015-07-14basic: util - add base32hexmem() function similar to hexmem()Tom Gundersen
This implements more of RFC4648.
2015-07-14Merge pull request #587 from teg/unbase64mem-memleakDaniel Mack
basic: util - fix memleak on error in unbase64mem()
2015-07-14resolved: rr - add NSEC supportTom Gundersen
Needed for DNSSEC.
2015-07-14basic: add a Bitmap implementationTom Gundersen
For when a Hashmap is overkill.
2015-07-14basic: util - fix memleak on error in unbase64mem()Tom Gundersen
2015-07-14Merge pull request #538 from mischief/multiple-routersTom Gundersen
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 Mack
resolved: minor improvements to RR handling
2015-07-14resolved: improve printing of unknown RRsTom Gundersen
This implements the recommendations from RFC3597.
2015-07-14Merge pull request #585 from teg/resolved-harden-2Daniel Mack
resolved: harden
2015-07-14Merge commit 'refs/pull/436/head' of https://github.com/systemd/systemdDavid Herrmann
This merges: sd-netlink: respect attribute type flags ..fixing a conflict due to a typo fix.
2015-07-14resolved: rr - add DS supportTom Gundersen
Needed for DNSSEC.
2015-07-14resolved: rr - print formated timestamps in RRSIGTom Gundersen
2015-07-14resolved: use one UDP socket per transactionTom Gundersen
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 Gundersen
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 Gundersen
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 Mack
resolve-host: enable dbus-activation
2015-07-14Merge pull request #579 from ssahani/tap-vnet-hdrDaniel Mack
networkd: tap add support for vnet_hdr
2015-07-14man: add man for tap vnet_hdrSusant Sahani
2015-07-14resolved: reference count the dns serversTom Gundersen
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 Gundersen
Currently we only make sure our links can handle the size of the payload witohut taking the headers into account.