Commit graph

9288 commits

Author SHA1 Message Date
Lennart Poettering 1b3a797f6f sd-bus: add support for new InteractiveAuthorizationRequired error from dbus spec 2014-10-28 14:59:48 +01:00
WaLyong Cho 8a188de9e0 mac: add mac_ prefix to distinguish origin security apis 2014-10-28 14:31:48 +01:00
Lennart Poettering ddb7d6b942 swap: drop noauto/nofail bools from Swap structure
We nowadays always set them to "false" anyway, hence let's get rid of
them entirely.
2014-10-28 14:31:25 +01:00
Lennart Poettering 47cb901e38 swap: replace Discard= setting by a more generic Options= setting
For now, it's systemd itself that parses the options string, but as soon
as util-linux' swapon can take the option string directly with -o we
should pass it on unmodified.
2014-10-28 14:31:25 +01:00
Martin Pitt 33488f1979 udev hwdb: Support shipping pre-compiled database in system images
In some cases it is preferable to ship system images with a pre-generated
binary hwdb database, to avoid having to build it at runtime, avoid shipping
the source hwdb files, or avoid storing large binary files in /etc.

So if hwdb.bin does not exist in /etc/udev/, fall back to looking for it in
UDEVLIBEXECDIR. This keeps the possibility to add files to /etc/udev/hwdb.d/
and re-generating the database which trumps the one in /usr/lib.

Add a new --usr flag to "udevadm hwdb --update" which puts the database
into UDEVLIBEXECDIR.

Adjust systemd-udev-hwdb-update.service to not generate the file in /etc if we
already have it in /usr.
2014-10-28 14:28:18 +01:00
Lennart Poettering 090771492f sd-login: let's not needlessly yell at users
While GNOME/KDE are generally capitalized, systemd tools generally are
not, hence let's not start doing so in the XDG_CURRENT_SESSION
environment variable.
2014-10-28 12:31:11 +01:00
Zbigniew Jędrzejewski-Szmek ebc5788e88 manager: print warning on console before reboot
It will be printed even if a prompt is blocking other messages.
2014-10-27 23:17:49 -04:00
Zbigniew Jędrzejewski-Szmek 127d5fd156 manager: convert ephemeral to enum
In preparation for subsequent changes.
2014-10-27 23:02:54 -04:00
Zbigniew Jędrzejewski-Szmek 7c67f0f71a rpm: add user macros 2014-10-27 22:34:09 -04:00
Zbigniew Jędrzejewski-Szmek e46b13c8c7 manager: do not print anything while passwords are being queried
https://bugs.freedesktop.org/show_bug.cgi?id=73942
2014-10-27 22:33:14 -04:00
Zbigniew Jędrzejewski-Szmek 3fcd09602c cdrom_id: do not attempt to read past end of buffer
CID #1238437
2014-10-27 22:30:43 -04:00
Zbigniew Jędrzejewski-Szmek dec23413ec selinux: make sure we do not try to print missing fields
UID or GID of 0 is valid, so we cannot use that to distinguish whether
calls to sd_bus_creds_get_* succeeded, and the return value from the
function is the only way to know about missing fields. Print "n/a" if
the fields are missing.

CID #1238779
2014-10-27 22:30:43 -04:00
Timofey Titovets 3769415e65 login: remove multi-seat-x 2014-10-28 02:24:46 +01:00
Lennart Poettering f189ab18de job: optionally, when a job timeout is hit, also execute a failure action 2014-10-28 02:19:55 +01:00
Lennart Poettering fa1b91632c core: remove system start timeout logic again
The system start timeout as previously implemented would get confused by
long-running services that are included in the initial system startup
transaction for example by being cron-job-like long-running services
triggered immediately at boot. Such long-running jobs would be subject
to the default 15min timeout, esily triggering it.

