]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 years agoutil-lib: split out IO related calls to io-util.[ch]
Lennart Poettering [Sun, 25 Oct 2015 13:08:25 +0000 (14:08 +0100)] 
util-lib: split out IO related calls to io-util.[ch]

8 years agoMerge pull request #1674 from evverx/run-fix-couldnot-find-executable
Lennart Poettering [Sun, 25 Oct 2015 23:41:45 +0000 (00:41 +0100)] 
Merge pull request #1674 from evverx/run-fix-couldnot-find-executable

run: fix "couldn't find executable" for the existing executables

8 years agoMerge pull request #1673 from mustrumr/date-fixes
Lennart Poettering [Sun, 25 Oct 2015 21:58:00 +0000 (22:58 +0100)] 
Merge pull request #1673 from mustrumr/date-fixes

Date fixes

8 years agorun: fix "couldn't find executable" for the existing executables 1674/head
Evgeny Vereshchagin [Sun, 25 Oct 2015 18:29:24 +0000 (18:29 +0000)] 
run: fix "couldn't find executable" for the existing executables

Fixes: #1672
8 years agoman: fix systemd.time RAS syndrome and line length 1673/head
Hristo Venev [Sun, 25 Oct 2015 16:32:05 +0000 (18:32 +0200)] 
man: fix systemd.time RAS syndrome and line length

"UTC time" is a RAP phrase (redundant acronym phrase phrase).

8 years agotest: "today UTC" is not always "today UTC"
Hristo Venev [Sun, 25 Oct 2015 16:25:58 +0000 (18:25 +0200)] 
test: "today UTC" is not always "today UTC"

On Oct 25 2015 in EET/EEST there is a UTC+3->UTC+2 transition. This
means that the representation of "today UTC" as local time is ambiguous.

8 years agobasic: use the return value of endswith
Hristo Venev [Sun, 25 Oct 2015 16:24:39 +0000 (18:24 +0200)] 
basic: use the return value of endswith

It returns the position where the suffix begins, which can be used for
strndup to extract the prefix without calling strlen.

8 years agoMerge pull request #1671 from keszybz/zsh-journalctl-identifier
Ronny Chevalier [Sun, 25 Oct 2015 16:19:30 +0000 (17:19 +0100)] 
Merge pull request #1671 from keszybz/zsh-journalctl-identifier

zsh-completion: journalctl --identifier

8 years agozsh-completion: journalctl --identifier 1671/head
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2015 14:49:19 +0000 (10:49 -0400)] 
zsh-completion: journalctl --identifier

Fixes #1549.

8 years agoMerge pull request #1668 from ssahani/net1
Tom Gundersen [Sun, 25 Oct 2015 13:35:40 +0000 (14:35 +0100)] 
Merge pull request #1668 from ssahani/net1

networkd: fix asserts

8 years agoMerge pull request #1654 from poettering/util-lib
Tom Gundersen [Sun, 25 Oct 2015 13:22:43 +0000 (14:22 +0100)] 
Merge pull request #1654 from poettering/util-lib

Various changes to src/basic/

8 years agoMerge pull request #1667 from evverx/run-protect-system
Lennart Poettering [Sun, 25 Oct 2015 12:56:40 +0000 (13:56 +0100)] 
Merge pull request #1667 from evverx/run-protect-system

systemd-run can launch units with ProtectSystem

8 years agoutil-lib: move formats-util.h from shared/ to basic/ 1654/head
Lennart Poettering [Sun, 25 Oct 2015 12:16:10 +0000 (13:16 +0100)] 
util-lib: move formats-util.h from shared/ to basic/

It's only a header file, definining format strings for basic system
types, hence it should be in src/basic/, not src/shared/.

8 years agoutil-lib: split out fd-related operations into fd-util.[ch]
Lennart Poettering [Sun, 25 Oct 2015 12:14:12 +0000 (13:14 +0100)] 
util-lib: split out fd-related operations into fd-util.[ch]

There are more than enough to deserve their own .c file, hence move them
over.

8 years agoMerge pull request #1663 from poettering/journal-compress-fix
Zbigniew Jędrzejewski-Szmek [Sun, 25 Oct 2015 04:14:51 +0000 (00:14 -0400)] 
Merge pull request #1663 from poettering/journal-compress-fix

