Commit graph

11139 commits

Author SHA1 Message Date
Ronny Chevalier ca909b8469 test: test-path and test-execute only need units in test/ 2015-04-21 19:27:59 +02:00
Lennart Poettering 1509fb87c0 random-seed: minor cleanups, in particular when it comes to logging 2015-04-21 18:08:09 +02:00
Lennart Poettering 10a8700606 tree-wide: get rid of more strerror() calls 2015-04-21 18:05:44 +02:00
Lennart Poettering 8519d8f58e networkd-fdb: indentation/whitespace fixes 2015-04-21 17:43:55 +02:00
Lennart Poettering 6a7a4e4d0a networkd: improve how networkd logs things
This makes adds a couple of fixes:

- Introduces log_netdev_error_errno() and friends, which takes an error
  number, and matches what log_link_error_errno() and friends do.

- Replaces a lof ot strerror() usage with log_netdev_error_errno(),
  log_link_error_errno() and log_erro_errno()

- Uppercases the first character of many log messages, after all this is
  supposed to be english language

- Drops manual negating of error codes before passing them to log
  functions, the log functions all do that internally anyway.

Some other minor fixes.

Behaviour should not change really.
2015-04-21 17:43:55 +02:00
Lennart Poettering 158350e869 log: move log_syntax() into src/shared/log.c, and make it more similar to the other log functions 2015-04-21 17:43:55 +02:00
Lennart Poettering 200c7fa6fe udevadm: enclose invocation of unlinkat() with a (void) cast
Let's make Coverity happy about this one.
2015-04-21 17:43:55 +02:00
Tom Gundersen 52d629010d sd-device: set_syspath - return ENODEV when passed something that is not a device 2015-04-21 14:41:13 +02:00
Susant Sahani 38422da754 networkd man: fix man and config name.
Rename bond confs and man as well.

[tomegun: dropped a stray comma]
2015-04-21 11:17:37 +02:00
Hans de Goede 5defbb5ff6 udev: keyboard-builtin: Add support for setting IBM trackpoint sensitivity
IBM / Lenovo trackpoints allow specifying a sensitivity setting through a
ps/2 command, which changes the range of the deltas sent when using the
trackpoint.

On some models with normal usage only deltas of 1 or 2 are send, resulting in
there only being 2 mouse cursor movement speeds, rather than the expected fluid
scale. Changing the sensitivity to a higher level than the bootup default fixes
this.

This commit adds support for setting a POINTINGSTICK_SENSITIVITY value
in hwdb to allow changing the sensitivity on boot through udev / hwdb.
2015-04-21 11:14:57 +10:00
Lennart Poettering 1db0db4b7f service: transition through SIGKILL states only when SIGKILL is enabled
If there's no remaining process to kill, skip the SIGKILL states if
SIGKILL is disabled.

Effectively this doesn't change much since if there's nothing to kill
with SIGTERM or SIGABRT then there's also nothing to kill with SIGKILL.
However, this avoids confusion with the state engine jumping through
SIGKILL states for no reason...
2015-04-21 02:21:01 +02:00
Lennart Poettering 2ab2ab7b19 service: timeout on SIGABRT should also be considered an error to remember 2015-04-21 02:20:15 +02:00
Lennart Poettering a00973af27 service: make more use of IN_SET() macro 2015-04-21 02:19:58 +02:00
Lennart Poettering 57614eb1a3 service: list states always in the same order 2015-04-21 02:18:31 +02:00
Lennart Poettering 4940c0b0b6 service: make kill operation mapping explicit 2015-04-21 02:17:01 +02:00
Lennart Poettering 98b3255670 networkd: fix confusion between log_netdev_error() but log_warning_netdev()
We should always name the object first, the level second, like
everywhere else in the sources.
2015-04-21 01:26:59 +02:00
Lennart Poettering aa5f6817bc tmpfiles: consider an argument of "-" as non-specified 2015-04-21 01:10:19 +02:00
Lennart Poettering 0f51442056 sd-bus: when augmenting creds, remember which ones were augmented
Also, when we do permissions checks using creds, verify that we don't do
so based on augmented creds, as extra safety check.
2015-04-21 00:58:56 +02:00
Lennart Poettering 822d9b6e4c sd-bus: augmenting cgroups-based creds when we have the cgroup path already is free 2015-04-21 00:58:56 +02:00
Lennart Poettering f887fa73ee sd-bus: when augmenting creds, don't override any creds in any case
Let's better be safe than sorry.
2015-04-21 00:58:56 +02:00
Lennart Poettering da634f97eb sd-bus: when copying creds objects, make sure we copy even the implicit well known names 2015-04-21 00:58:56 +02:00
Lennart Poettering 62e3d1aed5 dhcp6: remove unnecessary if check 2015-04-21 00:58:56 +02:00
Susant Sahani 81bd37a85f networkd: Add support for bond option.
This patch adds configurational support for bond option.

