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

20520 Commits

Author SHA1 Message Date
Tom Gundersen
44daf75d98 libudev: monitor - set nl_pid when reusing fd in udev_monitor_new_from_netlink_fd
This allows a fd to be created and configured as part of one monitor, to be passed in
to create a second monitor without having to redo any of the configuration.
2015-06-03 01:54:16 +02:00
Tom Gundersen
c26d1879c7 udevd: make cgroup logic independent of socket passing
This should have no behavioural change, but it is odd to tie the cgroup cleaning to
whether or not we are passed sockets.

The point really is if we are guaranteed to be in a dedicated cgroup, so instead
check for our parent being PID1 (we already implicitly only do this on systemd
systems).
2015-06-03 01:53:26 +02:00
Tom Gundersen
bf6871639e udevd: only bind ctrl and netlink sockets when we open them
If they are passed from PID1 this is not necessary.
2015-06-03 01:41:35 +02:00
Tom Gundersen
fcff1e7241 udevd: rename systemd_fds to listen_fds 2015-06-03 01:41:35 +02:00
Tom Gundersen
8314de1d81 udevd: simplify signal mask handling
We used to block all signals, and restore the original signal mask before exec'ing
external processes.

Now we just block the signals we care about and unconditionally unblock all signals
before exec'ing.
2015-06-03 01:41:34 +02:00
Tom Gundersen
a39423c2ef Merge pull request #42 from jonboulle/master
README: update links to reference new home (GitHub)
2015-06-03 01:03:54 +02:00
Tom Gundersen
cfe907ab6e Merge pull request #41 from mischief/ipforwarding
networkd: create "kernel" setting for IPForwarding
2015-06-03 01:02:51 +02:00
Jonathan Boulle
eb0914fc85 README: update links to reference new home (GitHub) 2015-06-02 15:57:50 -07:00
Nick Owens
3ed7e9c735 man: document IPForward=kernel option 2015-06-02 15:42:21 -07:00
Nick Owens
a70ec7f19f networkd: create "kernel" setting for IPForwarding
In 5a8bcb674f, IPForwarding was introduced
to set forwarding flags on interfaces in .network files. networkd sets
forwarding options regardless of the previous setting, even if it was
set by e.g. sysctl. This commit creates a new option for IPForwarding,
"kernel", that preserves the sysctl settings rather than always setting
them.

See https://bugs.freedesktop.org/show_bug.cgi?id=89509 for the initial
bug report.
2015-06-02 15:31:48 -07:00
Andreas Pokorny
495968cf4e udev: input_id - use ABS_MT_SLOT{-1} to exclude non touch screen devices
Peek at the ABS_MT_SLOT-1 axis. Expect that touch screens only
have axes inside the MT range.
2015-06-03 08:31:02 +10:00
Andreas Pokorny
fa5a113d11 udev: input_id - use direct property and mt axis for touch screen detection
A lot of touch screens use INPUT_PROP_DIRECT to indicate that touch input
maps directly to the underlying screen, while the BTN_TOUCH bit might not be
set.
2015-06-03 08:31:02 +10:00
Andreas Pokorny
15264e5aee udev: input_id - refactor device detection
This change switches to bools and separates bit flag evaluation from
decision making and application of udev properties, while hopefully
keeping the same semantics. Apart from using BTN_LEFT instead of BTN_MOUSE
for mouse detection.
2015-06-03 08:31:02 +10:00
Kay Sievers
2375607039 remove gudev and gtk-doc
The library moved to:
  https://git.gnome.org/browse/libgudev/
