1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 18:27:04 +03:00
Commit Graph

23040 Commits

Author SHA1 Message Date
Lennart Poettering
0240c60369 journal: irrelevant coding style fixes 2015-10-24 15:08:15 +02:00
Lennart Poettering
7f66eb931d Merge pull request #1664 from again4you/devel/tmp-smack_#5
mount: add new SmackFileSystemRoot= setting for mount unit (v4)
2015-10-24 14:58:51 +02:00
Sangjung Woo
5dfcb8d200 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.
2015-10-24 20:54:21 +09:00
Sangjung Woo
46a01abae9 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.
2015-10-24 20:53:54 +09:00
Lennart Poettering
d1afbcd221 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.
2015-10-24 13:19:42 +02:00
Lennart Poettering
48d04f25bf Merge pull request #1657 from phomes/tmpfiles-simplification
tmpfiles: simplify mountpoint detection
2015-10-24 12:17:41 +02:00
Lennart Poettering
63a94c49dd Merge pull request #1659 from vcaputo/journal_verify_envalid
journal: s/Envalid/Invalid/
2015-10-24 11:52:52 +02:00
Vito Caputo
0c4a83a259 journal: s/Envalid/Invalid/ 2015-10-23 16:12:31 -07:00
Thomas Hindoe Paaboel Andersen
2bb158c1ce tmpfiles: simplify mountpoint detection
No functional change. Just a simplification. A || (!A && B) is
the same as A || B

