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

25313 Commits

Author SHA1 Message Date
Daniel Mack
68de79d6a4 Merge pull request #2760 from ronnychevalier/rc/core_no_new_privileges_seccompv3
core: set NoNewPrivileges for seccomp if we don't have CAP_SYS_ADMIN
2016-03-21 12:57:43 +01:00
Daniel Mack
19180aadb5 Merge pull request #2826 from thom311/master
lldp: fix starting ttl timer for lldp neighbor
2016-03-21 12:44:38 +01:00
Daniel Mack
2d4122d4df Merge pull request #2875 from evverx/nspawn-template-bash-completion
bash completion: add --template to nspawn
2016-03-21 11:45:23 +01:00
Evgeny Vereshchagin
6d94d993c7 bash completion: add --template to nspawn 2016-03-20 17:55:58 +00:00
Michael Biebl
219e0ea74a man: fix typo in systemd-sysv-generator 2016-03-20 02:27:27 +01:00
Daniel Mack
9d74d73a4d Merge pull request #2865 from utezduyar/journald-upload
journal-upload: remove microhttpd dependency
2016-03-18 13:48:00 +01:00
Daniel Mack
af6cd87d98 Merge pull request #2862 from evverx/nspawn-expose-ports-error
nspawn: don't run nspawn --port=... without libiptc support
2016-03-18 12:00:29 +01:00
Umut Tezduyar Lindskog
2adeb166da journal-upload: remove microhttpd dependency
journal-upload doesn't really need microhttpd to run.
Without the dependency, we can cross compile systemd
without microhttpd and get the uploader part of the
remote logging.

Change-Id: I28dfa5ad2aae94e50de1d32713e1827623c3fd1d
2016-03-18 11:35:37 +01:00
Marcel Holtmann
6a692550f2 hwdb: Update database of Bluetooth company identifiers 2016-03-18 01:05:51 +01:00
Evgeny Vereshchagin
1c1ea21735 nspawn: don't run nspawn --port=... without libiptc support
We get
$ systemd-nspawn --image /dev/loop1 --port 8080:80 -n -b 3
--port= is not supported, compiled without libiptc support.

instead of a ping-nc-iptables debugging session
2016-03-17 21:07:11 +00:00
Daniel Mack
5fec580c84 Merge pull request #2839 from keszybz/use-sendfile-smarter
Use sendfile smarter
2016-03-17 20:33:41 +01:00
Daniel Mack
da9a4daa08 Merge pull request #2854 from keszybz/log-colors
systemd: obey systemd.log_color config
2016-03-17 20:30:16 +01:00
Daniel Mack
90e644608e Merge pull request #2856 from msekletar/merge-instance
core: look for instance when processing template name
2016-03-17 20:24:39 +01:00
Zbigniew Jędrzejewski-Szmek
2f368e4a11 basic/missing: move syscall definitions to basic/missing_syscall.h
We have a bunch of syscall wrapper definitions and it's easier to
see that they follow the same pattern if they are not interspersed
with other defines.

Change the wrappers to be uniform:
- if __NR_XXX is not defined, do not bother to call the syscall,
  and return -1/ENOSYS immediately.
- do not check __NR_XXX defines if we detect the symbol as defined,
  since we don't need them anyway
- reindent stuff for readability

New file basic/missing_syscall.h is included at the end of missing.h
because it might make use of some of the definitions in missing.h.
2016-03-17 13:34:34 -04:00
Zbigniew Jędrzejewski-Szmek
a44202e98b basic/copy: use copy_file_range()
For btrfs, c_f_r() is like BTRFS_IOC_CLONE which we already used, but also
works when max_bytes is set. We do call copy_bytes in coredump code with
max_bytes set, and for large files, so we might see some benefit from using
c_f_r() on btrfs.

For other filesystems, c_f_r() falls back to do_splice_direct(), the same as
sendfile, which we already call, so there shouldn't be much difference.