journal: fix error handling when compressing journal objects

8 years agovxlan: fix assert 1668/head
Susant Sahani [Sun, 25 Oct 2015 03:55:54 +0000 (09:25 +0530)] 
vxlan: fix assert

8 years agoveth: fix assert
Susant Sahani [Sun, 25 Oct 2015 03:55:16 +0000 (09:25 +0530)] 
veth: fix assert

8 years agoipvlan: fix assert
Susant Sahani [Sun, 25 Oct 2015 03:54:59 +0000 (09:24 +0530)] 
ipvlan: fix assert

8 years agobond: fix assert
Susant Sahani [Sun, 25 Oct 2015 03:54:31 +0000 (09:24 +0530)] 
bond: fix assert

8 years agovlan: fix assert
Susant Sahani [Sun, 25 Oct 2015 04:00:17 +0000 (09:30 +0530)] 
vlan: fix assert

8 years agoshell-completion: systemd-run: add the property ProtectSystem 1667/head
Evgeny Vereshchagin [Sat, 24 Oct 2015 22:49:46 +0000 (22:49 +0000)] 
shell-completion: systemd-run: add the property ProtectSystem

8 years agorun: can launch units with ProtectSystem
Evgeny Vereshchagin [Sat, 24 Oct 2015 22:48:33 +0000 (22:48 +0000)] 
run: can launch units with ProtectSystem

8 years agoMerge pull request #1665 from evverx/unit-printf-fixes
Lennart Poettering [Sat, 24 Oct 2015 21:57:23 +0000 (23:57 +0200)] 
Merge pull request #1665 from evverx/unit-printf-fixes

core: various small fixes to unit-printf

8 years agosd-*.h: clean up exported (or to-be-exported) header files
Lennart Poettering [Sat, 24 Oct 2015 21:42:56 +0000 (23:42 +0200)] 
sd-*.h: clean up exported (or to-be-exported) header files

Exported header files should not include internal headers. Fix that.

Exported header files should not use the bool type. So far we opted to
stick to C89 for exported headers, and hence use "int" for bools in
them. Continue to do so.

Exported header files should have #include lines for everything they use
including inttypes.h and sys/types.h, so that they may be included in
any order.

Exported header files should have C++ guards, hence add them.

Exported header files should not use gcc extensions like #pragma once,
get rid of it.

8 years agoutil: move logind_running() to login-util.[ch]
Lennart Poettering [Sat, 24 Oct 2015 21:30:40 +0000 (23:30 +0200)] 
util: move logind_running() to login-util.[ch]

8 years agocore: various small fixes to unit-printf 1665/head
Evgeny Vereshchagin [Sat, 24 Oct 2015 20:55:56 +0000 (20:55 +0000)] 
core: various small fixes to unit-printf

* check memory allocation errors in specifier_cgroup_slice
* %I doesn't fail for non-instantiated units (%i doesn't fail too)
* EOPNOTSUPP for consistency

8 years agoman: let's enclose * in shell examples in ''
Lennart Poettering [Sat, 24 Oct 2015 21:05:51 +0000 (23:05 +0200)] 
man: let's enclose * in shell examples in ''

Technically, it's safer that way, since dnf is supposed to parse the
"*", not the shell. It doesn't really matter too much in real life (as
the expression is too complex), but let's better be safe than sorry, and
make sure people won't file bugs about this...

8 years agoutil-lib: split our string related calls from util.[ch] into its own file string...
Lennart Poettering [Sat, 24 Oct 2015 20:58:24 +0000 (22:58 +0200)] 
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]

There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.

This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.

Also touches a few unrelated include files.

8 years agoutil: split out escaping code into escape.[ch]
Lennart Poettering [Fri, 23 Oct 2015 16:52:53 +0000 (18:52 +0200)] 
util: split out escaping code into escape.[ch]

This really deserves its own file, given how much code this is now.

8 years agoutil-lib: rework extract_first_word_and_warn() a bit
Lennart Poettering [Fri, 23 Oct 2015 16:20:54 +0000 (18:20 +0200)] 
util-lib: rework extract_first_word_and_warn() a bit