Introduced in 78a92a5a23
2015-10-23 22:35:03 +02:00
Lennart Poettering
931c7feac0 Merge pull request #1653 from keszybz/lz4-compress-time
Limit test-compress-benchmark to approx. 12 s of runtime
2015-10-23 17:42:24 +02:00
Zbigniew Jędrzejewski-Szmek
0036b0bf2d test-compress-benchmark: properly initialize buffer
We were compressing unitialized memory, which should not result in
any problems, but is inelegant.
2015-10-23 09:44:16 -04:00
Zbigniew Jędrzejewski-Szmek
c4291c1524 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.
2015-10-23 09:44:16 -04:00
Lennart Poettering
d3aacce707 Merge pull request #1652 from filbranden/extract1
util: Replace state with separate booleans in extract_first_word
2015-10-23 13:46:03 +02:00
Lennart Poettering
bab15dad0b Merge pull request #1647 from evverx/use-extract-in-namespace-parsing
core: use extract_first_word for namespace parsing
2015-10-23 13:18:55 +02:00
Lennart Poettering
adf717bcfd Merge pull request #1648 from evverx/clarify-journalctl-quiet-option
journalctl: clarify -q option
2015-10-23 12:47:07 +02:00
Daniel Mack
952b4473bc Merge pull request #1641 from poettering/btrfs-quota
btrfs quota beef up and various other unrelated changes
2015-10-23 10:50:53 +02:00
Filipe Brandenburger
4cbf8afa04 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.
2015-10-22 23:12:31 -07:00
Evgeny Vereshchagin
20d936ba81 journalctl: clarify -q option
-q suppresses info messages too
2015-10-22 23:18:17 +00:00
Evgeny Vereshchagin
727f76d715 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.
2015-10-22 20:28:28 +00:00
Lennart Poettering
c9fc270e46 Merge pull request #1646 from keszybz/man-dnf-install
dnf install command update
2015-10-22 20:28:50 +02:00
Zbigniew Jędrzejewski-Szmek
b8b9d8f5e5 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.
2015-10-22 14:11:24 -04:00
Patrik Flykt
b8c89d3c42 Merge pull request #1625 from teg/ndisc
sd-ndisc: Rename (from sd-icmp6-nd) and prepare for handling SLAAC and router discovery
2015-10-22 20:41:50 +03:00
Zbigniew Jędrzejewski-Szmek
cf48ff5d2a 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.
2015-10-22 13:34:46 -04:00
Tom Gundersen
cbe91b3cba 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.
2015-10-22 17:34:58 +02:00
Tom Gundersen
4e5ca364f4 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.
2015-10-22 17:19:54 +02:00
Tom Gundersen
f46fc04fac sd-ndisc: drop sd_ndisc_prefix_match()
This is no longer used.
2015-10-22 17:19:54 +02:00
Tom Gundersen
f6e0ce6660 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.
2015-10-22 17:19:54 +02:00
Tom Gundersen
272f5cd9b7 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.
2015-10-22 17:19:54 +02:00
Tom Gundersen
77b05fa9a7 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.
2015-10-22 17:19:54 +02:00
Tom Gundersen
c93578f54b 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.
2015-10-22 17:19:54 +02:00
Tom Gundersen
9b4d33193a networkd: dhcp6 - do not handle prefix expiration
This ressurects 47d45d3cde. We now always use /128 prefixes,
so there is no need for the DHCPv6 code to know about prefixes expiring.
2015-10-22 17:19:54 +02:00
Tom Gundersen
6d8f6b0b2a 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.
2015-10-22 17:19:54 +02:00
Tom Gundersen
a13c50e7a3 networkd: ndisc - split out from dhcp6 code 2015-10-22 17:19:54 +02:00
Tom Gundersen
ceabaf0fea networkd: ndisc - make logging messages uniform
Refer to Router Discovery rather than ICMPv6.
2015-10-22 17:19:54 +02:00
Tom Gundersen
46ec668714 sd-ndisc: rename icmp6 to ndisc throughout the code 2015-10-22 17:19:54 +02:00
Tom Gundersen
940367a0ab libsystemd-network: split icm6-util.[ch] out of dhcp6 code 2015-10-22 17:19:54 +02:00
Tom Gundersen
de1e9928f1 networkd: rename icmp6 to ndisc 2015-10-22 17:19:54 +02:00
Tom Gundersen
4d7b83da7b sd-ndisc: rename API from sd-icmp6-nd 2015-10-22 17:19:54 +02:00
Tom Gundersen
3ad0c5d8a4 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).
2015-10-22 17:19:54 +02:00
Tom Gundersen
ac691d4abe Merge pull request #1644 from reverendhomer/patch-1
networkd-manager: fix swapped arguments
2015-10-22 17:02:54 +02:00
Lennart Poettering
b2fe9deb4f Merge pull request #1642 from evverx/allow-unbalanced-double-quote-in-relax-mode
util: allow unbalanced double quote in EXTRACT_QUOTES|EXTRACT_RELAX mode
2015-10-22 12:20:12 +02:00
reverendhomer
58fda79c0b networkd-manager: fix swapped arguments
fixes Coverity #1328493
2015-10-22 10:36:07 +03:00
Evgeny Vereshchagin
9e44f56b4e util: allow unbalanced double quote in EXTRACT_QUOTES|EXTRACT_RELAX mode
extract_first_word understands "\'string" but doesn't understand "\"string"
fixed this inconsistency.
2015-10-22 00:37:32 +00:00
Lennart Poettering
b0830e21f4 core: check parsed bus msg in full before applying it 2015-10-22 02:02:17 +02:00
Lennart Poettering
16fb773ee3 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
2015-10-22 01:59:25 +02:00
Lennart Poettering
0e2656744f 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
2015-10-22 01:59:25 +02:00
Lennart Poettering
a2c90f05f1 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
2015-10-22 01:59:25 +02:00
Lennart Poettering
79b6198bb0 import: don't claim we moved .nspawn file into place when in fact we did not 2015-10-22 01:59:25 +02:00
Lennart Poettering
1f9aa80a59 import: correct handling if .nspawn file could not be downloaded 2015-10-22 01:59:25 +02:00
Lennart Poettering
7705a4053d 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.
2015-10-22 01:59:25 +02:00