Tested with test-copy and systemd-coredump on Linux 4.3 (w/o c_f_r)
and 4.5 (w/ c_f_r).
2016-03-17 13:02:18 -04:00
Zbigniew Jędrzejewski-Szmek
1d4b557d1b basic/missing: add copy_file_range
syscall numbers based on:
https://fedora.juszkiewicz.com.pl/syscalls.html
2016-03-17 13:02:18 -04:00
David Herrmann
2ddbdcc9c2 Merge pull request #2858 from keszybz/fbdev-uaccess
rules: allow users to access frame buffer devices
2016-03-17 16:59:46 +01:00
Daniel Mack
c31be17f6b Merge pull request #2848 from keszybz/clang-warnings
Clang warnings
2016-03-17 16:41:20 +01:00
Zbigniew Jędrzejewski-Szmek
ce1d15ed0f Merge pull request #2859 from msekletar/ldconfig-after-localfs
units: run ldconfig.service after we have mounted all local file systems
2016-03-17 11:16:23 -04:00
Michal Sekletar
f66a1c48cf units: run ldconfig.service after we have mounted all local file systems
Also drop ConditionNeedsUpdate=|/etc. Regardless if system is updated
online or offline, updating dynamic loader cache should always be
responsibility of packaging tools/scripts.
2016-03-17 14:41:26 +01:00
Zbigniew Jędrzejewski-Szmek
dc9b58166c systemd: obey systemd.log_color config
Fixes #2845.
2016-03-17 09:33:56 -04:00
Zbigniew Jędrzejewski-Szmek
483d8bbb4c rules: allow users to access frame buffer devices
For example it allows weston to be started unprivileged.

Related discussion:
https://bugs.freedesktop.org/show_bug.cgi?id=73782
https://lists.freedesktop.org/archives/wayland-devel/2015-May/022005.html
https://bugzilla.redhat.com/show_bug.cgi?id=1226680
2016-03-17 08:40:39 -04:00
Michal Sekletar
7aad67e7f2 core: look for instance when processing template name
If first attempt to merge units failed and we are trying to do
merge the other way around and at the same time we are working with
template name, then other unit can't possibly be template, because it is
not possible to have template unit running, only instances of the
template. Thus we need to look for already active instance instead.
2016-03-16 15:40:14 +01:00
Zbigniew Jędrzejewski-Szmek
b18eb0a676 Merge pull request #2855 from tklauser/master
nspawn: Fix two misspellings of "hierarchy" in error messages
2016-03-16 09:51:25 -04:00
Tobias Klauser
998fdc16aa nspawn: Fix two misspellings of "hierarchy" in error messages 2016-03-16 14:34:00 +01:00
Martin Pitt
db6b984ba8 Merge pull request #2851 from eliasp/patch-1
Reference correct `machinectl` command in 219 NEWS
2016-03-16 10:35:30 +01:00
Elias Probst
f59dba2654 Reference correct machinectl command in 219 NEWS
NEWS for `219` references `machinectl list-images` to describe the introduced clone feature - this looks like a copy'n'paste problem.
Use `machinectl clone` instead.
2016-03-16 09:23:31 +01:00
Zbigniew Jędrzejewski-Szmek
fdbf7b554e Merge pull request #2797 from evverx/selinux-use-raw
selinux: use *_raw API from libselinux
2016-03-16 01:13:29 -04:00
Zbigniew Jędrzejewski-Szmek
897d202923 Merge pull request #2842 from petrosagg/nspawn-doc-fix
man: document missing KillSignal= .nspawn option
2016-03-15 20:21:54 -04:00
Zbigniew Jędrzejewski-Szmek
4cd35a79da Merge pull request #2843 from NetworkManager/clock_boottime
time-util: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported
2016-03-15 20:18:00 -04:00
Zbigniew Jędrzejewski-Szmek
c104bde7fe Merge pull request #2847 from whot/hwdb-updates
hwdb: correct resolution for Asus x550cc
2016-03-15 19:43:55 -04:00
Zbigniew Jędrzejewski-Szmek
c337642992 basic/log: remove unused return value 2016-03-15 19:40:33 -04:00
Zbigniew Jędrzejewski-Szmek
d2d23cf240 basic/c-rbtree: remove unused function 2016-03-15 19:40:33 -04:00
Zbigniew Jędrzejewski-Szmek
26e9e10b39 basic/macros: clang 3.5 doesn't support alloc_size
The attribute was removed in commit c047507 in the clang repository as it
was never properly implemented anyway. Avoid using the attribute with
clang because it generates a ton of annoying warnings.
2016-03-15 19:40:33 -04:00
Zbigniew Jędrzejewski-Szmek
7a827fcb11 test-copy: test with different max_bytes values 2016-03-15 19:26:28 -04:00
Petros Angelatos
b3969f73f9 man: document missing KillSignal= .nspawn option
Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
2016-03-15 15:08:04 -07:00
Peter Hutterer
ceb6e7973a hwdb: correct resolution for Asus x550cc
https://bugzilla.redhat.com/show_bug.cgi?id=1316655
2016-03-16 08:01:18 +10:00
Zbigniew Jędrzejewski-Szmek
00a8cf7763 basic/copy: use sendfile smarter
We called sendfile with 16kb (a.k.a. COPY_BUFFER_SIZE) as the maximum
number of bytes to copy. This seems rather inefficient, especially with
large files. Instead, call sendfile with a "large" maximum.

