1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 00:51:24 +03:00
Commit Graph

20079 Commits

Author SHA1 Message Date
Lennart Poettering
5259bcf6a6 core: downgrade warning about duplicate device names
http://lists.freedesktop.org/archives/systemd-devel/2015-April/031094.html
2015-04-23 13:50:01 +02:00
Adam Goode
5c0b72de3a 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.
2015-04-23 13:40:54 +02:00
Adam Goode
0414af1dfe 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
ed1b2d9fc7.
2015-04-23 13:40:54 +02:00
Lennart Poettering
038f9863e2 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.
2015-04-23 13:40:54 +02:00
Lennart Poettering
3f72b427b4 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.
2015-04-23 13:40:54 +02:00
Peter Hutterer
47d36b7c85 hwdb: fix typo - "sort by by..." -> "sort by..." 2015-04-23 12:14:58 +10:00
Peter Hutterer
e8043cd5fe 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
2015-04-23 12:14:50 +10:00
Martin Pitt
470dca63cd 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
2015-04-23 01:14:07 +02:00
Lennart Poettering
0674bbea9c 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.
2015-04-23 00:37:47 +02:00
Lennart Poettering
e346512c68 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
2015-04-22 22:56:24 +02:00
Lennart Poettering
0a02157831 update TODO 2015-04-22 22:56:24 +02:00
Lennart Poettering
85fb80317b man: fix example in systemd-run(1)
Reported by Holger Reif.
2015-04-22 22:56:24 +02:00
Lennart Poettering
2708526c4a CODING_STYLE: document that we prefer /* comments */ over // comments 2015-04-22 22:56:24 +02:00
Kay Sievers
58a26e1269 build-sys: adjust link-order for non-gc-sections build 2015-04-22 22:10:28 +02:00
Nir Soffer
7375b3c487 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)
2015-04-22 19:16:58 +02:00
Lennart Poettering
6d785b6d07 man: elaborate on the order by which tmpfiles operations are executed 2015-04-22 18:24:47 +02:00
Lennart Poettering
ef43a39176 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
2015-04-22 18:20:27 +02:00
Lennart Poettering
3986b2581c 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.
2015-04-22 17:09:20 +02:00
Lennart Poettering
aee327b816 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.
2015-04-22 16:56:51 +02:00
Lennart Poettering
ffb296b2c2 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.
2015-04-22 16:52:53 +02:00
Lennart Poettering
2f4d3bb91f build-sys: minor simplification 2015-04-22 14:05:24 +02:00
Lennart Poettering
aea040c872 update TODO 2015-04-22 13:53:50 +02:00
Lennart Poettering
1d3087978a 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.
2015-04-22 13:50:56 +02:00
Lennart Poettering
a4b756b1ed Update TODO 2015-04-22 13:30:42 +02:00
Lennart Poettering
3a69881704 sd-bus: handle ppid=0 more gracefully (which happens for pid=1) 2015-04-22 13:27:53 +02:00
Lennart Poettering
fc68c92973 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.
2015-04-22 13:27:53 +02:00
Lennart Poettering
625728941d 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.
2015-04-22 13:27:53 +02:00
Lennart Poettering
21222ea5cd 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)
2015-04-22 13:27:53 +02:00
Lennart Poettering
03091baac3 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.
2015-04-22 13:27:53 +02:00
Kay Sievers
163ab29612 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!
2015-04-22 00:57:52 +02:00
Thomas Hindoe Paaboel Andersen
8d04b9af96 automount: remove unused variable 2015-04-21 22:40:10 +02:00
Lennart Poettering
1386e47db5 sd-bus: expose ppid field
kdbus has been passing us the ppid file for a while, actually make use
of it.
2015-04-21 20:58:09 +02:00
Lennart Poettering
3bd3150367 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 eb39a6239c), it started to carry
arch-dependent data, thus breaking multilib systems. It was then moved
to pkgconfiglibdir to deal with this (in
aec432c613), 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.
2015-04-21 20:35:17 +02:00
Lennart Poettering
e911de996a core: make unit deserialization more defensive 2015-04-21 20:23:41 +02:00
Lennart Poettering
f34beace37 automount: various smaller fixes 2015-04-21 20:23:41 +02:00
Michael Olbrich
deb0a77cf0 automount: add expire support 2015-04-21 20:23:41 +02:00
Kay Sievers
297f24a902 build-sys: efi - use $EFI_LIB_DIR
https://bugs.freedesktop.org/show_bug.cgi?id=89982
2015-04-21 19:48:24 +02:00
Kay Sievers
73e21667cb build-sys: add missing file 2015-04-21 19:48:23 +02:00
Ronny Chevalier
ca909b8469 test: test-path and test-execute only need units in test/ 2015-04-21 19:27:59 +02:00
Kay Sievers
8f1e0c5f38 delete unused LICENSE.MIT 2015-04-21 19:21:56 +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
fed2b07ebc 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.
2015-04-21 17:43:55 +02:00
Lennart Poettering
451d691ae1 tmpfiles: there's no systemd-forbid-user-logins.service service 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