platform/upstream/systemd.git
9 years agodevice: rework how we enter tentative state
Lennart Poettering [Fri, 24 Apr 2015 10:29:05 +0000 (12:29 +0200)]
device: rework how we enter tentative state

This reworks how we enter tentative state and does so only when a device
was previously not announced via udev. The previous check actually just
checked whether a new state bit was set, which is not correct.

Also, to be able to reliably maintain the tentative state across daemon
reloads, we need to serialize and deserialize it.

9 years agoservice: improve readability, by reducing line-breaks
Lennart Poettering [Fri, 24 Apr 2015 10:25:55 +0000 (12:25 +0200)]
service: improve readability, by reducing line-breaks

9 years agojournal: use audit event names instead of numbers
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2015 14:29:03 +0000 (10:29 -0400)]
journal: use audit event names instead of numbers

<audit-1400> is replaced by AVC, etc.

A fallback mechanism is provided for unlisted event types.
Occasionally new types are added to the kernel, but not too often.

Add a simple "test", which simply prints the mapping.

9 years agojournal: add int↔audit type name mapping
Zbigniew Jędrzejewski-Szmek [Mon, 16 Mar 2015 17:14:18 +0000 (13:14 -0400)]
journal: add int↔audit type name mapping

9 years agoudevd: fix REMOVE handling
Tom Gundersen [Thu, 23 Apr 2015 13:19:13 +0000 (15:19 +0200)]
udevd: fix REMOVE handling

This reverts b67f944. Lazy loading of device properties does not work for devices
that are received over netlink, as these are sealed. Reinstate the unconditional
loading of the device db.

Reported by: Mantas Mikulėnas <grawity@gmail.com>.

9 years agoudev: event - update tags before writing out db
Tom Gundersen [Fri, 17 Apr 2015 13:46:37 +0000 (15:46 +0200)]
udev: event - update tags before writing out db

The old tags are read from the db when deciding which tags to clear,
make sure we don't write out the new db before the old one has been
read.

9 years agolibudev-device: fix lazy loading of devlinks, properties and tags
Tom Gundersen [Wed, 22 Apr 2015 17:01:50 +0000 (19:01 +0200)]
libudev-device: fix lazy loading of devlinks, properties and tags

If the underlying device has not read in the properties yet, the generation will be 0, so
make sure we trigger the reading at least once.

9 years agosd-bus: add controlling tty field to sd_creds object
Lennart Poettering [Thu, 23 Apr 2015 17:43:40 +0000 (19:43 +0200)]
sd-bus: add controlling tty field to sd_creds object

This is useful to print wall messages from logind with the right client
tty. (to be added in a later patch)

9 years agosd-bus: when bus operations are to be executed on direct connections always fail
Lennart Poettering [Thu, 23 Apr 2015 14:23:15 +0000 (16:23 +0200)]
sd-bus: when bus operations are to be executed on direct connections always fail

Also, don't consider this an loggable event, so that code that tries to
read creds from a direct connection, doesn't generate logs.

9 years agocore: fix parsing of mount flags
Lennart Poettering [Thu, 23 Apr 2015 14:21:38 +0000 (16:21 +0200)]
core: fix parsing of mount flags

As reported my Maciej Wereski:

http://lists.freedesktop.org/archives/systemd-devel/2015-February/028320.html

9 years agocore: downgrade warning about duplicate device names
Lennart Poettering [Thu, 23 Apr 2015 11:50:01 +0000 (13:50 +0200)]
core: downgrade warning about duplicate device names

http://lists.freedesktop.org/archives/systemd-devel/2015-April/031094.html

9 years agorules: Add more firewire properties for sound, to be closer to USB and PCI
Adam Goode [Thu, 23 Apr 2015 01:05:39 +0000 (21:05 -0400)]
rules: Add more firewire properties for sound, to be closer to USB and PCI

USB and PCI soundcards have a nice set of ID_* properties. It would
be handy for firewire soundcards to have the same.

Note that this removes the explicit setting of ID_ID in the firewire
conditional. Because we are now setting ID_SERIAL, ID_ID will come
from later in the file.

9 years agorules: Don't use ALSA card id in ID_ID
Adam Goode [Thu, 23 Apr 2015 01:05:38 +0000 (21:05 -0400)]
rules: Don't use ALSA card id in ID_ID