Hence, remove this again. In a subsequent commit, introduce per-target
job timeouts instead, that allow us to control these timeouts more
finegrained.
2014-10-28 01:42:13 +01:00
Lennart Poettering 294330896d journald: be nice to coverity, add an extra assert
coverity otherwise assumes that the chain object might be NULL.
2014-10-27 23:50:53 +01:00
Lennart Poettering dbfd41e2df calendarspec: parse 'quarterly' and 'semi-annually' as shortcuts 2014-10-27 18:09:26 +01:00
Tom Gundersen a2a85a22b3 networkd: network - if no prefixlength is given, try to deduce one from the address class
In case of a class E or F address, ignore the address.
2014-10-27 17:40:24 +01:00
Tom Gundersen df40eee8ed shared: in-addr-utils - add default_subnet_mask and default_prefixlen methods
These use the (deprecated) IPv4 address classes to deduce the corresponding subnet masks. This is useful when addresses
without subnet masks and prefix lengths are given.

Make use of these new functions from sd-dhcp-lease.
2014-10-27 17:40:24 +01:00
Daniel Mack 5ebe2ce782 sd-bus: sync kdbus.h (ABI break)
Some comment fixes and header cleanups in kdbus.h, and the task capability
meta information has been factored out to its own struct.
2014-10-27 17:02:31 +01:00
Daniele Medri 272ac20517 calendar: new case 'minutely' 2014-10-27 13:42:02 +01:00
Lennart Poettering 24f6fc22c1 sd-bus: explicitly cast asprintf() return value away we are not interested in
Let's give coverity a hint what's going on here.
2014-10-27 13:06:20 +01:00
Lennart Poettering 54ad51e3e9 Revert "sd-bus: check return value of asprintf()"
This reverts commit b1543c4c93.

We check b->address anyway, no need to check the return value,
especially given that the other #ifdef branch don't get the same
treatment.
2014-10-27 13:04:17 +01:00
Michal Sekletar d89b5fed9e shutdown: do final unmounting only if not running inside the container
If we run in the container then we run in a mount namespace. If namespace dies
then kernel should do unmounting for us, hence we skip unmounting in containers.

Also, it may be the case that we no longer have capability to do umount,
because we are running in the unprivileged container.

See: http://lists.freedesktop.org/archives/systemd-devel/2014-October/023536.html
2014-10-27 12:20:15 +01:00
Tom Gundersen dbafa734d8 networkd: don't stop the dhcp server when link goes down 2014-10-27 11:42:33 +01:00
Michal Sekletar a9169c1c58 util: fix copy-paste error and actually set the new hostname
Reported-by: sztanpet on irc
2014-10-27 11:09:39 +01:00
Michal Sekletar 605f81a896 util: introduce sethostname_idempotent
Function queries system hostname and applies changes only when necessary. Also,
migrate all client of sethostname to sethostname_idempotent while at it.
2014-10-27 10:37:46 +01:00
Zbigniew Jędrzejewski-Szmek caa2f4c0c9 journald: fix flushing
Commit 74055aa762 'journalctl: add new --flush command and make use of
it in systemd-journal-flush.service' broke flushing because journald
checks for the /run/systemd/journal/flushed file before opening the
permanent journal. When the creation of this file was postponed,
flushing stoppage ensued.
2014-10-26 00:35:23 -04:00
Zbigniew Jędrzejewski-Szmek e95c98378a systemctl: do not ignore errors in symlink removal
On an ro fs, systemctl disable ... would fail silently.
2014-10-25 15:34:48 -04:00
Zbigniew Jędrzejewski-Szmek 7c52a17b1a Rearrange Unit to make pahole happy
After all we have lots of those.
2014-10-25 15:34:48 -04:00
Zbigniew Jędrzejewski-Szmek e90efc7090 calendarspec: fix typo in "annually"
https://bugs.freedesktop.org/show_bug.cgi?id=85447
2014-10-25 11:59:36 -04:00
Santiago Vila 7558251eef journalctl: correct help text for --until
http://bugs.debian.org/766598
2014-10-25 10:40:47 -04:00
Lennart Poettering 96343c3039 bus-proxy: it's OK if getpeercred doesn't work
We should use the data if we can (if stdin/stdout is an AF_UNIX socket),
but still work if we can't (if stdin/stdout are pipes, like in the SSH
case).

