Commit Graph

17740 Commits

Author SHA1 Message Date
Lennart Poettering 84ee096044 copy: change error code when hitting copy limit to EFBIG
After all, this is about files, not arguments, hence EFBIG is more
appropriate than E2BIG
2014-11-07 01:19:56 +01:00
Lennart Poettering cda134ab1e copy: teach copy_bytes() sendfile() support, and then replace sendfile_full() by it 2014-11-07 01:19:56 +01:00
Lennart Poettering 0c2576ef74 util: make use of isempty() where appropriate 2014-11-07 01:19:56 +01:00
Michal Schmidt 4b5d8d0f22 shutdown: fix arguments to /run/initramfs/shutdown
Our initrd interface specifies that the verb is in argv[1].
This is where systemd passes it to systemd-shutdown, but getopt
permutes argv[]. This confuses dracut's shutdown script:
  Shutdown called with argument '--log-level'. Rebooting!

getopt can be convinced to not permute argv[] by having '-' as the first
character of optstring. Let's use it. This requires changing the way
non-option arguments (in our case, the verb) are processed.

This fixes a bug where the system would reboot instead of powering off.
2014-11-06 22:33:08 +01:00
Lennart Poettering a0132af247 update TODO 2014-11-06 20:09:27 +01:00
Lennart Poettering 81c7dd897c s/command-line/command line/g
A follow-up to:

commit 3f85ef0f05
Author: Harald Hoyer <harald@redhat.com>
Date:   Thu Nov 6 15:33:48 2014 +0100

    s/commandline/command line/g
2014-11-06 20:06:30 +01:00
Lennart Poettering 8d07a7c471 machined: reorder method calls in vtable 2014-11-06 20:00:14 +01:00
Lennart Poettering 64e18fd626 switch-root: explain why we don't care about base_filesystem_create() failing 2014-11-06 20:00:01 +01:00
Michal Schmidt 2d58aa4692 shared: create files even if the SELinux policy has no context for them
The SELinux policy defines no context for some files. E.g.:
  $ matchpathcon /run/lock/subsys /dev/mqueue
  /run/lock/subsys        <<none>>
  /dev/mqueue     <<none>>