The ALSA id sysattr is generated by the sound subsystem and is not
a stable identifier. It is generated though some string manipulation
then made unique if there is a conflict. This means that it is
enumeration-dependent and shouldn't be used for ID_ID.

If ID_ID is supposed to be system-unique, it is not already since
for firewire it is generated from the guid and there are broken
firewire devices that have duplicate guids across devices.

This is tracked for PulseAudio at
https://bugs.freedesktop.org/show_bug.cgi?id=90129.

This is essentially a revert of systemd
ed1b2d9fc7d5c5bfe2a67b0b8ff9e5ea8694268e.

9 years agosd-bus: don't inherit connection creds into message creds when we have a direct conne...
Lennart Poettering [Thu, 23 Apr 2015 11:37:03 +0000 (13:37 +0200)]
sd-bus: don't inherit connection creds into message creds when we have a direct connection

It's never a good idea, let's just not do it, not even on dierct
connections.

9 years agopath-util: make use of "mnt_id" field exported in /proc/self/fdinfo/<fd> to test...
Lennart Poettering [Thu, 23 Apr 2015 11:23:03 +0000 (13:23 +0200)]
path-util: make use of "mnt_id" field exported in /proc/self/fdinfo/<fd> to test for mount points

It's a very recent kernel addition, but certainly makes sense to
support.

9 years agohwdb: fix typo - "sort by by..." -> "sort by..."
Peter Hutterer [Thu, 23 Apr 2015 01:10:04 +0000 (11:10 +1000)]
hwdb: fix typo - "sort by by..." -> "sort by..."

9 years agohwdb: add HP X1000 DPI info
Peter Hutterer [Thu, 23 Apr 2015 00:44:30 +0000 (10:44 +1000)]
hwdb: add HP X1000 DPI info

Device name is PixArt, but it's sold as a HP brand.

https://bugs.freedesktop.org/show_bug.cgi?id=90142

9 years agoutil: Fix assertion in split() on missing '
Martin Pitt [Wed, 22 Apr 2015 22:09:43 +0000 (23:09 +0100)]
util: Fix assertion in split() on missing '

When parsing a unit with a trailing slash after an escaped line break, like

  ExecStart=/bin/echo 'foo \
    bar'

the split() function (through config_parse()) asserted and crashed pid 1:

  Assertion 'current[*l + 1] == quotechars[0]' failed at ../src/shared/util.c:583, function split(). Aborting.

Fix this by returning an error in this case ("trailing garbage").

Add corresponding test case. Also fix the missing "unit" argument of
config_parse_exec() in the comment.

https://launchpad.net/bugs/1447243

9 years agocore: explicitly specify credentials for direct connections, too
Lennart Poettering [Wed, 22 Apr 2015 22:37:47 +0000 (00:37 +0200)]
core: explicitly specify credentials for direct connections, too

So far we authenticate direct connections primarily at connection time,
but let's also do this for each method individually, by attaching the
creds we need for that right away.

9 years agojournalctl: rework code that checks whether we have access to /var/log/journal
Lennart Poettering [Wed, 22 Apr 2015 20:54:23 +0000 (22:54 +0200)]
journalctl: rework code that checks whether we have access to /var/log/journal

- fix some memory leaks on error conditions

- handle all error cases properly, and log about failures

- move HAVE_ACL and no-HAVE_ACL code closer to each other

9 years agoupdate TODO
Lennart Poettering [Wed, 22 Apr 2015 20:24:48 +0000 (22:24 +0200)]
update TODO

9 years agoman: fix example in systemd-run(1)
Lennart Poettering [Wed, 22 Apr 2015 20:24:24 +0000 (22:24 +0200)]
man: fix example in systemd-run(1)

Reported by Holger Reif.

9 years agoCODING_STYLE: document that we prefer /* comments */ over // comments
Lennart Poettering [Wed, 22 Apr 2015 18:25:06 +0000 (20:25 +0200)]
CODING_STYLE: document that we prefer /* comments */ over // comments

9 years agobuild-sys: adjust link-order for non-gc-sections build
Kay Sievers [Wed, 22 Apr 2015 20:06:18 +0000 (22:06 +0200)]
build-sys: adjust link-order for non-gc-sections build

9 years agoudev: Fix ping timeout when settle timeout is 0
Nir Soffer [Sat, 18 Apr 2015 23:49:47 +0000 (02:49 +0300)]
udev: Fix ping timeout when settle timeout is 0

When running udevadm settle --timeout=0, the ping always times out, and
udevadm will return 0 without checking the queue state.