- Really warn in all error cases, not just some. We need to make sure
  that all errors are logged to not confuse the user.

- Explicitly check for EINVAL error code before claiming anything about
  invalid escapes, could be ENOMEM after all.

8 years agoutil: split out extract_first_word() and related calls into extract-word.[ch]
Lennart Poettering [Thu, 22 Oct 2015 18:12:31 +0000 (20:12 +0200)] 
util: split out extract_first_word() and related calls into extract-word.[ch]

This is quite a lot of code these days, hence move it to its own source
file.

8 years agopath-util: unify how we process paths specified on the command line
Lennart Poettering [Thu, 22 Oct 2015 17:54:29 +0000 (19:54 +0200)] 
path-util: unify how we process paths specified on the command line

Let's introduce a common function that makes relative paths absolute and
warns about any errors while doing so.

8 years agoutil-lib: get_current_dir_name() can return errors other than ENOMEM
Lennart Poettering [Thu, 22 Oct 2015 17:28:31 +0000 (19:28 +0200)] 
util-lib: get_current_dir_name() can return errors other than ENOMEM

get_current_dir_name() can return a variety of errors, not just ENOMEM,
hence don't blindly turn its errors to ENOMEM, but return correct errors
in path_make_absolute_cwd().

This trickles down into a couple of other functions, some of which
receive unrelated minor fixes too with this commit.

8 years agopath-util: rework find_binary(), fsck_exists() and mkfs_exists()
Lennart Poettering [Thu, 22 Oct 2015 16:24:59 +0000 (18:24 +0200)] 
path-util: rework find_binary(), fsck_exists() and mkfs_exists()

Modernize the code a bit:

- Get rid of FOREACH_WORD_SEPARATOR() loop in favour of a
  extract_first_word() loop.

- Remove find_binary()'s "local" flag. It's not reasonably possible to
  look for binaries on remote systems, we hence should not pretend we
  could.

- When we cannot find a suitable binary, return the last error returned
  from access() rather than ENOENT unconditionally.

- Rework fsck_exists() and mkfs_exists() to return 1 on success, 0 if
  the implementation is missing and negative on real errors. This is
  more like we do it in other functions.

- Make sure we also detect direct fsck symlinks to "true", rather than
  just absolute ones to /bin/true.

8 years agojournal: irrelevant coding style fixes 1663/head
Lennart Poettering [Sat, 24 Oct 2015 13:08:15 +0000 (15:08 +0200)] 
journal: irrelevant coding style fixes

8 years agoMerge pull request #1664 from again4you/devel/tmp-smack_#5
Lennart Poettering [Sat, 24 Oct 2015 12:58:51 +0000 (14:58 +0200)] 
Merge pull request #1664 from again4you/devel/tmp-smack_#5

mount: add new SmackFileSystemRoot= setting for mount unit (v4)

8 years agounits: add 'SmackFileSystemRoot=*' option into tmp.mount 1664/head
Sangjung Woo [Wed, 21 Oct 2015 12:48:13 +0000 (21:48 +0900)] 
units: add 'SmackFileSystemRoot=*' option into tmp.mount

If SMACK is enabled, 'smackfsroot=*' option should be specified when
/tmp is mounted since many non-root processes use /tmp for temporary
usage. If not, /tmp is labeled as '_' and smack denial occurs when
writing.

In order to do that, 'SmackFileSystemRoot=*' is newly added into
tmp.mount.

8 years agomount: add new SmackFileSystemRoot= setting for mount unit
Sangjung Woo [Wed, 21 Oct 2015 08:42:34 +0000 (17:42 +0900)] 
mount: add new SmackFileSystemRoot= setting for mount unit

This option specifies the label to assign the root of the file system if
it lacks the Smack extended attribute. Note that this option will be
ignored if kernel does not support the Smack feature by runtime
checking.

8 years agojournal: fix error handling when compressing journal objects
Lennart Poettering [Sat, 24 Oct 2015 11:17:54 +0000 (13:17 +0200)] 
journal: fix error handling when compressing journal objects

