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

18806 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
b50191c23f man: remove "nofail" from systemd.swap(5)
As suggested by Marcos Felipe Rasia de Mello <marcosfrm@gmail.com>.
2015-01-13 20:05:42 -05:00
Cristian Rodríguez
d538bfc713 machinectl: use GNU basename, not the XPG version 2015-01-13 18:27:49 -05:00
Tom Gundersen
f0c4b1c3fd refcnt: refcnt is unsigned, fix comparisons
This does not make a difference, but the code was confusing.
2015-01-13 23:03:11 +01:00
Lennart Poettering
ab5e3a1bcc nspawn: --help typo fix 2015-01-13 20:59:07 +01:00
Lennart Poettering
02c74033ed update TODO 2015-01-13 20:55:13 +01:00
Lennart Poettering
43c6d5abac networkd: propagate IPFoward= per-interface setting also to /proc/sys/net/ipv4/ip_forward
We need to turn on /proc/sys/net/ipv4/ip_forward before the
per-interface forwarding setting is useful, hence let's propagate the
per-interface setting once to the system-wide setting.

Due to the unclear ownership rules of that flag, and the fact that
turning it on also has effects on other sysctl flags we try to minimize
changes to the flag, and only turn it on once. There's no logic to
turning it off again, but this should be fairly unproblematic as the
per-interface setting defaults to off anyway.
2015-01-13 20:55:13 +01:00
Lennart Poettering
cd1ddd5421 udev: make use of new one_zero() helper where appropriate 2015-01-13 20:55:13 +01:00
Lennart Poettering
769d324c99 networkd: make IP forwarding for IPv4 and IPv6 individually configurable 2015-01-13 20:17:07 +01:00
Lennart Poettering
db9fd84944 network: IPMasquerade= implies IPForward=, hence remove it 2015-01-13 20:17:07 +01:00
Lennart Poettering
fd6d906cf4 networkd: rename misnamed boolean 2015-01-13 20:17:07 +01:00
Lennart Poettering
cb9fc36a12 networkd: introduce an AddressFamilyBoolean enum type
This introduces am AddressFamilyBoolean type that works more or less
like a booleaan, but can optionally turn on/off things for ipv4 and ipv6
independently. THis also ports the DHCP field over to it.
2015-01-13 20:17:06 +01:00
Lennart Poettering
66518acd40 journald: allow zero length datagrams again
This undoes a small part of 13790add4b
which was erroneously added, given that zero length datagrams are OK,
and hence zero length reads on a SOCK_DGRAM be no means mean EOF.
2015-01-13 20:17:06 +01:00
Lennart Poettering
0dfaa00607 nspawn: add "-n" shortcut for "--network-veth"
Now that networkd's IP masquerading support means that running
containers with "--network-veth" will provide network access out of the
box for the container, let's add a shortcut "-n" for it, to make it
easily accessible.
2015-01-13 20:17:06 +01:00
Jan Engelhardt
bd763d350c doc: add cross-references between systemd.{link, netdev, network} 2015-01-13 18:27:33 +01:00
Tom Gundersen
2f6379a9ac doc: network - add comment about default prefix size
Should hopefully make it clear that this is not some magic value, just the default we picked.

Suggested by Jan Engelhardt.
2015-01-13 18:23:59 +01:00
Daniel Mack
07bde8c0ff fw-util: fix errno typo for !HAVE_LIBIPTC 2015-01-13 15:50:36 +01:00
Patrik Flykt
ec767e6836 TODO: DHCPv6 Information Request has been implemented 2015-01-13 15:09:09 +02:00
Lennart Poettering
c14db9b32a update TODO 2015-01-13 13:55:15 +01:00
Lennart Poettering
b4d8ef7c99 machined: refuse certain operation on non-container machines, since they cannot work elsewhere 2015-01-13 13:55:15 +01:00
Lennart Poettering
6da023a048 import: make sure we don't mangle file ownerships with the local passwd database when untarring 2015-01-13 13:55:15 +01:00
Lennart Poettering
6d0b55c272 nspawn: add new option "--port=" for exposing container ports on the local host
This exposes an IP port on the container as local port using DNAT.
2015-01-13 13:55:15 +01:00
Lennart Poettering
5a8bcb674f networkd: add minimal IP forwarding and masquerading support to .network files
This adds two new settings to networkd's .network files:
IPForwarding=yes and IPMasquerade=yes. The former controls the
"forwarding" sysctl setting of the interface, thus controlling whether
IP forwarding shall be enabled on the specific interface. The latter
controls whether a firewall rule shall be installed that exposes traffic
coming from the interface as coming from the local host to all other
interfaces.

