1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-20 14:03:39 +03:00

14592 Commits

Author SHA1 Message Date
Lennart Poettering
6b494ffbcb util: make sure all our name_to_handle_at() code makes use of file_handle_union
(cherry picked from commit 21749924e12201d8f5210c5dc9695e18fd16bb93)
2014-06-07 18:14:09 -04:00
Jeffrey Clark
6e150a59ca analyze: fix plot with bad y size
systemd-analyze plot > test.svg produces output with all y and height
element attributes equal to zero. This of course causes the resulting
svg to appear blank (zero height). Bug does not affect x86. Looks like
a compiler optimization may be the culprit.

https://github.com/archlinuxarm/PKGBUILDs/issues/815
(cherry picked from commit a213b7e977221ca96bbc1b19a5a879c912ba2488)
2014-06-07 18:11:26 -04:00
Ray Strode
733f75b878 login: give session ownership of VT
The tty associated with a VT should be owned by the owner of the session
running on the VT. This is important for supporting a socket activated X
server, since the X server will open the tty itself.

This commit makes sure to chown the tty any time a session is
created and and chown it back to root any time the session
is removed. This behavior is copied from /bin/login.

(cherry picked from commit d6176c6c97bf0614c2e7caaf2156bf813b39337a)

Conflicts:
	src/login/logind-session.c
2014-06-07 18:08:15 -04:00
Michael Olbrich
7441fde630 systemctl: delete REBOOT_PARAM_FILE if no parameter is specified
And move it to sperate function.

(cherry picked from commit c5220a940d00fc2520c702104939d0a4cf637254)

Conflicts:
	src/shared/util.c
2014-06-07 18:03:17 -04:00
Dave Reisner
91795825a0 implement a union to pad out file_handle
Cases where name_to_handle_at is used allocated the full struct to be
MAX_HANDLE_SZ, and assigned this size to handle_bytes. This is wrong
since handle_bytes should describe the length of the flexible array
member and not the whole struct.

Define a union type which includes sufficient padding to allow
assignment of MAX_HANDLE_SZ to be correct.

(cherry picked from commit 370c860f748d149097710dc7952a64f627db9de7)

Conflicts:
	src/shared/util.h
2014-06-07 18:01:47 -04:00
Greg KH
ea082a7255 tmpfiles: fix permissions on new journal files
When starting up journald on a new system, set the proper permissions on
the system.journal files, not only on the journal directory.

(cherry picked from commit a606871da508995f5ede113a8fc6538afd98966c)
2014-06-07 17:55:10 -04:00
Zbigniew Jędrzejewski-Szmek
1ba98e163e delta: do not use unicode chars in C locale
https://bugzilla.redhat.com/show_bug.cgi?id=1088418
(cherry picked from commit 00a5cc3a63c125633e822f39efd9c32223169f62)
2014-04-20 10:39:12 -04:00
Djalal Harouni
ac19aafa62 install: create_symlink() check unlink() return value
create_symlink() do not check the return value of unlink(), this may
confuse the user.

Before the unlink() call we check the 'force' argument. If it is not set
we fail with -EEXIST, otherwise we unlink() the file, therefore the next
symlink() should not fail with -EEXIST (do not count races...).

However since callers may not have appropriate privileges to unlink()
the file we lose the -EPERM or any other errno code of unlink(), and
return the -EEXIST of the next symlink(). Fix this by checking unlink()
results.

Before:
$ systemctl --force --root=~/container-03 set-default multi-user.target
Failed to set default target: File exists

After:
$ systemctl --force --root=~/container-03 set-default multi-user.target
Failed to set default target: Permission denied

(cherry picked from commit af7fce1cdb6c0d6ce56bcddccbc31dd3d64a8cd8)
2014-04-20 10:38:47 -04:00
Djalal Harouni
6118707021 systemctl: allow to change the default target without the --force switch
Currently "systemctl set-default" will fail to change the default target
due to the 'default.target' being a symlink which is always the case.

To work around this, the user must specify the "--force" switch to be
able to overwrite the existing symlink.

This is clearly a regression that was introduced by commit  718db96199e
since it worked before without the "--force" switch and the man pages do
not mention that you need to specify it. It is expected that this is a
symlink.

So just explicity set the force flag to make it work again.

https://bugs.freedesktop.org/show_bug.cgi?id=76623