What "large" max means is a bit tricky: current file offset + max
must fit in loff_t. This means that as we call sendfile more than once,
we have to lower the max size.

With this patch, test-copy calls sendfile twice, e.g.:
sendfile(4, 3, NULL, 9223372036854775807) = 738760
sendfile(4, 3, NULL, 9223372036854037047) = 0
The second call is necessary to determine EOF.
2016-03-15 14:54:27 -04:00
Zbigniew Jędrzejewski-Szmek
ce33fddad0 test-copy: add a test shuffling bytes between normal files
I started looking into adding copy_file_range support, and discovered
that we can improve the way we call sendfile:
- sendfile(2) man page is missing an important bit: the number of bytes to
  copy cannot be too big (SSIZE_MAX actually), and the description of EINVAL
  return code does not mention this either,
- our implementation works but calls sendfile over and over with a small
  size, which seems suboptimal.

First add a test which (under strace) can be used to see current behaviour.
2016-03-15 14:53:31 -04:00
Lubomir Rintel
2abd5b5a49 time-util: fall back to CLOCK_MONOTONIC if CLOCK_BOOTTIME unsupported
It was added in 2.6.39, and causes an assertion to fail when running in mock
hosted on 2.6.23-based RHEL-6:

Assertion 'clock_gettime(map_clock_id(clock_id), &ts) == 0' failed at systemd/src/basic/time-util.c:70, function now(). Aborting.
2016-03-15 12:43:33 +01:00
Zbigniew Jędrzejewski-Szmek
b862a54255 Merge pull request #2840 from linkmauve/use-xdg-config-home
sd-path: use XDG_CONFIG_HOME instead of hardcoding ~/.config for user-dirs
2016-03-15 00:55:08 -04:00
Emmanuel Gil Peyrot
b6b0cfaafd sd-path: use XDG_CONFIG_HOME instead of hardcoding ~/.config for user-dirs 2016-03-15 04:09:44 +00:00
Zbigniew Jędrzejewski-Szmek
23a5000b44 Merge pull request #2838 from vapier/master
include sys/sysmacros.h in more places
2016-03-14 23:51:29 -04:00
Mike Frysinger
27d13af71c include sys/sysmacros.h in more places
Since glibc is moving away from implicitly including sys/sysmacros.h
all the time via sys/types.h, include the header directly in more
places.  This seems to cover most makedev/major/minor usage.
2016-03-14 23:29:10 -04:00
Thomas Haller
0513ea4e3f lldp: fix starting ttl timer for lldp neighbor
lldp_start_timer() was only called during sd_lldp_get_neighbors().
Ensure that the timer is (re-)started when a new neighbor appears.
Otherwise, the timer is not started when relying on the events alone.

Fixes: 34437b4f9c
2016-03-14 17:02:19 +01:00
Daniel Mack
ca9bc74bd0 Merge pull request #2827 from keszybz/public-headers
ANSI C compatibility for public headers
2016-03-14 16:55:04 +01:00
Zbigniew Jędrzejewski-Szmek
70e43ee7be Merge pull request #2735 from evverx/fix-2730
Add test for -.mount with Alias=root.mount, bug #2730.
2016-03-14 09:12:29 -04:00
Zbigniew Jędrzejewski-Szmek
51f2174037 Merge pull request #2834 from coling/master 2016-03-14 08:31:08 -04:00
Zbigniew Jędrzejewski-Szmek
a0796d1c1f Merge pull request #2832 from evverx/fix-mkfs-btrfs-checking
Fix mkfs.btrfs checking
2016-03-14 08:14:41 -04:00
Zbigniew Jędrzejewski-Szmek
87836c67d8 Merge pull request #2835 from tklauser/man-spelling
man: network - Fix misspelling of "router advertisement"
2016-03-14 07:47:01 -04:00