(David: Use a reasonable timeout to still get the barrier provided by
 ctrl-ping)

9 years agoman: elaborate on the order by which tmpfiles operations are executed
Lennart Poettering [Wed, 22 Apr 2015 16:24:47 +0000 (18:24 +0200)]
man: elaborate on the order by which tmpfiles operations are executed

9 years agotmpfiles: use an ordered hashmap for the tmpfiles items
Lennart Poettering [Wed, 22 Apr 2015 16:18:56 +0000 (18:18 +0200)]
tmpfiles: use an ordered hashmap for the tmpfiles items

We should try to execute them in the same order they appear in the
configuration files, as it is documented. Hence move to an ordered
hashmap.

(Note though, that this still doesn't execute them completely in order:
we will still apply non-glob lines before glob-lines, and reorder lines
prefixing each other and that apply to the same paths).

http://lists.freedesktop.org/archives/systemd-devel/2015-March/029055.html

9 years agobtrfs-util: support recursive removal of read-only subvolumes
Lennart Poettering [Wed, 22 Apr 2015 15:09:20 +0000 (17:09 +0200)]
btrfs-util: support recursive removal of read-only subvolumes

When deleting a read-only subsvolume with a sub-subvolume, we need to
mark it writable first, otherwise the removal will not work.

9 years agonspawn: don't inherit read-only flag from disk image if --ephemeral is used
Lennart Poettering [Wed, 22 Apr 2015 14:56:51 +0000 (16:56 +0200)]
nspawn: don't inherit read-only flag from disk image if --ephemeral is used

When --ephemeral is used there's no need to keep the image read-only, so
let's not do that then.

9 years agobtrfs-util: fix creating recursive read-only snapshots
Lennart Poettering [Wed, 22 Apr 2015 14:52:53 +0000 (16:52 +0200)]
btrfs-util: fix creating recursive read-only snapshots

When creating recursive read-only snapshots we need to mark the snapshot
writable immediately before creating subsnapshots within it, otherwise
the operation for it will fail.

9 years agobuild-sys: minor simplification
Lennart Poettering [Wed, 22 Apr 2015 12:05:24 +0000 (14:05 +0200)]
build-sys: minor simplification

9 years agoupdate TODO
Lennart Poettering [Wed, 22 Apr 2015 11:53:50 +0000 (13:53 +0200)]
update TODO

9 years agokmod-setup: load ip_tables kmod at boot
Lennart Poettering [Wed, 22 Apr 2015 11:50:56 +0000 (13:50 +0200)]
kmod-setup: load ip_tables kmod at boot