Reported-by: <code@progandy.de>
(cherry picked from commit a1484a216e79da1fa7e2323095fb1b7203fb7a17)
2014-04-20 10:38:29 -04:00
Zbigniew Jędrzejewski-Szmek
b23daada46 man: document relationship between RequiresMountsFor and noauto
https://bugzilla.redhat.com/show_bug.cgi?id=1088057
(cherry picked from commit 5d2abc04fc95f5c5f6d0eaf2f9b06c70d504019f)
2014-04-20 10:38:03 -04:00
Zbigniew Jędrzejewski-Szmek
19333d3a75 sysctl: replaces some slashes with dots
It turns out that plain sysctl understands a.b/c syntax to write to
/proc/sys/a/b.c. Support this for compatibility.

https://bugs.freedesktop.org/show_bug.cgi?id=77466
(cherry picked from commit 2e573fcf8754fdfe0db0a783b1631ec1679b063a)
2014-04-20 10:37:34 -04:00
Thomas Hindoe Paaboel Andersen
d0529fb191 timedatectl: avoid using uninitialized var
sec is not set if have_time is false so avoid using it. have_time
was introduced in 9ff09bcb86fb125768667aca9bc0b10b1745370a but only
the first uses for sec were covered

Found with scan-build

(cherry picked from commit 2667cc25896a15f82f9f1583e80d416beb1316e1)

Conflicts:
	src/timedate/timedatectl.c
2014-04-20 10:36:47 -04:00
Kay Sievers
85f27e3b37 hwdb: PCI - include "primary" model string in subsystem model string
The data in the PCI ids file is randomly inconsistent. Many
subvendor model strings just describe the "product" where the
hardware is built into, not the hardware itself. This causes
some "Network Card Model Foo" to show up as "Laptop Model Bar".

Try to make the best out of this mess and concatenate both
strings to describe the hardware.

(cherry picked from commit d060b62fcb4746d3758c567e9379c6728a035b66)
2014-04-20 10:28:59 -04:00
Kay Sievers
6ece7006e3 hwdb: update
(cherry picked from commit dbe633cc027e31a0d4fb488a3c68b7762ef0e7b3)
2014-04-20 10:28:48 -04:00
Dan Kilman
cc9db03683 bash completion: fix __get_startable_units
(cherry picked from commit a163b64c4b08e8a4ad39a9a295acf3d1634024a3)
2014-04-20 10:14:32 -04:00
Marcel Holtmann
9b57078c63 hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit b189101727e80a09864c5e5880663ef565467f19)
2014-04-20 10:13:32 -04:00
Tanu Kaskinen
58055a972c man: mention XDG_CONFIG_HOME in systemd.unit
(cherry picked from commit 05a2f6fefedd7254fd799502191d025d2908cf74)
2014-04-20 10:13:22 -04:00
Zbigniew Jędrzejewski-Szmek
db401662ea journal: properly detect language specified in line
... it turns out that the duplicates in our own catalog were not real
duplicates, but translations.

(cherry picked from commit baf167ee0a2953f98e4e7d4c35752ef737832674)
2014-04-20 10:10:41 -04:00
Zbigniew Jędrzejewski-Szmek
68018bce87 journal: cleanup up error handling in update_catalog()
- Negative/positive errno mixup caused duplicates not to be detected properly.
  Now we get a warning about some duplicate entries in our own catalogs...
- Errors in update_catalog would be ignored, but they should not be.

(cherry picked from commit e3b9d9c8027a7c4c55cf1614e0fe9423fad69e8f)
2014-04-20 10:10:41 -04:00
Lukas Nykryn
4efc8e4495 cgls: fix running with -M option
systemd-machined doesn't store cgroup path in a state file anymore.
Let's figure it out from the scope.

(cherry picked from commit 13be49798cc4d1bdf84780b6a315e920f20fa11a)
2014-04-20 10:04:55 -04:00
Kay Sievers
c025499cea reduce the amount of messages logged to /dev/kmsg when "debug" is specified
(cherry picked from commit b2103dccb354de3f38c49c14ccb637bdf665e40f)

Conflicts:
	src/core/main.c
2014-04-20 10:03:01 -04:00
Zbigniew Jędrzejewski-Szmek
7b120676af systemd-python: fix failing assert
A parameter which was always null before, now get's set to
the module.