2015-06-03 00:22:53 +02:00
Thomas Hindoe Paaboel Andersen
7e518afab9 fix double semicolon typo 2015-06-02 23:29:20 +02:00
Kay Sievers
b30e7a269d hwdb: update 2015-06-02 20:19:31 +02:00
Marcel Holtmann
2fd51106ee hwdb: Update database of Bluetooth company identifiers 2015-06-02 19:04:11 +02:00
Tom Gundersen
8066f9e66b Merge pull request #12 from systemd-mailing-devs/1433236104-9967-1-git-send-email-m.olbrich@pengutronix.de
missing: add more btrfs defines
2015-06-02 18:45:16 +02:00
Tom Gundersen
28541a3d7c udev-builtin: path_id - don't pass NULL to udev_device_get_parent()
Being explicit about this makes the code easier to follow IMHO.
2015-06-02 18:12:47 +02:00
Tom Gundersen
3b64e4d4f4 udev: add some asserts
Mostly for documentation purposes.
2015-06-02 18:12:47 +02:00
Tom Gundersen
7283a80d10 sd-device: get_driver - remember if a device does not have a driver
Don't try to read it again.
2015-06-02 18:12:47 +02:00
Tom Gundersen
4189708ad0 sd-device: get_subsystem - don't complain if a device does not have a subsystem 2015-06-02 18:12:47 +02:00
Daniel Mack
d4cb023490 Merge pull request #5 from systemd-mailing-devs/1432910411-14517-1-git-send-email-llua@gmx.com
zsh-completion: a more style/tag aware _systemctl
2015-06-02 17:57:43 +02:00
Daniel Mack
ad2274289b Merge pull request #4 from systemd-mailing-devs/1431989131-25145-1-git-send-email-llua@gmx.com
zsh-completion: fix completion of --user services
2015-06-02 17:43:29 +02:00
Tom Gundersen
ea3db01418 Merge pull request #34 from systemd-mailing-devs/1432619328-32030-1-git-send-email-m.olbrich@pengutronix.de
missing: add more IFLA_VXLAN_* defines
2015-06-02 17:29:52 +02:00
Martin Pitt
9e89eb2478 Merge pull request #8 from systemd-mailing-devs/1433236059-9824-1-git-send-email-m.olbrich@pengutronix.de
random-util: guard including sys/auxv.h with the corresponding ifdef …
2015-06-02 17:24:34 +02:00
Daniel Mack
361d5b41a5 Merge pull request #39 from filbranden/manpages_rootprefix
Manpages rootprefix
2015-06-02 17:22:06 +02:00
Michael Biebl
dd33485025 build-sys: Normalize paths of configure options
Strip trailing slashes from options such as --with-rootprefix, so that building
with rootprefix="/" results in paths like "/lib" instead of "//lib".

Also handle paths such as "/usr/" gracefully.

Use m4/ax_normalize_path.m4 from the autoconf-archive project, which is now
included in our tree as per usual practices in using autoconf-archive macros.

Tested with the following configure options:
  ./configure \
        --with-rootprefix=/ \
        --with-rootlibdir=/lib64/ \
        --prefix=/usr/ \
        --libdir=/lib/ \
        --with-bashcompletiondir=/bash-completion/completions/

(The "prefix" and "libdir" are already automatically normalized by Autoconf,
this command is testing the others.)

Compared the config.log and resulting trees (in particular man pages) to
confirm double slashes were not present in the latter.

Also tested that a configuration using default options is not affected and that
`make distcheck` still works as expected.
2015-06-02 07:54:51 -07:00
Daniel Mack
7d2e33a416 man: replace hard-coded /usr/lib
Replace some /usr/lib occurences in man/ with &rootprefix;/lib.
2015-06-02 07:54:51 -07:00
Kay Sievers
12e55c7a60 Merge pull request #37 from haraldh/boot-options
90-loaderentry.install: fixup BOOT_OPTIONS
2015-06-02 16:28:28 +02:00
Harald Hoyer
6fd2ccc957 90-loaderentry.install: fixup BOOT_OPTIONS
better use "read -r -d '' -a" to read in the array. It handles multiple
lines and missing newline at the EOF.
2015-06-02 16:10:06 +02:00
Pablo Lezaeta Reyes [pˈaβ̞lo lˌe̞θaˈeta rˈejɛ]
6f54f5373a Separate the % sign from the number
In spanish the % sign is supposed to be separated from the number [1 and 2 both in spanish] so I separated the %% that draw the percentage sign from the number.

[1] http://www.fundeu.es/recomendacion/el-se-escribe-separado-de-la-cifra-a-la-que-acompana-802/
[2] http://aplica.rae.es/orweb/cgi-bin/v.cgi?i=QGkHLBzKcEgZrQyD

PD: I know that probably this is not the propper place but I don't know where submit the fix or if I do it right
2015-06-02 15:07:18 +02:00
Michael Olbrich
a67dab3490 random-util: guard including sys/auxv.h with the corresponding ifdef check 2015-06-02 12:03:20 +02:00
Michael Olbrich
d97fb40837 missing: add more btrfs defines 2015-06-02 12:03:18 +02:00
Daniel Mack
80979f1ce4 test-unit-file: add test for improperly escaped exec string
Add a regression test for the recent breakage of handling improperly
escaped exec strings in unit files.