Let's make sure we handle compression errors properly, and don't
misunderstand an error for success.

Also, let's actually compress things if lz4 is enabled.

Fixes #1662.

8 years agoMerge pull request #1657 from phomes/tmpfiles-simplification
Lennart Poettering [Sat, 24 Oct 2015 10:17:41 +0000 (12:17 +0200)] 
Merge pull request #1657 from phomes/tmpfiles-simplification

tmpfiles: simplify mountpoint detection

8 years agoMerge pull request #1659 from vcaputo/journal_verify_envalid
Lennart Poettering [Sat, 24 Oct 2015 09:52:52 +0000 (11:52 +0200)] 
Merge pull request #1659 from vcaputo/journal_verify_envalid

journal: s/Envalid/Invalid/

8 years agojournal: s/Envalid/Invalid/ 1659/head
Vito Caputo [Fri, 23 Oct 2015 23:12:31 +0000 (16:12 -0700)] 
journal: s/Envalid/Invalid/

8 years agotmpfiles: simplify mountpoint detection 1657/head
Thomas Hindoe Paaboel Andersen [Fri, 23 Oct 2015 18:15:17 +0000 (20:15 +0200)] 
tmpfiles: simplify mountpoint detection

No functional change. Just a simplification. A || (!A && B) is
the same as A || B

Introduced in 78a92a5a2306709e4587e332728a76901323ade9

8 years agoMerge pull request #1653 from keszybz/lz4-compress-time
Lennart Poettering [Fri, 23 Oct 2015 15:42:24 +0000 (17:42 +0200)] 
Merge pull request #1653 from keszybz/lz4-compress-time

Limit test-compress-benchmark to approx. 12 s of runtime

8 years agotest-compress-benchmark: properly initialize buffer 1653/head
Zbigniew Jędrzejewski-Szmek [Sun, 18 Oct 2015 21:59:40 +0000 (17:59 -0400)] 
test-compress-benchmark: properly initialize buffer

We were compressing unitialized memory, which should not result in
any problems, but is inelegant.

8 years agotest-compress-benchmark: limit default runtime to 2 seconds per subtest
Zbigniew Jędrzejewski-Szmek [Sun, 18 Oct 2015 21:10:51 +0000 (17:10 -0400)] 
test-compress-benchmark: limit default runtime to 2 seconds per subtest

If both lz4 and xz are enabled, this results in a limit of
2×3×2 s ~= 12 s runtime.

Previous implementation started with really small buffer sizes. When
combined with a short time limit this resulteded in abysmal results for xz.
It seems that the initialization overead is really significant for small
buffers. Since xz will not be used by default anymore, this does not
seem worth fixing. Instead buffer sizes are changed to run a
pseudo-random non-repeating pattern. This should allow reasonable testing
for all buffer sizes. For testing, both runtime and the buffer size seed
can be specified on the command line. Sufficiently large runtime allows
all buffer sizes up to 1MB to be tested.

8 years agoMerge pull request #1652 from filbranden/extract1
Lennart Poettering [Fri, 23 Oct 2015 11:46:03 +0000 (13:46 +0200)] 
Merge pull request #1652 from filbranden/extract1

util: Replace state with separate booleans in extract_first_word

8 years agoMerge pull request #1647 from evverx/use-extract-in-namespace-parsing
Lennart Poettering [Fri, 23 Oct 2015 11:18:55 +0000 (13:18 +0200)] 
Merge pull request #1647 from evverx/use-extract-in-namespace-parsing

core: use extract_first_word for namespace parsing

8 years agoMerge pull request #1648 from evverx/clarify-journalctl-quiet-option
Lennart Poettering [Fri, 23 Oct 2015 10:47:07 +0000 (12:47 +0200)] 
Merge pull request #1648 from evverx/clarify-journalctl-quiet-option

journalctl: clarify -q option

8 years agoMerge pull request #1641 from poettering/btrfs-quota
Daniel Mack [Fri, 23 Oct 2015 08:50:53 +0000 (10:50 +0200)] 
Merge pull request #1641 from poettering/btrfs-quota

btrfs quota beef up and various other unrelated changes