This also enables both options by default for container network
interfaces, thus making "systemd-nspawn --network-veth" have network
connectivity out of the box.
2015-01-13 13:55:15 +01:00
Lennart Poettering
76917807eb shared: add minimal firewall manipulation helpers for establishing NAT rules, using libiptc 2015-01-13 13:55:15 +01:00
Martin Pitt
6cb7fa17b3 core: Fix EACCES check for OOM adjustments
Commit 3bd5c3 added a check for EACCES, but missed the minus sign.
2015-01-13 07:06:31 +01:00
Zbigniew Jędrzejewski-Szmek
038cf33420 Remove some fixed items from TODO 2015-01-12 19:15:02 -05:00
Ronny Chevalier
ee14023fd5 zsh-completion: add missing completions for systemd-tmpfiles 2015-01-12 22:19:34 +01:00
Ronny Chevalier
a80cea6861 zsh-completion: add missing completions for systemd-run 2015-01-12 22:13:33 +01:00
Ronny Chevalier
26bd71f06c zsh-completion: add missing completions for systemd-analyze 2015-01-12 22:13:18 +01:00
Ronny Chevalier
c285cb5c55 zsh-completion: add missing -M completion for timedatectl 2015-01-12 21:31:45 +01:00
Ronny Chevalier
720e0be0f0 zsh-completion: add missing completions for coredumpctl 2015-01-12 21:26:27 +01:00
David Herrmann
40d6f6a35e TODO: update 2015-01-12 18:25:11 +01:00
Tom Gundersen
9a4b012e43 udev: link_config - modernize a bit and fix leakes
Not all of the link_config struct was getting freed.
2015-01-12 18:19:16 +01:00
Tom Gundersen
9c39eb5c88 network-intenal: user _cleanup_ macro in parse_ifname 2015-01-12 18:19:16 +01:00
Zbigniew Jędrzejewski-Szmek
76c37ab6d2 core/mount: remove "fail" again
deb6120920 'man: there's actually no "fail" fstab option, but only
"nofail" removed it from our documentation, which I missed.
fstab(5) only mentions "auto", "noauto", and "nofail". Stick to
those three.
2015-01-12 12:16:38 -05:00
Daniel Mack
a9c8343e83 sd-bus: sync kdbus.h (API break)
Just a simple variable rename, and a dropped flag that sd-bus didn't make
use of.
2015-01-12 18:15:45 +01:00
Daniel Mack
0c47569ac9 core/mount: use isempty() to check for empty strings
strempty() will return an empty string in case the input parameter is
a NULL pointer. The correct test to check for an empty string is
isempty(), so use that instead.

