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

25313 Commits

Author SHA1 Message Date
Lennart Poettering
2685875eb1 Merge pull request #2939 from bjne/read_only_bindmount
dont create bind-mount target when it exists
2016-04-01 18:25:34 +02:00
Bjørnar Ness
b97e83cb52 prevent systemd-nspawn from trying to create target
for bind-mounts when they already exist. This allows
bind-mounting over read-only files.
2016-04-01 17:31:55 +02:00
Lennart Poettering
f1057581fc Merge pull request #2936 from martinpitt/master
sd-dbus: Fix uint32 property reading
2016-04-01 14:40:24 +02:00
Martin Pitt
c6ba5b8069 systemctl: use correct printf macros for uint32
%u is a simple uint which might not be 32 bit on every platform. Use PRIu32
instead.
2016-04-01 14:21:35 +02:00
Martin Pitt
da8358c625 bus-util: Fix reading uint32 properties
Fix copy&paste bug in map_basic() to use the correct data type for
SD_BUS_TYPE_UINT32. Before we were copying the wrong 32 bits into the
destination pointer, resulting in complete garbage on big-endian systems.

Fixes #2927
2016-04-01 14:16:14 +02:00
Zbigniew Jędrzejewski-Szmek
1db30aeab1 Merge pull request #2915 from vinaykul/master 2016-03-31 00:52:23 -04:00
Vinay Kulkarni
413708d106 DHCP DUID, IAID configuration options 2016-03-30 16:33:55 -07:00
Daniel Mack
97607e1ef9 Merge pull request #2919 from ColdPie1/udev_get_parent_docs
man: Fix documented parameters for udev_device_get_ functions
2016-03-30 18:58:12 +02:00
Andrew Eikum
7f7341e31f man: Fix documented parameters for udev_device_get_ functions 2016-03-30 10:10:36 -05:00
Zbigniew Jędrzejewski-Szmek
f5924cab7f Merge pull request #2915 from lnykryn/template
core: improve error message when starting template without instance
2016-03-30 08:40:49 -04:00
Lukas Nykryn
5d512d5442 core: improve error message when starting template without instance 2016-03-30 13:54:33 +02:00
Zbigniew Jędrzejewski-Szmek
ab19c9e457 Merge pull request #2898 from bengal/lldp-api
lldp: move public macros to sd-lldp.h and namespace them
2016-03-29 21:00:58 -04:00
Zbigniew Jędrzejewski-Szmek
1b81db7a66 Merge pull request #2903 from keszybz/cgroup2-v3
core: cgroup2 support
2016-03-29 20:25:00 -04:00
Daniel Mack
a9447e0e48 Merge pull request #2911 from evverx/shutdown-watchdog-infinity
core: ShutdownWatchdogSec=infinity disables the watchdog logic too
2016-03-29 16:06:30 +02:00
Evgeny Vereshchagin
5146c61928 core: ShutdownWatchdogSec=infinity disables the watchdog logic too
This is a follow-up for 947292eef
2016-03-29 11:13:55 +00:00
Daniel Mack
9081e5abab Merge pull request #2907 from evverx/runtime-watchdog-infinity
core: RuntimeWatchdogSec=infinity disables the watchdog logic
2016-03-29 10:35:52 +02:00
Daniel Mack
86a4231553 Merge pull request #2905 from keszybz/gcrypt-compilation
build-sys: fix build with libgrcypt disabled
2016-03-29 10:35:07 +02:00
Evgeny Vereshchagin
947292eef4 core: RuntimeWatchdogSec=infinity disables the watchdog logic 2016-03-28 17:17:32 +00:00
Zbigniew Jędrzejewski-Szmek
038e261911 Merge pull request #2906 from Lu-Biao/shared
shared: fix a misspelling of "journalctl"
2016-03-28 10:26:42 -04:00
Biao Lu
f0634dd175 shared: fix a misspelling of "journalctl" 2016-03-29 01:46:04 +08:00
Zbigniew Jędrzejewski-Szmek
b68f10bf1f build-sys: fix build with libgrcypt disabled
- Move gcrypt.h include inside grcrypt-util.h.
- Allow gcrypt-util.[ch] to be compiled even without gcrypt.
This allows the logic in files using gcrypt to be simplified.

- Fix compilation of systemd-resolve without gcrypt.
systemd-resolved already supported that.