Code contributed by Martin Pitt:

  https://bugs.freedesktop.org/show_bug.cgi?id=90794
2015-06-01 18:08:54 +02:00
Daniel Mack
22874a348f load-fragment: use UNESCAPE_RELAX flag to parse exec directives
The cunescape() helper function used to handle unknown escaping sequences
gracefully by copying them over verbatim.

Commit 527b7a42 ("util: rework cunescape(), improve error handling") added
a flag to make that behavior optional, and changed to default to error out
with -EINVAL otherwise.

However, config_parse_exec(), which is used to parse the
Exec{Start,Stop}{Post,Pre,} directives of unit files, was not changed along
with that commit, which means that directives with improperly escaped
command line strings are no longer parsed.

Relevant bugreports include:

  https://bugs.freedesktop.org/show_bug.cgi?id=90794
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787256

Fix this by passing UNESCAPE_RELAX to config_parse_exec() in order to
restore the original behavior.
2015-06-01 18:08:44 +02:00
Tom Gundersen
ccc1002a1c sd-device: ensure update_properties_buf() is a noop on failure
Don't clobber the sd_device struct, and don't leak memory when memory allocation fails.
2015-06-01 16:28:58 +02:00
Daniel Mack
c521a430fd zsh-completion: fix typo in _bootctl
The command is 'install', not 'instal'. Fix that typo.
2015-06-01 12:07:19 +02:00
Martin Pitt
d854ba50a8 sd-device: fix invalid property strv pointers
In device_update_properties_bufs(), the strv is built from pointers into the
single nul-terminated buf_nulstr string, to avoid allocating the key=value
strings twice. However, we must not do that while building and
GREEDY_REALLOC0()'ing buf_nulstr, as each time when this actually reallocates
memory the pointers we wrote into buf_strv so far become invalid.

So change the logic to first completely build the new buf_nulstr, and then
iterate over it to pick out the pointers to the individual key=value strings
for properties_strv.

This fixes invalid environment for udev callouts.
2015-06-01 12:04:37 +02:00
David Mohr
19672f1e5f udev: Bring back persistant storage symlinks for bcache
https://bugs.debian.org/787367
2015-06-01 11:44:52 +02:00
Colin Guthrie
bb243d471b tmpfiles: Fix comment typo 2015-06-01 09:27:47 +01:00
Tom Gundersen
3d7dc8e4f9 udevd: open sockets before forking
The communication channels must all be opened before forknig in daemon mode,
or we cannot guarantee that udevadm will work correctly as soon as udevd is
started.
2015-05-31 23:58:39 +02:00
Tom Gundersen
49f997f3bc udevd: don't allocate sd_event object before fork
In daemon mode we would break sd-event as it cannot work accross different processes.
Simply delay the allocation to after the fork.
2015-05-31 23:52:53 +02:00
Tom Gundersen
f6fd40d16a udevd: don't sanitize fd 0,1,2
Kay said: 'it is from ancient times, when we started udevd from the
kernel's usermodhelper which had no fd 0,1,2'.
2015-05-31 22:38:39 +02:00
Jason Pleau
d38e01dc96 core/namespace: Protect /usr instead of /home with ProtectSystem=yes
A small typo in ee818b8 caused /home to be put in read-only instead of
/usr when ProtectSystem was enabled (ie: not set to "no").
2015-05-31 20:29:36 +02:00
Ronny Chevalier
98d7580046 conf-parser: parsing error logs should show a type not a vartype
Instead of this:
[filename:1] Failed to parse nsec_t value, ignoring: garbage

we show this:
[filename:1] Failed to parse nsec value, ignoring: garbage
2015-05-30 12:24:16 +02:00
Ronny Chevalier
732b7f39a2 networkctl: fix uninitialized variable
We ignore the return value of sd_device_get_devtype, then devtype could
be uninitialized when used with streq_ptr. So we need to initialize it
first.
2015-05-30 11:19:36 +02:00
Ronny Chevalier
8f42ccd24b README: fix typo 2015-05-30 11:19:35 +02:00
Ronny Chevalier
da090dfd0b zsh-completion: update bootctl 2015-05-30 11:19:35 +02:00
Ronny Chevalier
0805e9a9c8 test-fdset: add more tests
add tests for the following functions:
- fdset_new_array
- fdset_steal_first
- fdset_isempty
2015-05-30 11:19:35 +02:00