This effectively reverts 55534fb5e4
2014-10-24 19:29:59 +02:00
Lennart Poettering 455cd8b137 sd-bus: if we don't manage to properly allocate the error message for an sd_bus_error, just go on
sd_bus_error_setfv() must initialize the sd_bus_error value to some
sensible value and then return a good errno code matching that. If it
cannot work at all it should set the error statically to the OOM error.
But if it can work half-way (i.e. initialize the name, but not the
message) it should do so and still return the correct errno number for
it.

This effectively reverts 8bf13eb1e0
2014-10-24 19:24:53 +02:00
Lennart Poettering bb1fada8cc time: don't do comparison twice 2014-10-24 19:10:09 +02:00
Lennart Poettering 75a5f1d837 time: minor simplification 2014-10-24 19:09:36 +02:00
Lennart Poettering 65de0395ff time: earlier exit from format_timestamp_relative() on special times 2014-10-24 19:08:22 +02:00
Lennart Poettering e73c78c275 time: also support 'infinity' syntax in parse_nsec()
Let's make parse_usec() and parse_nsec() work similar
2014-10-24 19:07:31 +02:00
Lennart Poettering a572b2e006 delta: use wait_for_terminate_and_warn() to generate warnin when diff fails 2014-10-24 18:48:11 +02:00
Lennart Poettering 0b76b4d8c2 calendar: make freeing a calendar spec object deal fine with NULL
In order to make object destruction easier (in particular in combination
with _cleanup_) we usually make destructors deal with NULL objects as
NOPs. Change the calendar spec destructor to follow the same scheme.
2014-10-24 18:33:29 +02:00
Lennart Poettering 69f0081748 timesyncd: the IP_TOS sockopt is really just an optimization, we shouldn't fail if we can't set it
This partially undos 2f905e821e
2014-10-24 18:32:30 +02:00
Jan Janssen ea7061e4d4 journalctl: Unify boot id lookup into common function get_boots 2014-10-24 08:50:45 -04:00
WaLyong Cho 2ec62d8e84 udev: do NOT re-label smack
If selinux is disabled and smack is only enabled, smack label is
relable-ed by label_fix. To avoid, make only be labeled for selinux.
2014-10-24 13:56:24 +02:00
Lennart Poettering 4dffec1459 manager: Linux on hppa has fewer rtsigs, hence avoid using the higher ones there
https://bugs.freedesktop.org/show_bug.cgi?id=84931
2014-10-24 13:45:24 +02:00
Klaus Purer b26c631ac9 journald: removed gendered pronouns in comment 2014-10-24 13:32:16 +02:00
Hugo Grostabussiat a6fb0dc138 cryptsetup: Fix timeout on dm device.
Fix a bug in systemd-cryptsetup-generator which caused the drop-in
setting the job timeout for the dm device unit to be written with a
name different than the unit name.

https://bugs.freedesktop.org/show_bug.cgi?id=84409
2014-10-24 02:14:49 +02:00
Marius Tessmann a2726e5ced shutdown: pass own argv to /run/initramfs/shutdown
Since commit b1e90ec515 systemd passes
its log settings to systemd-shutdown via command line parameters.
However, systemd-shutdown doesn't pass these parameters to
/run/initramfs/shutdown, causing it to fall back to the default log
settings.

This fixes the following bugs about the shutdown not being quiet
despite "quiet" being in the kernel parameters:

https://bugs.freedesktop.org/show_bug.cgi?id=79582
https://bugs.freedesktop.org/show_bug.cgi?id=57216
2014-10-24 01:36:07 +02:00
Lennart Poettering a07e9cfb79 selinux: fix handling of relative paths when setting up create label 2014-10-24 01:15:53 +02:00
Lennart Poettering 43b133b4e0 socket: properly label socket symlinks 2014-10-23 23:58:01 +02:00
Lennart Poettering 75514a707c socket: fix error comparison 2014-10-23 23:57:50 +02:00