(cherry picked from commit b65f24238b0627143916a9c7f8315483a9666676)
2014-04-07 12:41:42 -04:00
Zbigniew Jędrzejewski-Szmek
3c230a853e systemd-python: use .hex instead of .get_hex()
It turns out the latter got removed in Python 3.

https://bugs.freedesktop.org/show_bug.cgi?id=77086
(cherry picked from commit b532cf3722e04adb0bd075666eb9989a9390d0a2)
2014-04-07 12:41:30 -04:00
Florian Albrechtskirchinger
f418ad2852 tty-ask-password-agent: return negative errno
Return negative errno in wall_tty_block(). get_ctty_devnr() already
returns a negative errno in case of failure, no need to negate it again.

Reported-by: Simon <hwold@odai.homelinux.net>
(cherry picked from commit ee0e4cca5ac37a094dfe1074907dae70c7b7701c)
2014-04-07 12:41:00 -04:00
Zbigniew Jędrzejewski-Szmek
34fd7c3b61 systemctl: update NAME to PATTERN in help()
Previously the man page was modified, but not help().

(cherry picked from commit b3ae710c251d0ce5cf2cef63208e325497b5e323)
2014-04-07 12:30:11 -04:00
Zbigniew Jędrzejewski-Szmek
0fa79586f7 journal: fix export of messages containing newlines
In "export" format, newlines are significant, and messages containing
newlines must be exported as "binary".

(cherry picked from commit 0ade5ffe2778e7b238bba8d979ca4d53dee1e702)
2014-04-07 12:29:54 -04:00
Zbigniew Jędrzejewski-Szmek
fc8dd899a6 journalctl: free arg_file on exit
(cherry picked from commit a36b8debe67f3a5515200dada75cf4dbc334c7f5)
2014-04-07 12:29:54 -04:00
David Herrmann
01fc342299 logind: don't print error if devices vanish during ACL-init
If a device is unplugged while we initialize it, we will get ENOENT for
ACL-init (and related stuff). We currently print errors then, which is
misleading. Print a debug-message early and continue.

(cherry picked from commit 8016b904849a2d2bd8b0171ed8493db5524b5ff7)
2014-04-07 12:29:03 -04:00
Kay Sievers
47d8687d52 udev: do not export "static node" tags for non-existing devices
(cherry picked from commit ca2bb1606a170ce2e45de1345b0119bd220f4f0d)
2014-04-07 12:27:55 -04:00
Scott Thrasher
cc76be2f76 Add hwdb entry for Samsung Series 7 Ultra
(cherry picked from commit 15f392394e75ffb7f318920008fd1bbe4e82b488)
2014-04-07 12:24:11 -04:00
Marcel Holtmann
cc9bdcf31e hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit f89b42ec0fd51feab5566d6bdbacee101023c037)
2014-04-07 12:23:43 -04:00
Kay Sievers
ba3942b489 core: do not read system boot timestamps in systemd --user mode
Before:
  $ systemd-analyze --user
  Startup finished in 2.810s (firmware) + 48ms (loader) + 122ms (userspace) = 122ms

After:
  $ systemd-analyze --user
  Startup finished in 122ms (userspace) = 122ms

(cherry picked from commit 530a9662aa3d291555e5b3f6eb43199e1b04f63c)
2014-04-07 12:23:34 -04:00
Daniel Mack
507cafeefa completions: fix/augment zsh completions for systemd-nspawn, busctl, loginctl, hostnamectl, localectl, machinectl
(cherry picked from commit 4433c995c77b66f42fe4a238aff6b53706628a2e)

Conflicts:
	TODO
2014-04-07 12:22:56 -04:00
Lennart Poettering
5a01c85370 util: consider both fuse.glusterfs and glusterfs network file systems
Based on a similar patch by Lukáš Nykrýn.

(cherry picked from commit 67608cad2301f9ab5c92336992c176505640f2ba)
2014-04-07 12:19:29 -04:00
Lennart Poettering
643d71530d ask-password: when the user types a overly long password, beep and refuse
Based on a similar patch from David Härdeman.