We still need to be able to create them.
In this case selabel_lookup_raw() returns ENOENT. We should then skip
setfscreatecon(), but still return success.
It was broken since c34255bdb2 ("label: unify code to make directories,
symlinks").
2014-11-06 17:02:21 +01:00
Harald Hoyer 3f85ef0f05 s/commandline/command line/g 2014-11-06 15:34:18 +01:00
Harald Hoyer 6d0f91bf55 switch_root: do not fail, if base_filesystem_create() failed
Not all switch roots are like base_filesystem_create() wants them
to look like. They might even boot, if they are RO and don't have the FS
layout. Just ignore the error and switch_root nevertheless.

base_filesystem_create() should have logged, what went wrong.
2014-11-06 15:28:42 +01:00
Lennart Poettering 2b671e9560 README: mention that engineering services for systemd are available from endocode 2014-11-06 15:27:13 +01:00
Lennart Poettering 4a3ad39957 systemctl: when invokes as "reboot -f", sync()
We do this in the clean shutdown path in shutdown.c, hence we should do
is for "reboot -f", too.
2014-11-06 15:20:29 +01:00
Lennart Poettering 25fa306ed5 hostnamed: introduce new "embedded" chassis type
We really don't want to get lost in adding fridge, car, plane, drone, or
whatever else, hence add a generic term "embedded" cover all the cases
where the computer is just part of something bigger, and not at the
focus of things.
2014-11-06 14:37:12 +01:00
Lennart Poettering 7fd682bbeb update TODO 2014-11-06 14:31:04 +01:00
Lennart Poettering 134e56dcc5 shared: rename condition-util.[ch] to condition.[ch]
Now that we only have one file with condition implementations around, we
can drop the -util suffix and simplify things a bit.
2014-11-06 14:21:11 +01:00
Lennart Poettering 493657337a core: get rid of condition.c and move the remaining call into util.c
That way only one file with condition code remaining, in src/shared/,
rather than src/core/.

Next step: dropping the "-util" suffix from condition-util.[ch].
2014-11-06 14:21:11 +01:00
Lennart Poettering c073a0c4a5 man: document that we don't document .include on purpose
<!-- xml comments are useful! -->
2014-11-06 14:21:11 +01:00
Lennart Poettering 90a2ec10f2 man: don't document ConditionNull=/AssertNull= as the are not particularly useful and simply confusing 2014-11-06 14:21:11 +01:00
Lennart Poettering 651c33185e condition: order condition types the same way in man page, enum, tables
Yes, sometimes I develop OCD.
2014-11-06 14:21:11 +01:00
Lennart Poettering 59fccdc587 core: introduce the concept of AssertXYZ= similar to ConditionXYZ=, but fatal for a start job if not met 2014-11-06 14:21:11 +01:00
Lennart Poettering cc50ef134b condition: record test state internally and beef it up to be a full enum 2014-11-06 14:21:10 +01:00
Lennart Poettering b80ba1da1c condition: add more test cases 2014-11-06 14:21:10 +01:00
Lennart Poettering 124aff6251 journal: adjust audit log messages a bit 2014-11-06 14:21:10 +01:00
Lennart Poettering a4705396ad condition: internalize condition test functions
Also, implement the negation check inside of condition_test() instead of
individually in each test function.
2014-11-06 14:21:10 +01:00
Lennart Poettering d1bddcec98 condition: unify condition logic in one file 2014-11-06 14:21:10 +01:00
Lennart Poettering 592fd144ae condition: properly allow passing back errors from condition checks 2014-11-06 14:21:10 +01:00
Zbigniew Jędrzejewski-Szmek 58f2fab16d units: restore job timeouts for poweroff and reboot
It seems that there actually aren't any long running tasks which are
performed at shutdown. If it turns out that there actually are, this
should be revisited.

This reverts most of commit 038193efa6.
2014-11-06 08:17:45 -05:00
Ray Strode f6ba8671d8 login: rerun vconsole-setup when switching from vgacon to fbcon
The initialization performed by systemd-vconsole-setup is reset
when changing console drivers (say from vgacon to fbcon), so we
need to run it in that case.

See
http://lists.freedesktop.org/archives/systemd-devel/2014-October/023919.html
http://lists.freedesktop.org/archives/systemd-devel/2014-October/024423.html
http://lists.freedesktop.org/archives/systemd-devel/2014-November/024881.html

This commit adds a udev rule to make systemd-vconsole-setup get run when
the fbcon device becomes available.

(david: moved into new file 90-vconsole.rules instead of 71-seats.rules;
        build-failures are on me, not on Ray)
2014-11-06 10:56:52 +01:00
Zbigniew Jędrzejewski-Szmek 038193efa6 units: disable job timeouts
For boot, we might kill fsck in the middle, with likely catastrophic
consequences.

On shutdown there might be other jobs, like downloading of updates for
installation, and other custom jobs. It seems better to schedule an
individual timeout on each one separately, when it is known what
timeout is useful.

Disable the timeouts for now, until we have a clearer picture of how
we can deal with long-running jobs.
2014-11-05 20:45:10 -05:00
Colin Guthrie 8232e39e7c udev hwdb: Change error message regarding missing hwdb.bin back to debug.
When used in an initramfs, it's expected that the hwdb.bin file is
not present (it makes for a very large initramfs otherwise).

While it's nice to tell the user about this, as it's not strictly
speaking an error we really shouldn't be so forceful in our
reporting.
2014-11-05 21:06:49 +00:00
Lennart Poettering 4a6ca457eb util: minor modernisations 2014-11-05 19:46:07 +01:00
Lennart Poettering 07318c2908 condition: rewrite condition_test_kernel_command_line() based on unquote_first_word() 2014-11-05 19:46:07 +01:00
Tom Gundersen d5ce1cfce4 sd-pppoe: spelling
Thanks to Daniele Medri
2014-11-05 19:34:20 +01:00
Lennart Poettering 6f5c810ad6 sd-bus: by default allow all creds to be passed along 2014-11-05 18:54:50 +01:00
Lennart Poettering a931ad47a8 core: introduce new Delegate=yes/no property controlling creation of cgroup subhierarchies
For priviliged units this resource control property ensures that the
processes have all controllers systemd manages enabled.

For unpriviliged services (those with User= set) this ensures that
access rights to the service cgroup is granted to the user in question,
to create further subgroups. Note that this only applies to the
name=systemd hierarchy though, as access to other controllers is not
safe for unpriviliged processes.

Delegate=yes should be set for container scopes where a systemd instance
inside the container shall manage the hierarchies below its own cgroup
and have access to all controllers.

Delegate=yes should also be set for user@.service, so that systemd
--user can run, controlling its own cgroup tree.

This commit changes machined, systemd-nspawn@.service and user@.service
to set this boolean, in order to ensure that container management will
just work, and the user systemd instance can run fine.
2014-11-05 18:49:14 +01:00
Tom Gundersen c962cb68d5 libsystemd-network: don't use unaligned helpers in _packed_ structs
The compiler will do this for us.
2014-11-05 16:54:22 +01:00
Tom Gundersen 617e794652 shared: unaligned - use void* instead of unaligned be16_t* 2014-11-05 16:54:22 +01:00
Tom Gundersen 9eec671331 sd-pppoe: whitespace 2014-11-05 16:54:22 +01:00
Tom Gundersen 61c8175021 test: hashmap-plain - make coverity happy
Check return value of hashmap_ensure_allocated().

CID#1250807.
2014-11-05 16:54:22 +01:00
Tom Gundersen 696c24fced test: fileio - make coverity happy
Explicitly check the length of the read.

Fixes CID#1250803.
2014-11-05 16:54:22 +01:00
Tom Gundersen 7c63b23f49 shared: ptyfwd - make coverity happy
Explicitly ignore return value of ioctl to set window size.

Fixes CID#1250804 and CID#1250800.
2014-11-05 16:54:22 +01:00
Colin Guthrie 0c3f25e0c1 manager: Ensure user's systemd runtime directory exists.
This mirrors code in dbus.c when creating the private socket and
avoids error messages like:

systemd[1353]: bind(/run/user/603/systemd/notify) failed: No such file or directory
systemd[1353]: Failed to fully start up daemon: No such file or directory
2014-11-05 14:49:06 +00:00
Daniel Mack d704fda934 sd-bus: sync up with new kdbus metadata attachment logic (ABI break)
The metadata logic in kdbus has seen a rework, and the only mandatory
change we have to follow for now is that attach_flags in kdbus_cmd_hello
is now split into two parts, attach_flags_send and attach_flags_recv.
2014-11-05 14:48:20 +01:00
David Herrmann cfe2061add udev: avoid magic constants in kernel-cmdline parsers
Lets recognize the fact that startswith() returns a pointer to the tail on
success. Use it instead of hard-coding string-lengths as magic constants.
2014-11-05 12:58:10 +01:00
Richard W.M. Jones f671774f52 udev: Fix parsing of udev.event-timeout kernel parameter. 2014-11-05 12:58:10 +01:00
Cristian Rodríguez 01acf6c3b7 buildsys: test-util needs -lm for fabs() 2014-11-05 12:58:10 +01:00
Michal Schmidt a87a38c201 units: make systemd-journald.service Type=notify
It already calls sd_notify(), so it looks like an oversight.

Without it, its ordering to systemd-journal-flush.service is
non-deterministic and the SIGUSR1 from flushing may kill journald before
it has its signal handlers set up.

https://bugs.freedesktop.org/show_bug.cgi?id=85871
https://bugzilla.redhat.com/show_bug.cgi?id=1159641
2014-11-04 20:32:42 +01:00
Jan Synacek ff8d1aba53 man/tmpfiles.d: fix typo 2014-11-04 20:00:31 +01:00
Kay Sievers a0617aa5d7 TODO: update 2014-11-04 19:07:30 +01:00