The module is currently no auto-loadable (and this is unlikely to change
anytime soon, given it's API is via getsockopt/setsockopt). It is needed
by networkd and nspawn currently.

Users who really don't like the module to be loaded have the option to
blacklist it still, or not compile it at all. But for all others this
should make things work out-of-the-box.

9 years agoUpdate TODO
Lennart Poettering [Wed, 22 Apr 2015 11:30:42 +0000 (13:30 +0200)]
Update TODO

9 years agosd-bus: handle ppid=0 more gracefully (which happens for pid=1)
Lennart Poettering [Wed, 22 Apr 2015 11:27:29 +0000 (13:27 +0200)]
sd-bus: handle ppid=0 more gracefully (which happens for pid=1)

9 years agojournal: don't force FS_NOCOW_FL on new journal files, but warn if it is missing
Lennart Poettering [Wed, 22 Apr 2015 11:20:49 +0000 (13:20 +0200)]
journal: don't force FS_NOCOW_FL on new journal files, but warn if it is missing

This way users have the freedom to set or unset the FS_NOCOW_FL flag on
their journal files by setting it on the journal directory. Since our
default tmpfiles configuration now sets this flag on the directory the
flag is set by default on new files, however people can opt-out of this
by masking the tmpfiles file for it.

9 years agobtrfs-util: be more careful when invoking btrfs file system ioctls
Lennart Poettering [Wed, 22 Apr 2015 11:11:19 +0000 (13:11 +0200)]
btrfs-util: be more careful when invoking btrfs file system ioctls

If we get passed an fd that does not refer to a regular file or
directory, we should not issue btrfs ioctls on it, since it might end up
in a device driver or similar (note that DRM for example uses the same
ioctl numbers as some file system ioctls).

Hence, let's make sure to always check if something is a regular file or
directory, or is on btrfs before invoking the respective ioctls. It's
better to be safe than sorry.

9 years agobtrfs-util: introduce btrfs_is_filesystem() and make use of it where appropriate
Lennart Poettering [Wed, 22 Apr 2015 11:08:19 +0000 (13:08 +0200)]
btrfs-util: introduce btrfs_is_filesystem() and make use of it where appropriate

Let's unify the code that checks whether an fd is on btrfs a bit.

(Also, rename btrfs_is_snapshot() to btrfs_is_subvol(), since that's
usually how this is referred to in our code)

9 years agoutil: make sure fd refers to regular file or directory when applying file attributes
Lennart Poettering [Wed, 22 Apr 2015 11:05:26 +0000 (13:05 +0200)]
util: make sure fd refers to regular file or directory when applying file attributes

Before invoking file system ioctls we need to make sure that the
specified fd actually refers to a file system object, and not a device
node or similar. Otherwise we might by accident invoke unrelated device
driver ioctls. For example, DRM ioctls use the same ioctl numbers as the
various file system ioctls.

9 years agoefi-boot-generator: set automount expire for /boot
Kay Sievers [Tue, 21 Apr 2015 22:39:36 +0000 (00:39 +0200)]
efi-boot-generator: set automount expire for /boot

This should make the Linux vfat handling less fragile, by unmounting
the idle mount and causing to sync the entire file system to disk.

On my machines, The FAT file system at /boot regularly gets corrupted
with unclean shutdowns, rendering the machines unbootable. Either the
VFS write-back behaviour or the vfat driver itself is just not reliable
enough to be/stay mounted at every bootup.

Because of that, the automount expiry was on top of my personal
wish list. Thanks a lot Michael!

9 years agoautomount: remove unused variable
Thomas Hindoe Paaboel Andersen [Tue, 21 Apr 2015 20:39:23 +0000 (22:39 +0200)]
automount: remove unused variable

9 years agosd-bus: expose ppid field
Lennart Poettering [Tue, 21 Apr 2015 18:58:09 +0000 (20:58 +0200)]
sd-bus: expose ppid field

kdbus has been passing us the ppid file for a while, actually make use
of it.

9 years agobuild-sys: move systemd.pc from pkgconfiglibdir back into pkgconfigdatadir
Lennart Poettering [Tue, 21 Apr 2015 18:35:17 +0000 (20:35 +0200)]
build-sys: move systemd.pc from pkgconfiglibdir back into pkgconfigdatadir

The original idea of systemd.pc was to contain arch-independent system
and systemd information. By exposing libdir as part of the fields (added
in eb39a6239c631873db62f6a942e6cb3dab0a2db4), it started to carry
arch-dependent data, thus breaking multilib systems. It was then moved
to pkgconfiglibdir to deal with this (in
aec432c6134146e138124c4130be2ee89dca07fa), but actually the right
approach is to simply not include libdir in the .pc file at all.

THis patch hence more or less reverts both commits again, and moves the
.pc file back into pkgconfigdatadir.

As alternative for querying the systems primary libdir there's now
"systemd-path system-library-arch", hence a more correct alternative
exists for querying this variable from the .pc file.

9 years agocore: make unit deserialization more defensive
Lennart Poettering [Tue, 21 Apr 2015 18:22:51 +0000 (20:22 +0200)]
core: make unit deserialization more defensive

9 years agoautomount: various smaller fixes
Lennart Poettering [Tue, 21 Apr 2015 16:43:57 +0000 (18:43 +0200)]
automount: various smaller fixes

9 years agoautomount: add expire support
Michael Olbrich [Tue, 14 Apr 2015 20:01:48 +0000 (22:01 +0200)]
automount: add expire support

9 years agobuild-sys: efi - use $EFI_LIB_DIR
Kay Sievers [Tue, 21 Apr 2015 17:47:00 +0000 (19:47 +0200)]
build-sys: efi - use $EFI_LIB_DIR

https://bugs.freedesktop.org/show_bug.cgi?id=89982

9 years agobuild-sys: add missing file
Kay Sievers [Tue, 21 Apr 2015 17:44:27 +0000 (19:44 +0200)]
build-sys: add missing file

9 years agotest: test-path and test-execute only need units in test/
Ronny Chevalier [Tue, 21 Apr 2015 17:27:59 +0000 (19:27 +0200)]
test: test-path and test-execute only need units in test/

9 years agodelete unused LICENSE.MIT
Kay Sievers [Tue, 21 Apr 2015 17:21:56 +0000 (19:21 +0200)]
delete unused LICENSE.MIT

9 years agorandom-seed: minor cleanups, in particular when it comes to logging
Lennart Poettering [Tue, 21 Apr 2015 16:08:09 +0000 (18:08 +0200)]
random-seed: minor cleanups, in particular when it comes to logging

9 years agotree-wide: get rid of more strerror() calls
Lennart Poettering [Tue, 21 Apr 2015 16:05:44 +0000 (18:05 +0200)]
tree-wide: get rid of more strerror() calls

9 years agonetworkd-fdb: indentation/whitespace fixes
Lennart Poettering [Tue, 21 Apr 2015 15:43:31 +0000 (17:43 +0200)]
networkd-fdb: indentation/whitespace fixes

9 years agonetworkd: improve how networkd logs things
Lennart Poettering [Tue, 21 Apr 2015 15:40:18 +0000 (17:40 +0200)]
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.

9 years agotmpfiles: make /home and /var btrfs subvolumes by default when booted up with them...
Lennart Poettering [Tue, 21 Apr 2015 15:28:16 +0000 (17:28 +0200)]
tmpfiles: make /home and /var btrfs subvolumes by default when booted up with them missing

This way the root subvolume can be left read-only easily, and variable
and user data writable with explicit quota set.

9 years agotmpfiles: there's no systemd-forbid-user-logins.service service
Lennart Poettering [Tue, 21 Apr 2015 15:26:56 +0000 (17:26 +0200)]
tmpfiles: there's no systemd-forbid-user-logins.service service

9 years agolog: move log_syntax() into src/shared/log.c, and make it more similar to the other...
Lennart Poettering [Tue, 21 Apr 2015 15:26:04 +0000 (17:26 +0200)]
log: move log_syntax() into src/shared/log.c, and make it more similar to the other log functions

9 years agoudevadm: enclose invocation of unlinkat() with a (void) cast
Lennart Poettering [Tue, 21 Apr 2015 11:21:44 +0000 (13:21 +0200)]
udevadm: enclose invocation of unlinkat() with a (void) cast

Let's make Coverity happy about this one.

9 years agosd-device: set_syspath - return ENODEV when passed something that is not a device
Tom Gundersen [Tue, 21 Apr 2015 12:41:13 +0000 (14:41 +0200)]
sd-device: set_syspath - return ENODEV when passed something that is not a device

9 years agonetworkd man: fix man and config name.
Susant Sahani [Tue, 21 Apr 2015 08:04:05 +0000 (13:34 +0530)]
networkd man: fix man and config name.

Rename bond confs and man as well.

[tomegun: dropped a stray comma]

9 years agohwdb: add Chromebook pixel (2015) resolution fix
Benjamin Tissoires [Mon, 20 Apr 2015 22:01:53 +0000 (18:01 -0400)]
hwdb: add Chromebook pixel (2015) resolution fix

The atmel driver sets a default resolution of 20 for each touchpads it
creates. On this model, 10 is more appropriate.

The resolution is not set for the touchscreen by the kernel, so match
the name to both touchpad and touchscreen.

9 years agohwdb: add evdev entry for the Lenovo X230 series touchpad
Benjamin Tissoires [Mon, 20 Apr 2015 22:01:52 +0000 (18:01 -0400)]
hwdb: add evdev entry for the Lenovo X230 series touchpad

The Lenovo X230 advertize a vertical resolution of 136, which gives a true
size of 31 mm. The actual physical size of the touchpad is 40 mm, so
override the resolution to 100.

9 years agohwdb: Add entries for the pointingstick on 2 Dell Latitudes
Hans de Goede [Fri, 17 Apr 2015 14:48:09 +0000 (16:48 +0200)]
hwdb: Add entries for the pointingstick on 2 Dell Latitudes

The pointingstick of the Dell Latitude E6400 is somewhat slow by default,
whereas the pointingstick of the Dell Latitude D620 is much too fast by
default, set POINTINGSTICK_CONST_ACCEL for both of them to adjust for this.

9 years agohwdb: Add entries for the trackpoint on 2 Thinkpads
Hans de Goede [Fri, 17 Apr 2015 14:48:08 +0000 (16:48 +0200)]
hwdb: Add entries for the trackpoint on 2 Thinkpads

Lenovo has changed the sensitivity of the trackpoint on the x240 / T440s / T540
generation of Thinkpads, making them somewhat insensitive by default, add a
hwdb entry to tweak the sensitivity setting.

The ThinkPad X200s is way way too slow by default and unless you push the
trackpoint quite hard only sends delta events in the 1-2 range, tweak the
sensitivity to make it send a wider range of deltas and apply a const accel
factor to make it have a more reasonable speed by default.

9 years agoudev: keyboard-builtin: Add support for setting IBM trackpoint sensitivity
Hans de Goede [Fri, 17 Apr 2015 14:48:07 +0000 (16:48 +0200)]
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.

9 years agoudev: Add hwdb file for setting pointingstick properties
Hans de Goede [Fri, 17 Apr 2015 14:48:06 +0000 (16:48 +0200)]
udev: Add hwdb file for setting pointingstick properties

There is quite a wide spread in the delta events generated by pointingsticks,
some generate deltas of 1-2 under normal use, while others generate deltas
from 1-20.

This commit adds a hwdb file which allows specifying a per model
POINTINGSTICK_CONST_ACCEL value which can be used by the userspace input stack
to normalize the deltas so that all pointingsticks get the same feeling ootb.

The hwdb matching re-uses the existing 60-evdev.rules.

9 years agoimportd: add CAP_DAC_OVERRIDE capability
Lubomir Rintel [Mon, 13 Apr 2015 17:46:59 +0000 (19:46 +0200)]
importd: add CAP_DAC_OVERRIDE capability

Fedora's filesystem package ships /usr/bin (and other directories) which are
not writable by its owner. machinectl pull-dkr (and possibly others) are not
able to extract those:

  14182 mkdirat(3, "usr", 0700)           = 0
  14182 mkdirat(3, "usr/bin", 0500)       = 0
  14182 openat(3, "usr/bin/[", O_WRONLY|O_CREAT|O_EXCL|O_NOCTTY|O_NONBLOCK|O_CLOEXEC, 0700) = -1 EACCES (Permission denied)
  ...

9 years agoservice: transition through SIGKILL states only when SIGKILL is enabled
Lennart Poettering [Tue, 21 Apr 2015 00:21:01 +0000 (02:21 +0200)]
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...

9 years agoservice: timeout on SIGABRT should also be considered an error to remember
Lennart Poettering [Tue, 21 Apr 2015 00:20:15 +0000 (02:20 +0200)]
service: timeout on SIGABRT should also be considered an error to remember

9 years agoservice: make more use of IN_SET() macro
Lennart Poettering [Tue, 21 Apr 2015 00:19:58 +0000 (02:19 +0200)]
service: make more use of IN_SET() macro

9 years agoservice: list states always in the same order
Lennart Poettering [Tue, 21 Apr 2015 00:18:31 +0000 (02:18 +0200)]
service: list states always in the same order

9 years agoservice: make kill operation mapping explicit
Lennart Poettering [Tue, 21 Apr 2015 00:17:01 +0000 (02:17 +0200)]
service: make kill operation mapping explicit

9 years agonetworkd: fix confusion between log_netdev_error() but log_warning_netdev()
Lennart Poettering [Mon, 20 Apr 2015 23:26:59 +0000 (01:26 +0200)]
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.

9 years agotmpfiles: consider an argument of "-" as non-specified
Lennart Poettering [Mon, 20 Apr 2015 23:10:19 +0000 (01:10 +0200)]
tmpfiles: consider an argument of "-" as non-specified

9 years agosd-bus: when augmenting creds, remember which ones were augmented
Lennart Poettering [Mon, 20 Apr 2015 22:58:08 +0000 (00:58 +0200)]
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.

9 years agosd-bus: augmenting cgroups-based creds when we have the cgroup path already is free
Lennart Poettering [Mon, 20 Apr 2015 22:53:43 +0000 (00:53 +0200)]
sd-bus: augmenting cgroups-based creds when we have the cgroup path already is free

9 years agosd-bus: when augmenting creds, don't override any creds in any case
Lennart Poettering [Mon, 20 Apr 2015 22:52:24 +0000 (00:52 +0200)]
sd-bus: when augmenting creds, don't override any creds in any case

Let's better be safe than sorry.

9 years agosd-bus: when copying creds objects, make sure we copy even the implicit well known...
Lennart Poettering [Mon, 20 Apr 2015 22:50:43 +0000 (00:50 +0200)]
sd-bus: when copying creds objects, make sure we copy even the implicit well known names

9 years agodhcp6: remove unnecessary if check
Lennart Poettering [Mon, 20 Apr 2015 18:57:04 +0000 (20:57 +0200)]
dhcp6: remove unnecessary if check

9 years agoupdate TODO
Lennart Poettering [Mon, 20 Apr 2015 18:56:44 +0000 (20:56 +0200)]
update TODO

9 years agoCODING_STYLE: document how destructors should work
Lennart Poettering [Mon, 20 Apr 2015 18:56:17 +0000 (20:56 +0200)]
CODING_STYLE: document how destructors should work

9 years agonetworkd: Add support for bond option.
Susant Sahani [Mon, 9 Mar 2015 09:58:29 +0000 (15:28 +0530)]
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

9 years agonetworkd vxlan: Add support for enabling UDP checksums
Susant Sahani [Thu, 5 Mar 2015 16:32:47 +0000 (22:02 +0530)]
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]