Test conf:

bond.netdev

 ---
[NetDev]
Name=bond1
Kind=bond

[Bond]
ArpAllTargets=all
PrimaryReselect=better
ArpIntervalSec=10s
ArpIpTargets= 192.168.8.102 192.168.8.101 192.168.8.102
 ---

$cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
ARP Polling Interval (ms): 10000
ARP IP target/s (n.n.n.n form): 192.168.8.100, 192.168.8.101, 192.168.8.102
2015-04-20 20:14:34 +02:00
Susant Sahani cffacc741c networkd vxlan: Add support for enabling UDP checksums
Add UDPCheckSum option to enable transmitting UDP checksums when doing
VXLAN/IPv4. Add UDP6ZeroChecksumRx, and UDP6ZeroChecksumTx
options to enable sending zero checksums and receiving zero
checksums in VXLAN/IPv6

[tomegun: rebase manpage due to whitespace changes]
2015-04-20 20:09:32 +02:00
Nir Soffer bf23b9f86f udev: settle should return immediately when timeout is 0
udevadm manual says:

    A value of 0 will check if the queue is empty and always return
    immediately.

However, currently we ignore the deadline if the value is 0, and wait
without any limit.

Zero timeout behaved according to the documentation until commit
ead7c62ab7 (udevadm: settle - kill alarm()). Looking at this patch, it
seems that the behavior change was unintended.

This patch restores the documented behavior.
2015-04-20 18:48:55 +02:00
Raul Gutierrez S 30a5b7820c util: fix typo 2015-04-20 08:54:01 +02:00
Martin Pitt 9f8f87e375 exit-status: Fix "NOTINSSTALLED" typo 2015-04-18 22:38:13 +01:00
Martin Pitt 4eac277367 cryptsetup: Implement offset and skip options
These are useful for plain devices as they don't have any metadata by
themselves. Instead of using an unreliable hardcoded device name in crypttab
you can then put static metadata at the start of the partition for a stable
UUID or label.

https://bugs.freedesktop.org/show_bug.cgi?id=87717
https://bugs.debian.org/751707
https://launchpad.net/bugs/953875
2015-04-17 10:53:01 -05:00
David Herrmann 18ae3d98d9 sd-device: simplify enumerator hacks
Boolean arithmetic is great, use it!

    if (a && !b)
      return 1;
    if (!a && b)
      return -1,

is equivalent to

    if (a != b)
      return a - b;

Furthermore:

    r = false;
    if (condition)
        r = true;

is equivalent to:

    r = condition;
2015-04-17 15:22:13 +02:00
Tom Gundersen 08232a020b sd-device: uniformly handle missing devices
sd_device_new_from_* now returns -ENODEV when the device does not exist, and the enumerator
silently drops these errors as missing devices is exepected.
2015-04-17 14:55:40 +02:00
Tom Gundersen dee5e0b6c2 sd-device: enumerator - match only on initialized devices by default
It is still possible to include uninitialized ones, but now that is opt-in. In most
cases people only want initialized devices. Exception is if you want to work without
udev running.

Suggested by David Herrmann.
2015-04-17 14:16:16 +02:00
Tom Gundersen 19c9df4492 sd-device: enumerator - don't expose add_device()
This is rarely, if ever, used. Drop it from the new public API and only keep it for
the legacy API.

