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

29689 Commits

Author SHA1 Message Date
Yu Watanabe
4429c69f8d units: do not perform m4 if not necessary (#6575) 2017-08-09 09:13:41 -04:00
Xiang Fan
c7f6ca9379 rfkill: fix typo (#6574) 2017-08-09 12:51:53 +02:00
Lennart Poettering
c086160f77 Merge pull request #6568 from sourcejedi/test
sd-login: test - fix failure when run from non-graphical seat
2017-08-09 09:47:33 +02:00
Zbigniew Jędrzejewski-Szmek
c715e7a96f Add rpm macro %_userpresetdir (#6571)
https://bugzilla.redhat.com/show_bug.cgi?id=1479580
2017-08-09 09:45:02 +02:00
bengal
b1f24b75af dhcp-network: adjust sockaddr length for addresses longer than 8 bytes (#6527)
An infiniband hardware address is 20 bytes, but sockaddr_ll.sll_addr is only 8
bytes. Explicitly ensure that sockaddr_union has enough space for infiniband
addresses, even if they run over sockaddr_ll and add a macro to compute the
proper size to pass to kernel.
2017-08-08 18:55:31 +02:00
Alan Jenkins
e6f44233c6 sd-login: test - fix failure when run from non-graphical seat
Observed when running from the console of a systemd nspawn container
(see failure below).

The value of r was tested, when r was last set by
sd_session_can_graphical().  This did not correspond to the value expected.

Fix the code, so we compare relevant values now.  Hopefully :).


Test failure
------------

/* Information printed is from the live system */
sd_pid_get_unit(0, …) → "session-13.scope"
sd_pid_get_user_unit(0, …) → "n/a"
sd_pid_get_slice(0, …) → "user-1000.slice"
sd_pid_get_session(0, …) → "13"
sd_pid_get_owner_uid(0, …) → 1000
sd_pid_get_cgroup(0, …) → "/user.slice/user-1000.slice/session-13.scope"
sd_uid_get_display(1000, …) → "13"
sd_uid_get_sessions(1000, …) → [2] "15 13"
sd_uid_get_seats(1000, …) → [1] "seat0"
sd_session_is_active("13") → yes
sd_session_is_remote("13") → no
sd_session_get_state("13") → "active"
sd_session_get_uid("13") → 1000
sd_session_get_type("13") → "tty"
sd_session_get_class("13") → "user"
sd_session_get_display("13") → "n/a"
sd_session_get_remote_user("13") → "n/a"
sd_session_get_remote_host("13") → "n/a"
sd_session_get_seat("13") → "seat0"
sd_session_can_multi_seat("seat0") → no
sd_session_can_tty("seat0") → no
sd_session_can_graphical("seat0") → no
sd_uid_get_state(1000, …) → active
Assertion '!!k == !!r' failed at ../src/libsystemd/sd-login/test-login.c:191, function test_login(). Aborting.
2017-08-08 16:55:15 +01:00
Alan Jenkins
5947643cc2 sd-login: test - fix function name in output 2017-08-08 16:55:15 +01:00
Torstein Husebø
ed88a9007a treewide: fix typos (#6566) 2017-08-08 10:05:29 -04:00
Evgeny Vereshchagin
4f6631c8fc sd-bus: free everything when bus_set_address_user fails (#6552)
Fixes:
```
$ env -i valgrind --leak-check=full ./build/test-bus-chat
...
==7763== 1,888 (1,824 direct, 64 indirect) bytes in 1 blocks are
definitely lost in loss record 2 of 2
==7763==    at 0x4C2FA50: calloc (vg_replace_malloc.c:711)
==7763==    by 0x4F8FF9A: sd_bus_new (sd-bus.c:175)
==7763==    by 0x4F938BF: sd_bus_open_user (sd-bus.c:1138)
==7763==    by 0x109ACD: server_init (test-bus-chat.c:70)
==7763==    by 0x10BCF8: main (test-bus-chat.c:526)
==7763==
```

Closes #6481
2017-08-08 08:42:51 +02:00
Xiang Fan
5aece00d45 rules: split the rfkill subsystem rule (#6556)
This patch makes sure both rules are applied to rfkill devices.
Otherwise the ENV rule may be skipped if path_id fails.

Fixes: #6528
2017-08-08 08:41:15 +02:00
Yu Watanabe
debe5d2376 unit: remove redundant options 2017-08-08 12:17:12 +09:00
Yu Watanabe
29444df23b tmpfiles: drop systemd-remote.conf
The directories are only used by the specific services, and
created before the services are started. So, it is not necessary
to create them by systemd-tmpfiles.
2017-08-08 12:17:07 +09:00
Yu Watanabe
d0e62ae0f6 units: use {State,Logs}Directory= if they are applicable 2017-08-08 12:17:01 +09:00
Alan Jenkins
54194afb99 getty-generator: shift relevant comment to above tty_is_vc()
Comments typically go immediately above the code to implement the
described behaviour.  Putting it below confused me for a moment.
2017-08-07 17:23:41 +01:00
Yu Watanabe
cffaed83e8 core: add missing properties in D-Bus API
Closes #6466.
2017-08-08 00:37:02 +09:00
Yu Watanabe
b16bd5350f seccomp-util: add parse_syscall_archs() 2017-08-07 23:41:52 +09:00
Yu Watanabe
29ea9f0f42 process-util: add sched_{policy,priority}_is_valid() 2017-08-07 23:41:39 +09:00
Yu Watanabe
032cf8e4d2 cpu-set-util: add parse_cpu_set() 2017-08-07 23:40:40 +09:00
Yu Watanabe
07d46372fe securebits-util: add secure_bits_{from_string,to_string_alloc}() 2017-08-07 23:40:25 +09:00
Yu Watanabe
dd1f5bd0aa cap-list: add capability_set_{from_string,to_string_alloc}() 2017-08-07 23:25:11 +09:00
Benjamin Robin
c23c34bcba build-sys: Fix Makefile wrapper for install target (#6548) 2017-08-07 11:29:20 +02:00
Jouke Witteveen
15d167f8a3 core: propagate reload from RELOADING=1 notification (#6550) 2017-08-07 11:27:24 +02:00
Evgeny Vereshchagin
ca992ecf07 tests: use ninja-build if ninja is not available (#6544)
This makes the tests work on CentOS, which currently has ninja-build
only.
2017-08-07 11:06:07 +02:00
Yu Watanabe
2d35b79cdc man: DynamicUser= does not imply PrivateDevices= (#6510)
Follow-up for effbd6d2ea.
2017-08-07 11:02:47 +02:00
Lennart Poettering
b5338ddcfd Merge pull request #6549 from yuwata/pedantic-checks
journal-remote: remove MHD_USE_PEDANTIC_CHECKS from the default flags
2017-08-07 10:52:27 +02:00
Yu Watanabe
e2e8683e6b microhttpd-util: add comment 2017-08-07 10:35:05 +09:00
Zbigniew Jędrzejewski-Szmek
5f346ee7fc Merge pull request #6536 from yuwata/fix-warning
Core: cleanups
2017-08-06 16:19:49 -04:00
Yu Watanabe
837df14040 core: do not ignore returned values 2017-08-06 23:34:55 +09:00
Yu Watanabe
a77e00a5dc journal-remote: remove MHD_USE_PEDANTIC_CHECKS from the default flags
Follow-up for 0105858734.
2017-08-06 23:26:46 +09:00
Luca Bruno
28dd66ecfc core: evaluate presets after generators have run (#6526)
This commit moves the first-boot system preset-settings evaluation out
of main and into the manager startup logic itself. Notably, it reverses
the order between generators and presets evaluation, so that any changes
performed by first-boot generators are taken into the account by presets
logic.

After this change, units created by a generator can be enabled as part
of a preset.
2017-08-06 09:24:24 -04:00
Yu Watanabe
70d54d9072 core: replace strcmp() == 0 with streq() 2017-08-06 13:08:40 +09:00
Yu Watanabe
e940c1ef1d core: fix typo 2017-08-06 13:08:37 +09:00
Yu Watanabe
ecfbc84f1c core: define variables only when they are required
Follow-up for 7f18ef0a55.
2017-08-06 13:08:34 +09:00
Yu Watanabe
21771f338d bus-util: do not print (uint64_t) -1 as is (#6522)
Closes #4295 and #6511.
2017-08-05 20:37:25 -04:00
Alan Jenkins
ecaa5ad89f test-condition: fix test_condition_test_group() (#6531)
I hit a test failure with the `max_gid+1` test.  Problem is that we loop
over 0..r, but set `r` again within the loop (to 1).  So max_gid is only
set based on the first supplementary GID.

ConditionGroup=1000 → 1
ConditionGroup=4 → 1
ConditionGroup=adm → 1
ConditionGroup=1001 → 1
Assertion 'r == 0' failed at ../src/test/test-condition.c:462, function
test_condition_test_group(). Aborting.

$ id
uid=1000(alan-sysop) gid=1000(alan-sysop) groups=1000(alan-sysop),4(adm),
10(wheel),1001(sshlogin)
2017-08-05 19:25:19 -04:00
dkg
d7cefe8b2b man: document socket requirement for systemd-socket-proxyd (#6535)
Without this requirement, if proxy-to-nginx.socket was down, and the sysadmin
were to do:

    systemctl start proxy-to-nginx.service

then the service would come up without a configured socket, which doesn't make
sense.  Normally this isn't how we expect a socket-activated service to start,
but it's possible for an admin to do this (if the .socket were already running,
the systemd-socket-proxyd process will start effectively idle).  But the
.service shouldn't end up in a broken state if the .socket isn't already
listening.

Adding the explicit Requires: should ensure that an admin with this
configuration state can't accidentally break their system.
2017-08-05 19:19:09 -04:00
Mike Gilbert
8f968c7321 Revert "README: document that gperf 3.1 is required for building now" (#6541)
This reverts commit 4f5e972279.

Building with gperf 3.0 works just fine; we had an autoconf check to
determine the correct data types, and this check was ported to meson.
2017-08-05 18:30:37 -04:00
Martin Pitt
054ee249a2 test: Factorize common integration test functions (#6540)
All test/TEST* but TEST-02-CRYPTSETUP share the same check_result_qemu()
and test_cleanup(), so move them into test_functions and only override
them in TEST-02-CRYPTSETUP.

Also provide a common test_run() which by default assumes that both QEMU
and nspawn tests are run. Particular tests which don't support either
need to explicitly opt out by setting $TEST_NO_{QEMU,NSPAWN}. Do it this
way around to avoid accidentally forgetting to opt in, and to encourage
test authors to at least always support nspawn.
2017-08-04 15:34:14 +03:00
Evgeny Vereshchagin
a93e2f65eb Merge pull request #6518 from joukewitteveen/process-rename
process-util: update the end pointer of the process name on rename
2017-08-04 14:54:47 +03:00
Jouke Witteveen
049c884a3b test-process-util: test multiple invocations of rename_process 2017-08-04 11:25:57 +02:00
Jouke Witteveen
01f989c662 process-util: update the end pointer of the process name on rename (#6492)
We only updated the end pointer when allocating new memory, i.e. on the first
call to rename_process.
2017-08-04 11:25:49 +02:00
Jakub Wilk
785889e56d man: fix typos (#6532) 2017-08-03 17:36:21 -04:00
Yu Watanabe
ad6fc5bbae meson: fix modprobedir (#6523)
Follow-up for 582faeb461.
2017-08-03 08:01:38 -04:00
Lennart Poettering
0d44940773 Revert "units: set ConditionVirtualization=!private-users on journald audit socket" (#6513)
* Revert "modprobe.d: ship drop-in to set bonding max_bonds to 0 (#6448)"

This reverts commit 582faeb461.

* Revert "units: set ConditionVirtualization=!private-users on journald audit socket (#6508)"

This reverts commit d2a1ba103b.
2017-08-02 16:39:54 +02:00
Dimitri John Ledkov
582faeb461 modprobe.d: ship drop-in to set bonding max_bonds to 0 (#6448)
This allows networkd to correctly manage bond0 using networkd, when requested
by the user.

Fixes #5971 #6184
2017-08-02 08:41:18 -04:00
Dimitri John Ledkov
d2a1ba103b units: set ConditionVirtualization=!private-users on journald audit socket (#6508)
It fails to start in an unprivileged container as audit is not namespace aware.
2017-08-02 10:15:26 +02:00
Jan Synacek
ebc6f34a0b scsi_id: add missing options to getopt_long() (#6501) 2017-08-02 10:12:33 +02:00
Susant Sahani
2959fb07cb networkd: add scope to address section (#6449)
This work allows to configure address Scope to

host | link | global or a number.

Closes #6446
2017-08-01 09:44:08 +02:00
Lennart Poettering
f19ca6105e Merge pull request #6420 from keszybz/gateway-name
Rename "gateway" to "_gateway" and other resolved changes
2017-08-01 09:43:41 +02:00
Fabio Kung
7f18ef0a55 core: check which MACs to use before a new mount ns is created (#6498)
/sys is not guaranteed to exist when a new mount namespace is created.
It is only mounted under conditions specified by
`namespace_info_mount_apivfs`.

Checking if the three available MAC LSMs are enabled requires a sysfs
mounted at /sys, so the checks are moved to before a new mount ns is
created.
2017-08-01 09:15:18 +02:00