9 years agoudev: settle should return immediately when timeout is 0
Nir Soffer [Sun, 19 Apr 2015 00:41:26 +0000 (03:41 +0300)]
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.

9 years agoutil: fix typo
Raul Gutierrez S [Mon, 20 Apr 2015 05:27:45 +0000 (22:27 -0700)]
util: fix typo

9 years agoexit-status: Fix "NOTINSSTALLED" typo
Martin Pitt [Sat, 18 Apr 2015 21:38:13 +0000 (22:38 +0100)]
exit-status: Fix "NOTINSSTALLED" typo

9 years agocryptsetup: Implement offset and skip options
Martin Pitt [Thu, 16 Apr 2015 11:44:07 +0000 (06:44 -0500)]
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

9 years agosd-device: simplify enumerator hacks
David Herrmann [Fri, 17 Apr 2015 12:06:31 +0000 (14:06 +0200)]
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;

9 years agosd-device: uniformly handle missing devices
Tom Gundersen [Fri, 17 Apr 2015 12:53:02 +0000 (14:53 +0200)]
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.

9 years agosd-device: enumerator - match only on initialized devices by default
Tom Gundersen [Fri, 17 Apr 2015 12:11:00 +0000 (14:11 +0200)]
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.

9 years agosd-device: enumerator - don't expose add_device()
Tom Gundersen [Fri, 17 Apr 2015 11:50:10 +0000 (13:50 +0200)]
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.