8 years agoutil: Replace state with separate booleans in extract_first_word 1652/head
Filipe Brandenburger [Fri, 23 Oct 2015 06:12:31 +0000 (23:12 -0700)] 
util: Replace state with separate booleans in extract_first_word

This simplifies the logic and uniformizes the way single and double
quotes are handled. In the end, the code is about 40 lines shorter.

Tested by running the excellent test cases from test-util. Also
installed the systemd binaries including this patch and booted a
system with it, everything looked normal.

8 years agojournalctl: clarify -q option 1648/head
Evgeny Vereshchagin [Thu, 22 Oct 2015 23:18:17 +0000 (23:18 +0000)] 
journalctl: clarify -q option

-q suppresses info messages too

8 years agocore: use extract_first_word for namespace parsing 1647/head
Evgeny Vereshchagin [Thu, 22 Oct 2015 20:28:28 +0000 (20:28 +0000)] 
core: use extract_first_word for namespace parsing

see https://github.com/systemd/systemd/pull/1632#issuecomment-149903791
We should port this loop over to extract_first_word(), too.

8 years agoMerge pull request #1646 from keszybz/man-dnf-install
Lennart Poettering [Thu, 22 Oct 2015 18:28:50 +0000 (20:28 +0200)] 
Merge pull request #1646 from keszybz/man-dnf-install

dnf install command update

8 years agoman: also add --enablerepo=updates to dnf invocation 1646/head
Zbigniew Jędrzejewski-Szmek [Thu, 22 Oct 2015 18:11:22 +0000 (14:11 -0400)] 
man: also add --enablerepo=updates to dnf invocation

Without the updates repo, we are installing packages from the time
that that version of Fedora was released. Normally, during the
lifetime of the release most packages are updated, so most of the
packages installed would be outdated, and the first update after
installation would update a massive set of packages. Avoid all this
by installing from the updates repo from the start.

8 years agoMerge pull request #1625 from teg/ndisc
Patrik Flykt [Thu, 22 Oct 2015 17:41:50 +0000 (20:41 +0300)] 
Merge pull request #1625 from teg/ndisc

sd-ndisc: Rename (from sd-icmp6-nd) and prepare for handling SLAAC and router discovery

8 years agoman: remove --nogpg from dnf install command line
Zbigniew Jędrzejewski-Szmek [Thu, 22 Oct 2015 17:34:46 +0000 (13:34 -0400)] 
man: remove --nogpg from dnf install command line

Keys for previous and future Fedora distributions were added
for the fedora-repos package recently:
https://bugzilla.redhat.com/show_bug.cgi?id=1246701.
There is no need to skip signature checking.

Also, update to the latest and greatest and remove unnecessary quotes.

8 years agosd-ndisc: reduce callbacks 1625/head
Tom Gundersen [Thu, 22 Oct 2015 15:34:58 +0000 (17:34 +0200)] 
sd-ndisc: reduce callbacks

Only callback on error when the statemachine is in a truly broken state. This
is now only the case when we fail to rearm a timer.

8 years agosd-ndisc: drop sd_ndisc_get_prefixlen()
Tom Gundersen [Wed, 21 Oct 2015 00:14:24 +0000 (02:14 +0200)] 
sd-ndisc: drop sd_ndisc_get_prefixlen()

This is unused, and in the future we will pass prefixes and prefixlengths directly
to the callbacks when needed rather than having to search for them.

8 years agosd-ndisc: drop sd_ndisc_prefix_match()
Tom Gundersen [Mon, 19 Oct 2015 13:04:22 +0000 (15:04 +0200)] 
sd-ndisc: drop sd_ndisc_prefix_match()

This is no longer used.

8 years agosd-ndisc: don't trigger timeout on prefix expiry
Tom Gundersen [Sun, 18 Oct 2015 15:45:22 +0000 (17:45 +0200)] 
sd-ndisc: don't trigger timeout on prefix expiry

The caller of the library is no longer notified, so triggering a timer
just to clean up is not necessary. Instead check for and clean up
invalid prefixes lazily.

8 years agosd-ndisc: remove a prefix from the ndisc object when freeing it
Tom Gundersen [Sun, 18 Oct 2015 15:27:10 +0000 (17:27 +0200)] 
sd-ndisc: remove a prefix from the ndisc object when freeing it