Suggested by David Herrmann.
2015-04-17 14:15:47 +02:00
Tom Gundersen c32eb440ba libudev: make libudev-enumerate a thin wrapper around sd-device 2015-04-16 16:47:23 +01:00
Tom Gundersen 96df036fe3 sd-device: add device-enumerator library 2015-04-16 16:47:23 +01:00
Tom Gundersen aa02962840 shared: move assert_return_errno() from libudev
This should not be used for any new code, as we don't set errno in new code,
but there are several legacy users, so let's keep it in shared.
2015-04-16 16:47:23 +01:00
Lennart Poettering 2d0c156134 sd-bus: add more comments to the credential decision logic 2015-04-16 17:28:15 +02:00
Zbigniew Jędrzejewski-Szmek 0f90839754 core: fix spurious warning about cpuacct-usage-base deserialization
The key was parsed properly, but the warning was still generated.
2015-04-16 08:12:02 -04:00
Zbigniew Jędrzejewski-Szmek 38b9855bfa udev-builtin-usb_id: fix inverted condition
Fix for 4beac74e69.

Thanks, Ronny!
2015-04-15 08:28:19 -04:00
Zbigniew Jędrzejewski-Szmek 17af49f248 selinux: use different log priorites for log messages
When selinux calls our callback with a log message, it specifies the
type as AVC or INFO/WARNING/ERROR. The question is how to map this to
audit types and/or log priorities. SELINUX_AVC maps to AUDIT_USER_AVC
reasonably, but for the other messages we have no idea, hence we use
AUDIT_USER_AVC for everything. When not using audit logging, we can
map those selinux levels to LOG_INFO/WARNING/ERROR etc.

Also update comment which was not valid anymore in light of journald
sucking in audit logs, and was actually wrong from the beginning —
libselinux uses the callback for everything, not just avcs.

This stemmed out of https://bugzilla.redhat.com/show_bug.cgi?id=1195330,
but does not solve it.
2015-04-14 21:47:20 -04:00
Zbigniew Jędrzejewski-Szmek 40acc203c0 systemctl: avoid bumping NOFILE rlimit unless needed
We actually only use the journal when showing status. Move setrlimit call
so it is only called for status.

https://bugzilla.redhat.com/show_bug.cgi?id=1184712
2015-04-14 21:47:20 -04:00
Zbigniew Jędrzejewski-Szmek 813a71a206 sd-device: fix typo 2015-04-14 20:16:02 -04:00
Zbigniew Jędrzejewski-Szmek 4beac74e69 udev-builtin-usb_id: simplification 2015-04-14 12:39:14 -04:00
Thomas Hindoe Paaboel Andersen 70c79983e1 test-dhcp6-client: don't unref the event twice 2015-04-14 18:33:31 +02:00
Thomas Hindoe Paaboel Andersen 8283c71b71 sd-dhcp6-client: unref lease when freeing the client 2015-04-14 18:32:58 +02:00
Tom Gundersen 5a917c064b sd-devcie: fix typo 2015-04-14 16:55:18 +02:00
Tom Gundersen 85091685af sd-device: fix reading of subsystem 2015-04-14 16:19:37 +02:00
Tom Gundersen bba061662b sd-device: allow uevent files to be write-only 2015-04-14 16:19:37 +02:00
Lennart Poettering 8d8ce9e2cd udev: downgrade a few warnings to debug messages
https://bugs.freedesktop.org/show_bug.cgi?id=89885
2015-04-14 15:53:33 +02:00
Hans de Goede 37186823f3 input_id: Identify scroll-wheel device on Trust TB7300 tablet as keyboard
The Trust TB7300 (relabelled Waltop?) tablet has a scrollwheel which shows
up as a /dev/input/event# node all by itself. Currently input_id does not
set any ID_INPUT_FOO attr on this causing it it to not be recognized by
Xorg / libinput.

This commit fixes this by marking it with ID_INPUT_KEY.

Reported-by: Sjoerd Timmer <themba@randomdata.nl>
2015-04-14 09:51:41 +10:00
Hans de Goede 941a2aca3d udev: input_id: Make test_pointer / test_keys return if they've found anything
Make test_pointer / test_keys return a boolean indicating whether or not
they've set any properties on the device.
2015-04-14 09:51:07 +10:00