Fixes #2711.
2016-03-27 21:51:44 -04:00
Tejun Heo
e57051f542 core: update invoke_sigchld_event() to handle NULL ->sigchld_event()
After receiving SIGCHLD, one of the ways manager_dispatch_sigchld() maps the
now zombie $PID to its unit is through manager_get_unit_by_pid_cgroup() which
reads /proc/$PID/cgroup and looks up the unit associated with the cgroup path.

On non-unified cgroup hierarchies, a process is immediately migrated to the
root cgroup on death and the cgroup lookup would always have returned the unit
associated with it, making it rather pointless but safe.  On unified hierarchy,
a zombie remains associated with the cgroup that it was associated with at the
time of death and thus manager_get_unit_by_pid_cgroup() will look up the unit
properly.

However, by the time manager_dispatch_sigchld() is running, the original cgroup
may have become empty and it and its associated unit might already have been
removed.  If the cgroup path doesn't yield a match, manager_dispatch_sigchld()
keeps pruning the leaf component.  This means that the function may return a
slice unit for a pid and as a slice doesn't have ->sigchld_event() handler,
calling invoke_sigchld_event() on it causes a segfault.

This patch updates invoke_sigchld_event() so that it skips calling if the
handler is not set.
2016-03-26 12:06:06 -04:00
Tejun Heo
ab2c3861dc core: update populated event handling in unified hierarchy
Earlier during the development of unified hierarchy, the populated event was
reported through by the dedicated "cgroup.populated" file; however, the
interface was updated so that it's reported through the "populated" field of
"cgroup.events" file.  Update populated event handling logic accordingly.
2016-03-26 12:05:57 -04:00
Alban Crequy
099619957a cgroup2: use new fstype for unified hierarchy
Since Linux v4.4-rc1, __DEVEL__sane_behavior does not exist anymore and
is replaced by a new fstype "cgroup2".

With this patch, systemd no longer supports the old (unstable) way of
doing unified hierarchy with __DEVEL__sane_behavior and systemd now
requires Linux v4.4 for unified hierarchy.

Non-unified hierarchy is still the default and is unchanged by this
patch.

67e9c74b8a
2016-03-26 12:05:29 -04:00
Zbigniew Jędrzejewski-Szmek
09541e49eb Merge pull request #2887 from martinpitt/master
Fix logind crash if shutdown is called from a non-tty
2016-03-25 17:06:50 -04:00
Beniamino Galvani
6afa676780 lldp: move public macros to sd-lldp.h and namespace them
lldp.h contains definitions of LLDP types, subtypes and capabilities which
should be exposed in public headers. Get rid of the file and move those
definitions to sd-lldp.h with the SD_ prefix.
2016-03-24 16:41:48 +01:00
Daniel Mack
d8fd85e94f Merge pull request #2892 from yuwata/localectl
localectl: remove an unnecessary line break from and align the output of status command
2016-03-24 10:37:19 +01:00
Martin Pitt
b4944d2df2 logind: fix crash when shutdown is not issued from a tty
It's possible that sd_bus_creds_get_tty() fails and thus
scheduled_shutdown_tty is NULL in method_schedule_shutdown().

Fix logind_wall_tty_filter() to get along with that, by showing the message on
all TTYs, instead of crashing in strcmp().

https://launchpad.net/bugs/1553040
2016-03-24 08:35:17 +01:00
Martin Pitt
b59f0ecd27 core: fix "stoppping" typo 2016-03-24 08:35:17 +01:00
Yu Watanabe
c86b2d8f73 localectl: align output of 'localectl status' command
If kernel command line options for locale are given,
the output of 'localectl status' command is not aligned,
for example,
=============
Warning: Settings on kernel command line override system locale settings in /etc/locale.conf.
  Command Line: LANG=C
   System Locale: LANG=C
       VC Keymap: n/a
      X11 Layout: n/a
=============
This commit fixes the alignment.
2016-03-24 10:58:38 +09:00
Yu Watanabe
a75db59cf7 localectl: remove unnecessary line break
If /etc/locale.conf is empty or does not exist, the output of
'localectl status' command includes an unnecessary line break
as follows:
=======================
   System Locale: n/a

       VC Keymap: n/a
      X11 Layout: n/a