9 years agolibudev: make libudev-enumerate a thin wrapper around sd-device
Tom Gundersen [Tue, 14 Apr 2015 14:25:06 +0000 (16:25 +0200)]
libudev: make libudev-enumerate a thin wrapper around sd-device

9 years agosd-device: add device-enumerator library
Tom Gundersen [Tue, 14 Apr 2015 14:22:39 +0000 (16:22 +0200)]
sd-device: add device-enumerator library

9 years agoshared: move assert_return_errno() from libudev
Tom Gundersen [Fri, 10 Apr 2015 18:39:43 +0000 (20:39 +0200)]
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.

9 years agosd-bus: add more comments to the credential decision logic
Lennart Poettering [Thu, 16 Apr 2015 15:27:51 +0000 (17:27 +0200)]
sd-bus: add more comments to the credential decision logic

9 years agocore: fix spurious warning about cpuacct-usage-base deserialization
Zbigniew Jędrzejewski-Szmek [Thu, 16 Apr 2015 12:10:33 +0000 (08:10 -0400)]
core: fix spurious warning about cpuacct-usage-base deserialization

The key was parsed properly, but the warning was still generated.

9 years agoudev-builtin-usb_id: fix inverted condition
Zbigniew Jędrzejewski-Szmek [Wed, 15 Apr 2015 12:20:22 +0000 (08:20 -0400)]
udev-builtin-usb_id: fix inverted condition

Fix for 4beac74e69.

Thanks, Ronny!

9 years agoselinux: use different log priorites for log messages
Zbigniew Jędrzejewski-Szmek [Tue, 24 Feb 2015 01:06:00 +0000 (20:06 -0500)]
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.

9 years agosystemctl: avoid bumping NOFILE rlimit unless needed
Zbigniew Jędrzejewski-Szmek [Wed, 15 Apr 2015 01:47:20 +0000 (20:47 -0500)]
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

9 years agosd-device: fix typo
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2015 16:39:40 +0000 (12:39 -0400)]
sd-device: fix typo