This fixes a regression from commit 17a1c59 ("core/mount: filter out
noauto,auto,nofail,fail options").
2015-01-12 14:01:45 +01:00
Carlos Garnacho
b9e616cc22 udev: Add builtin/rule to export evdev information as udev properties
This rule is only run on tablet/touchscreen devices, and extracts their size
in millimeters, as it can be found out through their struct input_absinfo.

The first usecase is exporting device size from tablets/touchscreens. This
may be useful to separate policy and application at the time of mapping
these devices to the available outputs in windowing environments that don't
offer that information as readily (eg. Wayland). This way the compositor can
stay deterministic, and the mix-and-match heuristics are performed outside.

Conceivably, size/resolution information can be changed through EVIOCSABS
anywhere else, but we're only interested in values prior to any calibration,
this rule is thus only run on "add", and no tracking of changes is performed.
This should only remain a problem if calibration were automatically applied
by an earlier udev rule (read: don't).

  v2: Folded rationale into commit log, made a builtin, set properties
      on device nodes themselves
  v3: Use inline function instead of macro for mm. size calculation,
      use DECIMAL_STR_MAX, other code style issues
  v4: Made rule more selective
  v5: Minor style issues, renamed to a more generic builtin, refined
      rule further.
2015-01-11 23:41:42 -05:00
Rafael Ferreira
b3e486b819 catalog: add pt_BR translation
https://bugs.freedesktop.org/show_bug.cgi?id=88271
2015-01-11 23:41:42 -05:00
Rafael Ferreira
5701fbbbcf po: add Brazilian Portuguese translation
https://bugs.freedesktop.org/show_bug.cgi?id=88271
2015-01-11 23:41:42 -05:00
Zbigniew Jędrzejewski-Szmek
a75f4e2a02 fstab-util: fix priority parsing and add test 2015-01-11 23:41:42 -05:00
Zbigniew Jędrzejewski-Szmek
7f76961982 shared/util: respect buffer boundary on incomplete escape sequences
cunescape_length_with_prefix() is called with the length as an
argument, so it cannot rely on the buffer being NUL terminated.
Move the length check before accessing the memory.

When an incomplete escape sequence was given at the end of the
buffer, c_l_w_p() would read past the end of the buffer. Fix this
and add a test.
2015-01-11 23:41:42 -05:00
Zbigniew Jędrzejewski-Szmek
e01ff42899 core/load-fragment: avoid allocating 0 bytes when given an invalid command
With a command line like "@/something" we would allocate an array with
0 elements. Avoid that, and add a test too.
2015-01-11 23:41:42 -05:00
Zbigniew Jędrzejewski-Szmek
4d8629de8b test-unit-file: don't access out-of-bounds memory
Fixes an error introduced by me when the test was added.
2015-01-11 23:41:42 -05:00
Zbigniew Jędrzejewski-Szmek
17a1c597c5 core/mount: filter out noauto,auto,nofail,fail options
We passed the full option string from fstab to /bin/mount. It would in
turn pass the full option string to its helper, if it needed to invoke
one. Some helpers would ignore things like "nofail", but others would
be confused. We could try to get all helpers to ignore those
"meta-options", but it seems better to simply filter them out.

In our model, /bin/mount simply has no business in knowing whether the
mount was configured as fail or nofail, auto or noauto, in the
fstab. If systemd tells invokes a command to mount something, and it
fails, it should always return an error. It seems cleaner to filter
out the option, since then there's no doubt how the command should
behave.

https://bugzilla.redhat.com/show_bug.cgi?id=1177823
2015-01-11 23:41:42 -05:00
Zbigniew Jędrzejewski-Szmek
b9f111b93f Support negated fstab options
We would ignore options like "fail" and "auto", and for any option
which takes a value the first assignment would win. Repeated and
options equivalent to the default are rarely used, but they have been
documented forever, and people might use them. Especially on the
kernel command line it is easier to append a repeated or negated
option at the end.
2015-01-11 23:41:41 -05:00
Zbigniew Jędrzejewski-Szmek
a6dba97829 cryptsetup-generator: remove duplicated function 2015-01-11 23:41:41 -05:00
Zbigniew Jędrzejewski-Szmek
c5e04d5127 fstab-util: detect out-of-range pri= assignments
We would silently ignore them. One would have to be crazy
to do assign an out of range value, but simply ignoring it
bothers me.
2015-01-11 23:41:41 -05:00
Zbigniew Jędrzejewski-Szmek
266fd0eabc .gitignore: add new tests and sort tests alphabetically 2015-01-11 23:41:41 -05:00
Zbigniew Jędrzejewski-Szmek
d15d0333be Add new function to filter fstab options
This fixes parsing of options in shared/generator.c. Existing code
had some issues:

- it would treate whitespace and semicolons as seperators. fstab(5)
  is pretty clear that only commas matter. And the syntax does
  not allow for spaces to be inserted in the field in fstab.
  Whitespace might be escaped, but then it should not seperate
  options. Treat whitespace and semicolons as any other character.
- it assumed that x-systemd.device-timeout would always be followed
  by "=". But this is not guaranteed, hasmntopt will return this
  option even if there's no value. Uninitialized memory could be read.
- some error paths would log, and inconsistently, some would just
  return an error code.

Filtering is split out to a separate function and tests are added.

Similar code paths in other places are adjusted to use the new function.
2015-01-11 23:41:41 -05:00
Zbigniew Jędrzejewski-Szmek
1e39ff926f network: apply static addresses in specified order
https://bugs.freedesktop.org/show_bug.cgi?id=83270
2015-01-11 18:17:33 -05:00