summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* sd-netlink: add support for new type NETLINK_TYPE_FLAGSusant Sahani2017-03-14
| | | | | | | | NETLINK_TYPE_FLAG is NLA_FLAG. This new type will be used in NLA_FLAG for example IFLA_VXLAN_GBP and IFLA_VXLAN_REMCSUM_NOPARTIAL
* sd-netlink: add support for vxlan attributesSusant Sahani2017-03-14
|
* sd-bus: fix marshaling of unary typeDavid Herrmann2017-03-14
| | | | | The unary type has a fixed size of 1 in gvariant. Make sure we properly encode it as such. Right now, we encode/decode it as empty sequence.
* sd-bus: drop redundant codeDavid Herrmann2017-03-14
| | | | | | | If c->item_size is 0, the next item to parse in a structure is empty. However, this also implies that the signature must be empty. The latter case is already handled just fine by enter_struct_or_dict_entry() so there is no reason to handle the same case in the caller.
* sd-bus: don't assert() on valid signaturesDavid Herrmann2017-03-14
| | | | | | | Right now sd_bus_message_skip() will abort execution if passed a signature of the unary type "()". Regardless whether this should be supported or not, we really must not abort. Drop the incorrect assertion and add a test-case for this.
* hwdb: add min/max/resolution override for Appletouch one-button touchpadsPeter Hutterer2017-03-14
| | | | | | Macbook2,1, late 2006 model. https://bugzilla.redhat.com/show_bug.cgi?id=1246651
* hwdb: add resolution values for Asus K52JT touchpadPeter Hutterer2017-03-14
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=91364
* sd-netlink: Add macvtap supportSusant Sahani2017-03-14
|
* man: typo fixesThomas Hindoe Paaboel Andersen2017-03-14
|
* netlink-types: use consistent whitespace at EOLZbigniew Jędrzejewski-Szmek2017-03-14
| | | | Follow up for v222-124-g79e27dbcb1.
* sd-bus: remove _VTABLE from new method vtable initialiserdaurnimator2017-03-14
|
* sd-bus: add 'offset' member for vtable methodsdaurnimator2017-03-14
| | | | | Defaults to zero, which retains the current behaviour. Fixes #577
* sd-bus: don't treat KDBUS_ITEM_TIMESTAMP as unknown itemDavid Herrmann2017-03-14
| | | | | | In bus_kernel_translate_message(), we print a DEBUG message on unknown items. But right now, we also print this message for KDBUS_ITEM_TIMESTAMP despite parsing it properly. Fix this!
* treewide: fix typosTorstein Husebø2017-03-14
|
* units: order networkd after sysctlTom Gundersen2017-03-14
| | | | | | | This way networkd will correctly and race-freely inherit the default settings applied by sysctl. Suggested in issue #468.
* resolved: rr - ignore pseudo types in NSEC(3) bitmapsTom Gundersen2017-03-14
|
* sd-netlink: add bridge NL paramsSusant Sahani2017-03-14
|
* sd-netlink: add tunnel paramsSusant Sahani2017-03-14
|
* sd-bus: fix path of object-manager signalsDavid Herrmann2017-03-14
| | | | | | | | | | | | | | | | | | | | | | Each signal of the ObjectManager interface carries the path of the object in question as an argument. Therefore, a caller will deduce the object this signal is generated for, by parsing the _argument_. A caller will *not* use the object-path of the message itself (i.e., message->path). This is done on purpose, so the caller can rely on message->path to be the path of the actual object-manager that generated this signal, instead of the path of the object that triggered this signal. This commit fixes all InterfacesAdded/Removed signals to use the path of the closest object-manager as message->path. 'closest' in this case means closest parent with at least one object-manager registered. This fix raises the question what happens if we stack object-managers in a hierarchy. Two implementations are possible: First, we report each object only on the nearest object-manager. Second, we report it on each parent object-manager. This patch chooses the former. This is compatible with other existing ObjectManager implementations, which are required to call GetManagedObjects() recursively on each object they find, which implements the ObjectManager interface.
* logind: fix write_string_file() falloutDaniel Mack2017-03-14
| | | | | | | | WRITE_STRING_FILE_ATOMIC is only valid if WRITE_STRING_FILE_CREATE is also given. IOW, an atomic file write operation is only possible when creating a file is also being asked for. This is a regression from the recent write_string_file() rework.
* shared: dns-name - introduce dns_label_unescape_suffix()Tom Gundersen2017-03-14
| | | | | | | | | | Intended to be called repeatedly, and returns then successive unescaped labels from the most to the least significant (left to right). This is slightly inefficient as it scans the string three times (two would be sufficient): once to find the end of the string, once to find the beginning of each label and lastly once to do the actual unescaping. The latter two could be done in one go, but that seemed unnecessarily convoluted.
* shared: dns-name - use the canonical dns name orderingTom Gundersen2017-03-14
| | | | | | The canonical DNS name ordering considers the rightmost label the most significant, we were considering it the least significant. This is important when implementing NSEC, which relies on the correct order.
* sd-netlink: add tunnel NL parametersSusant Sahani2017-03-14
|
* shared: dns-name - add dns_name_between()Tom Gundersen2017-03-14
| | | | | | | Given three DNS names this function indicates if the second argument lies strictly between the first and the third according to the canonical DNS name order. Note that the order is circular, so the last name is considered to be before the first.
* logind: never select closing sessions for a VTDavid Herrmann2017-03-14
| | | | | | | 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.
* logind: prefer new sessions over older ones on VT switchesDavid Herrmann2017-03-14
| | | | | | | | | | | | | | | | | | 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.
* networkd: move config_parse_vxlan_group_addressSusant Sahani2017-03-14
| | | | | move config_parse_vxlan_group_address from networkd.h to networkd-netdev-vxlan.h
* bus-proxy: never pass on unmatched broadcastsDavid Herrmann2017-03-14
| | | | | | | | | | | | | | | The lovely libvirtd goes into crazy mode if it receives broadcasts that it didn't subscribe to. With bus-proxyd, this might happen in 2 cases: 1) The kernel passes us an unmatched signal due to a false-positive bloom-match. 2) We generate NameOwnerChanged/NameAcquired/NameLost locally even though the peer didn't subscribe to it. dbus-daemon is reliable in what signals it passes on. So make sure we follow that style. Never ever send a signal to a local peer if it doesn't match an installed filter of that peer.
* sd-bus: fix invalid stack access on test-bus-marshalDavid Herrmann2017-03-14
| | | | | Make sure we actually parse "unsigned long long" if we encode a uint64_t. Otherwise, we will get random data from the stack.
* sd-bus: properly match ID changesDavid Herrmann2017-03-14
| | | | | | | | | 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.
* sd-bus: destination-matches cannot match NameOwnerChangedDavid Herrmann2017-03-14
| | | | | | | | | | 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.
* sd-bus: fix gvariant structure encodingDavid Herrmann2017-03-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* sd-bus: fix object tree to be deeper than 2 levelsDavid Herrmann2017-03-14
| | | | | | | | | | | | | | | | | | 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.
* sd-device: never return NULL+0David Herrmann2017-03-14
| | | | | | | | | | | 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.
* networkd: tap add support for vnet_hdrSusant Sahani2017-03-14
| | | | | | | 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.
* doc: configure docbook stylesheet to generate reproducible IDsJohan Ouwerkerk2017-03-14
| | | | This makes auto generated anchor tags in HTML output reproducible.
* Use a top-to-bottom numbering scheme for generating ids of subheadings and ↵Johan Ouwerkerk2017-03-14
| | | | | | | | | 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.
* logind: bring bus policy up-to-dateLennart Poettering2017-03-14
| | | | | | | | | | | | | 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.
* resolved: use a #define for LLMNR portDaniel Mack2017-03-14
| | | | De-duplicate some magic numbers.
* resolved: move LLMNR related functions into separate fileDaniel Mack2017-03-14
|
* logind: rename 'pos' to 'position'David Herrmann2017-03-14
| | | | | | | | 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.
* logind: allow greeters to take over VTsDavid Herrmann2017-03-14
| | | | | | | | 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.
* nss-mymachines: map userns users of containers to real user namesLennart Poettering2017-03-14
| | | | | | | | | | | | | 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.
* sd-bus: include queried path in GetManagedObjectsDavid Herrmann2017-03-14
| | | | | | | | | | 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
* sd-bus: sd_bus_slot_get_description() should return const stringsDavid Herrmann2017-03-14
| | | | | | | | | | 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.
* property callback returns are consistentUmut Tezduyar Lindskog2017-03-14
| | | | | | | It is no different to return 0 over 1 in the property callback. It is confusing to return 1 which made me think 1 has a special purpose. This way code is consistent with the rest of the tree.
* logind: fail on CreateSession if already in sessionDavid Herrmann2017-03-14
| | | | | | | | | | | Right now, if you're already in a session and call CreateSession, we return information about the current session of yours. This is highy confusing and a nasty hack. Avoid that, and instead return a commonly known error, so the caller can detect that. This has the side-effect, that we no longer override XDG_VTNR and XDG_SEAT in pam_systemd, if you're already in a session. But this sounds like the right thing to do, anyway.
* logind: allow sessions to share a VT if it's a greeterDavid Herrmann2017-03-14
| | | | | | | | | | | | | | Old gdm and lightdm start the user-session during login before they destroy the greeter-session. Therefore, the user-session will take over the VT from the greeter. We recently prevented this by never allowing multiple sessions on the same VT. Fix this now, by explicitly allowing this if the owning session is a GREETER. Note that gdm no longer behaves like this. Instead, due to wayland, they always use a different VT for each session. All other login-managers are highly encouraged to destroy the greeter-session _before_ starting the user-session. We now work around this, but this will probably not last forever (and will already have nasty side-effects on the greeter-session).
* Remove repeated 'the'sZbigniew Jędrzejewski-Szmek2017-03-14
|
* login: use normal comparison to zero for integersZbigniew Jędrzejewski-Szmek2017-03-14
| | | | ! is supposed to be used for booleans and pointers.