(cherry picked from commit 036eeac5a1799fa2c0ae11a14d8c667b5d303189)
2014-04-07 12:19:00 -04:00
Lennart Poettering
e28c1308c9 systemctl: add more verbose explanation of --kill-who and what control/main processes are
(cherry picked from commit af7424af70d063412c09b0125f4d4a39865210dc)
2014-04-07 12:17:56 -04:00
Lennart Poettering
12a170a495 systemctl: --kill-mode is long long gone, don't mention it in the man page
(cherry picked from commit 0088d63151e088d62104d88f866e9eb049091c22)
2014-04-07 12:17:46 -04:00
Lennart Poettering
72e86f001d man: be more specific when EnvironmentFile= is read
http://lists.freedesktop.org/archives/systemd-devel/2014-March/018004.html
(cherry picked from commit 905826156de95d173b26e7a57df29188a1020cd0)
2014-04-07 12:17:26 -04:00
Lennart Poettering
265f023d76 man: explain that the journal field SYSLOG_IDENTIFIER is usually derived from program_invocation_short_name
(cherry picked from commit d2753d220044892495769f7f9fca297cf86d01b9)
2014-04-07 12:17:19 -04:00
Lennart Poettering
d6a69dada0 sd-event: don't accidentally turn of watchdog timer event if we determine 0
(cherry picked from commit 75145780813957ecbe6835f2c8bc20113a3605d2)
2014-04-07 12:16:53 -04:00
Lennart Poettering
1152478393 sd-event: initialization perturbation value right before we use it
That way, we don't forget to initialize it when the watchdog is
initialized before all event sources.

(cherry picked from commit 52444dc478fe38b5b69a771923ab429a41927aa5)

Conflicts:
	src/libsystemd/sd-event/sd-event.c
2014-04-07 12:16:46 -04:00
Lennart Poettering
d8d658b8b6 sd-daemon: fix incorrect variable access
(cherry picked from commit 56dc9aec21ab23f76fadf45585adf88e71aa8078)
2014-04-07 12:08:28 -04:00
Lennart Poettering
75f801a9ef core: don't try to relabel mounts before we loaded the policy
(cherry picked from commit c4bfd1691f4d3e26d6d7f34dbca941e119956e8a)
2014-04-07 12:07:56 -04:00
Lennart Poettering
c8b2a7b363 sd-bus: don't use assert_return() to check for disconnected bus connections
A terminated connection is a runtime error and not a developer mistake,
hence don't use assert_return() to check for it.

(cherry picked from commit a3d59cd1b0a2738d06893948492113f2c35be0af)

Conflicts:
	src/libsystemd/sd-bus/sd-bus.c
2014-04-07 11:45:28 -04:00
Kay Sievers
40a5150932 hwdb: update
(cherry picked from commit 6080625dc833144aca0817d1b9fd23f2fbcdf5c2)
2014-04-07 11:32:15 -04:00
Lennart Poettering
a92f658715 machined: fix Kill() bus call on machine objects when "what" is specified as "leader"
(cherry picked from commit de58a50e24a0d55e3bbcc77f8f6170a7322acf52)
2014-04-07 11:31:26 -04:00
Lennart Poettering
9f9a67bfb5 cgroup: it's not OK to invoke alloca() in loops
(cherry picked from commit a641dcd9bf05418d6a6c165e1c0cff615b4a0f47)
2014-04-07 11:30:44 -04:00
Thomas Hindoe Paaboel Andersen
cd607cf70d systemd-run: extend bash completion
--system
-H --host
-M --machine
--service-type (options: simple forking oneshot dbus notify idle)
--uid
--gid
--nice
--setenv
-p --property (options read from bus_append_unit_property_assignment)

(cherry picked from commit 761a7c71b649b5e926c28c703a11fbdc22dd6df1)

[zj: remove -p/--property]
2014-04-07 11:29:35 -04:00
Miklos Vajna
c7f5f582de core, libsystemd, systemd, timedate, udev: spelling fixes
(cherry picked from commit 6f285378aa6e4b5b23c939d1fea16f9ab0a57efb)
2014-04-07 11:26:23 -04:00
Jason St. John
7b6a54f753 man: improve wording of systemctl's --after/--before
Commit 4a77ca7 was an attempt at fixing the wording of --after and --before,
but the new wording was unclear.

Split the combined --after/--before section into a separate section for
each, explicitly state what each option does, and add information about
how these lists are generated.

Reported-by: Andrey Borzenkov <arvidjaar@gmail.com>
Reported-by: Lennart Poettering <lennart@poettering.net>
(cherry picked from commit 9029f64298cb70c12ecf638fddee7f41b056fcf1)
2014-04-07 11:25:39 -04:00