This follows the coding style, and allows some simplification to the rest of the code.

8 years agosd-ndisc: don't inform the caller of expired prefixes
Tom Gundersen [Sun, 18 Oct 2015 15:19:29 +0000 (17:19 +0200)] 
sd-ndisc: don't inform the caller of expired prefixes

The caller should push any lifetime information into the kernel and let the kernel handle
prefix expiration.

8 years agosd-ndisc: clean up state enum
Tom Gundersen [Sun, 18 Oct 2015 15:13:03 +0000 (17:13 +0200)] 
sd-ndisc: clean up state enum

There is no need to assign valuse to the states. Also add _INVALID and _MAX,
even though these are not used, it keeps it consistent.

8 years agonetworkd: dhcp6 - do not handle prefix expiration
Tom Gundersen [Sun, 18 Oct 2015 15:06:31 +0000 (17:06 +0200)] 
networkd: dhcp6 - do not handle prefix expiration

This ressurects 47d45d3cde45d6545367570264e4e3636bc9e345. We now always use /128 prefixes,
so there is no need for the DHCPv6 code to know about prefixes expiring.

8 years agonetworkd: dhcp6 - DHCPv6 addresses should always be /128
Tom Gundersen [Sun, 18 Oct 2015 14:59:21 +0000 (16:59 +0200)] 
networkd: dhcp6 - DHCPv6 addresses should always be /128

The routing information should be configured separately by ND, there is no need to
indicate the prefix again in the DHCPv6 addresses.

See discussion and related links at issue #1520.

8 years agonetworkd: ndisc - split out from dhcp6 code
Tom Gundersen [Fri, 16 Oct 2015 19:09:15 +0000 (21:09 +0200)] 
networkd: ndisc - split out from dhcp6 code

8 years agonetworkd: ndisc - make logging messages uniform
Tom Gundersen [Fri, 16 Oct 2015 17:28:27 +0000 (19:28 +0200)] 
networkd: ndisc - make logging messages uniform

Refer to Router Discovery rather than ICMPv6.

8 years agosd-ndisc: rename icmp6 to ndisc throughout the code
Tom Gundersen [Fri, 16 Oct 2015 17:17:50 +0000 (19:17 +0200)] 
sd-ndisc: rename icmp6 to ndisc throughout the code

8 years agolibsystemd-network: split icm6-util.[ch] out of dhcp6 code
Tom Gundersen [Fri, 16 Oct 2015 16:09:10 +0000 (18:09 +0200)] 
libsystemd-network: split icm6-util.[ch] out of dhcp6 code

8 years agonetworkd: rename icmp6 to ndisc
Tom Gundersen [Fri, 16 Oct 2015 15:34:58 +0000 (17:34 +0200)] 
networkd: rename icmp6 to ndisc

8 years agosd-ndisc: rename API from sd-icmp6-nd
Tom Gundersen [Fri, 16 Oct 2015 15:07:47 +0000 (17:07 +0200)] 
sd-ndisc: rename API from sd-icmp6-nd

8 years agosd-icmp6-nd: rename files to sd-ndisc
Tom Gundersen [Thu, 15 Oct 2015 17:25:31 +0000 (19:25 +0200)] 
sd-icmp6-nd: rename files to sd-ndisc

The actual code rename will follow. The reason for the change of name is to make it
simpler and more uniform with how we name other libraries (we don't include the
underlying protocol). The new name also matches the naming in the kernel (which
is particularly relevent here as we expect to let the kernel do some parts of
the protocol and we do others).

8 years agoMerge pull request #1644 from reverendhomer/patch-1
Tom Gundersen [Thu, 22 Oct 2015 15:02:54 +0000 (17:02 +0200)] 
Merge pull request #1644 from reverendhomer/patch-1

networkd-manager: fix swapped arguments

8 years agoMerge pull request #1642 from evverx/allow-unbalanced-double-quote-in-relax-mode
Lennart Poettering [Thu, 22 Oct 2015 10:20:12 +0000 (12:20 +0200)] 
Merge pull request #1642 from evverx/allow-unbalanced-double-quote-in-relax-mode