=======================
This commit removes the line break after the system locale.
2016-03-24 10:53:00 +09:00
Daniel Mack
1eb963a32d Merge pull request #2885 from gbrikis/master
core: Fix path for opening ffs endpoint ep0
2016-03-23 19:48:26 +01:00
Daniel Mack
3288dcd390 Merge pull request #2888 from kinvolk/iaguis/remove-dots
run: remove period when printing started units
2016-03-23 18:06:07 +01:00
Georgia Brikis
27a6ea9163 core: Fix path for opening ffs endpoint ep0
usbffs_address_create() expects an absolute path to the file that is
supposed to be opened. The path specified only leads to the directory
containing the endpoint ep0 not the endpoint itself. This commit adds
the endpoints name to the path.
2016-03-23 17:47:45 +01:00
Iago López Galeiras
110ceee58e run: remove period when printing started units
If you start a unit with systemd-run you usually need its name to
inspect it or stop it. Removing the period makes copying the unit name
easier.
2016-03-23 15:45:32 +01:00
Daniel Mack
15cb891e15 Merge pull request #2886 from fbuihuu/systemctl-list-units-inactive-state
systemctl: no need to pass --all if inactive is explicitly requested …
2016-03-23 13:08:04 +01:00
Daniel Mack
51359d02d1 Merge pull request #2883 from keszybz/allow-boms
Ignore BOM in config files
2016-03-23 13:00:33 +01:00
Franck Bui
ebc962656c systemctl: no need to pass --all if inactive is explicitly requested in list-units
If list-units command is explicitly asked to show inactive units
by using '--state=inactive' option, there's no need to force the user
to pass '--all' option to include inactive units in the search in
this case.
2016-03-23 08:36:05 +01:00
Zbigniew Jędrzejewski-Szmek
9dd7ea9a7d Ignore BOM in config files
Fixes #2823.

Also remove unnecessary feof check.
2016-03-22 18:51:59 -04:00
Zbigniew Jędrzejewski-Szmek
944dedd302 Merge pull request #2844 from yarda/uaccess-3dprinters
Add support for 3D printers to uaccess (ID_3DPRINTER).
2016-03-22 11:00:20 -04:00
Jaroslav Škarvada
68ea57b21d Added support for 3D printers to uaccess (ID_MAKER_TOOL)
This is to support 3D printers, CNCs, laser cutters, 3D scanners, etc.
2016-03-22 14:09:23 +01:00
Daniel Mack
99d91109a6 Merge pull request #2880 from keszybz/more-tests
Add some simple tests for env_value_is_valid and env_assignment_is_valid
2016-03-22 10:23:12 +01:00
Zbigniew Jędrzejewski-Szmek
c4b3e434a7 Merge pull request #2879 from ronnychevalier/rc/test_execute_fix
test-execute: fix execution of AmbientCapabilities tests
2016-03-21 23:38:28 -04:00
Zbigniew Jędrzejewski-Szmek
85d8f87e24 Merge pull request #2882 from systemd/revert-2818-master
Revert "DHCP DUID and IAID configurability"
2016-03-21 22:30:53 -04:00
Zbigniew Jędrzejewski-Szmek
afec45395f Revert "DHCP DUID and IAID configurability" 2016-03-21 18:24:24 -04:00
Zbigniew Jędrzejewski-Szmek
b8c83cfc1a test-env-util: test env_{value,assignment}_is_valid
Just to make sure everything works as expected in relation
to https://bugzilla.redhat.com/show_bug.cgi?id=1312384.
2016-03-21 16:49:42 -04:00
Zbigniew Jędrzejewski-Szmek
93515caebf tests: rename test-env-replace to test-env-util 2016-03-21 16:17:18 -04:00
Ronny Chevalier
34f5ff465f test-execute: fix execution of AmbientCapabilities tests
Wrong tests were executed
2016-03-21 18:48:12 +01:00
Daniel Mack
e31512b1c9 Merge pull request #2878 from martinpitt/master
test-copy: use correct data type for max_bytes
2016-03-21 16:47:31 +01:00
Martin Pitt
fa13cf9e21 test-copy: use correct data type for max_bytes
copy_bytes() and the comparisons in test_copy_bytes_regular_file() expect an
uint64_t, not a size_t. On 32 bit architectures the latter is 32 bit, leading
to truncation errors.

Fixes regression from commit 7a827fcb.
2016-03-21 14:58:30 +01:00