util: allow unbalanced double quote in EXTRACT_QUOTES|EXTRACT_RELAX mode

8 years agonetworkd-manager: fix swapped arguments 1644/head
reverendhomer [Thu, 22 Oct 2015 07:36:07 +0000 (10:36 +0300)] 
networkd-manager: fix swapped arguments

fixes Coverity #1328493

8 years agoutil: allow unbalanced double quote in EXTRACT_QUOTES|EXTRACT_RELAX mode 1642/head
Evgeny Vereshchagin [Thu, 22 Oct 2015 00:37:32 +0000 (00:37 +0000)] 
util: allow unbalanced double quote in EXTRACT_QUOTES|EXTRACT_RELAX mode

extract_first_word understands "\'string" but doesn't understand "\"string"
fixed this inconsistency.

8 years agocore: check parsed bus msg in full before applying it 1641/head
Lennart Poettering [Thu, 22 Oct 2015 00:02:17 +0000 (02:02 +0200)] 
core: check parsed bus msg in full before applying it

8 years agonspawn: don't try to resolve passed binary before entering namespace
Lennart Poettering [Wed, 21 Oct 2015 23:33:06 +0000 (01:33 +0200)] 
nspawn: don't try to resolve passed binary before entering namespace

Othewise we might follow the symlinks on the host, instead of the
container.

Fixes #1400

8 years agonspawn: rework how we determine private networking settings
Lennart Poettering [Wed, 21 Oct 2015 22:59:18 +0000 (00:59 +0200)] 
nspawn: rework how we determine private networking settings

Make sure we acquire CAP_NET_ADMIN if we require virtual networking.

Make sure we imply virtual ethernet correctly when bridge is request.

Fixes: #1511
Fixes: #1554
Fixes: #1590
8 years agounits: also whitelist "blkext" block devices for nspawn service
Lennart Poettering [Wed, 21 Oct 2015 22:39:57 +0000 (00:39 +0200)] 
units: also whitelist "blkext" block devices for nspawn service

/dev/loop*p* block devices are of the "blkext" subsystem, not of loop,
hence whitelist this too.

Fixes #1446

8 years agoimport: don't claim we moved .nspawn file into place when in fact we did not
Lennart Poettering [Wed, 21 Oct 2015 22:39:27 +0000 (00:39 +0200)] 
import: don't claim we moved .nspawn file into place when in fact we did not

8 years agoimport: correct handling if .nspawn file could not be downloaded
Lennart Poettering [Wed, 21 Oct 2015 22:39:09 +0000 (00:39 +0200)] 
import: correct handling if .nspawn file could not be downloaded

8 years agomachinectl: accept "none" and "infinity" as specifier when dropping quotas using...
Lennart Poettering [Wed, 21 Oct 2015 20:41:31 +0000 (22:41 +0200)] 
machinectl: accept "none" and "infinity" as specifier when dropping quotas using "machinectl set-limit"

Previously, we already accepted "-" as special value for dropping
limits. Add "infinity", as that's what we support for RLIMITs and hence
should support here to. Also add "none" as that's what the btrfs tools
use.

8 years agoupdate TODO
Lennart Poettering [Wed, 21 Oct 2015 17:48:07 +0000 (19:48 +0200)] 
update TODO

8 years agotmpfiles.d: change all subvolumes to use quota
Lennart Poettering [Wed, 21 Oct 2015 17:47:28 +0000 (19:47 +0200)] 
tmpfiles.d: change all subvolumes to use quota

Let's make sure the subvolumes we create fit into a sensible definition
of a quota tree.

8 years agotmpfiles: introduce "q" and "Q" for creating quota-enabled btrfs subvolumes
Lennart Poettering [Wed, 21 Oct 2015 17:46:23 +0000 (19:46 +0200)] 
tmpfiles: introduce "q" and "Q" for creating quota-enabled btrfs subvolumes

This allows us to set up the quota group hierarchy in a reasonable way
on btrfs file systems.

8 years agoimport: when downloading images, create a subtree quota group for them
Lennart Poettering [Wed, 21 Oct 2015 17:45:44 +0000 (19:45 +0200)] 
import: when downloading images, create a subtree quota group for them

8 years agobtrfs: beef-up btrfs support with a limited understanding of quota
Lennart Poettering [Wed, 21 Oct 2015 17:38:21 +0000 (19:38 +0200)] 
btrfs: beef-up btrfs support with a limited understanding of quota

With this change we understand more than just leaf quota groups for
btrfs file systems. Specifically:

- When we create a subvolume we can now optionally add the new subvolume
  to all qgroups its parent subvolume was member of too. Alternatively
  it is also possible to insert an intermediary quota group between the
  parent's qgroups and the subvolume's leaf qgroup, which is useful for
  a concept of "subtree" qgroups, that contain a subvolume and all its
  children.

- The remove logic for subvolumes has been updated to optionally remove
  any leaf qgroups or "subtree" qgroups, following the logic above.

- The snapshot logic for subvolumes has been updated to replicate the
  original qgroup setup of the source, if it follows the "subtree"
  design described above. It will not cover qgroup setups that introduce
  arbitrary qgroups, especially those orthogonal to the subvolume
  hierarchy.

This also tries to be more graceful when setting up /var/lib/machines as
btrfs. For example, if mkfs.btrfs is missing we don't even try to set it
up as loopback device.

Fixes #1559
Fixes #1129

8 years agologind: minor clean-ups
Lennart Poettering [Wed, 21 Oct 2015 17:36:22 +0000 (19:36 +0200)] 
logind: minor clean-ups

8 years agosystemctl: the various list commands actually can take any number of arguments
Lennart Poettering [Wed, 21 Oct 2015 17:34:52 +0000 (19:34 +0200)] 
systemctl: the various list commands actually can take any number of arguments

I accidentally broke this a while back when I ported systemctl to the
verbs logic.

Add support for this back.

8 years agoutil: improve dir_is_empty() call
Lennart Poettering [Mon, 19 Oct 2015 21:58:17 +0000 (23:58 +0200)] 
util: improve dir_is_empty() call

Simplify the call, and add dir_is_populated() as inverse call, in order
to make some checks easier to read.

8 years agoMerge pull request #1639 from alkino/master
Lennart Poettering [Wed, 21 Oct 2015 19:01:21 +0000 (21:01 +0200)] 
Merge pull request #1639 from alkino/master

core dbus: Check that flush works with memstream

8 years agocore dbus: Check that flush works with memstream 1639/head
Nicolas Cornu [Wed, 21 Oct 2015 16:17:12 +0000 (18:17 +0200)] 
core dbus: Check that flush works with memstream

8 years agoMerge pull request #1637 from alkino/master
Lennart Poettering [Wed, 21 Oct 2015 14:38:35 +0000 (16:38 +0200)] 
Merge pull request #1637 from alkino/master

shell-completion: systemd-run: add new property EnvironmentFile

8 years agoshell-completion: systemd-run: add new property EnvironmentFile 1637/head
Nicolas Cornu [Wed, 21 Oct 2015 14:18:59 +0000 (16:18 +0200)] 
shell-completion: systemd-run: add new property EnvironmentFile

8 years agoMerge pull request #1632 from evverx/fix-namespace-parsing
Lennart Poettering [Wed, 21 Oct 2015 13:56:48 +0000 (15:56 +0200)] 
Merge pull request #1632 from evverx/fix-namespace-parsing

core: fix namespace parsing

8 years agoMerge pull request #1636 from alkino/master
Lennart Poettering [Wed, 21 Oct 2015 13:55:31 +0000 (15:55 +0200)] 
Merge pull request #1636 from alkino/master

Add zsh completion on systemd-run's properties

8 years agoAdd zsh completion on systemd-run's properties 1636/head
Nicolas Cornu [Wed, 21 Oct 2015 13:51:09 +0000 (15:51 +0200)] 
Add zsh completion on systemd-run's properties

8 years agocore: fix namespace parsing 1632/head
Evgeny Vereshchagin [Wed, 21 Oct 2015 11:49:36 +0000 (11:49 +0000)] 
core: fix namespace parsing

ReadOnlyDirectories=-/ works fine