systemd/handle-SYSTEMCTL_OPTIONS-environment-variable.patch
Robert Milasan 3951a5faf1 (please fwd to 13.1 too)
- Release v208:
  + logind gained support for facilitating privileged input and drm
    devices access for unprivileged clients (helps Wayland /
    kmscon).
  + New kernel command line luks.options= allows to specify LUKS
    options, when used with luks.uuid=
  + tmpfileS.d snippets can uses specifier expansion in path names
    (%m, %b, %H, %v).
  + New tmpfiles.d command "m" introduced to change
    owner/group/access mode of a file/directory only if it exists.
  + MemorySoftLimit= cgroup settings is no longer supported
    (underlying kernel cgroup attribute will disappear in the
    future).
  + memeory.use_hierarchy cgroup attribute is enabled for all
    cgroups systemd creates in memory cgroup hierarchy.
  + New filed _SYSTEMD_SLICE= is logged in journal messages related
    to a slice.
  + systemd-journald will no longer adjust the group of journal
    files it creates to "systemd-journal" group. Permissions and
    owernship is adjusted when package is upgraded.
  + Backlight and random seed files are now stored in
    /var/lib/systemd.
  + Boot time performance measurements included ACPI 5.0 FPDT
    informations if available.
- Drop merged patches:
  0001-cgroup-add-the-missing-setting-of-variable-s-value.patch,
  0002-cgroup-correct-the-log-information.patch,
  0003-cgroup-fix-incorrectly-setting-memory-cgroup.patch,
  0004-random-seed-we-should-return-errno-of-failed-loop_wr.patch,
  0005-core-cgroup-first-print-then-free.patch,

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=448
2013-10-02 11:01:24 +00:00

43 lines
1.8 KiB
Diff

From: Frederic Crozat <fcrozat@suse.com>
Date: Tue, 22 Jan 2013 17:02:04 +0000
Subject: handle SYSTEMCTL_OPTIONS environment variable
(bnc#798620)
---
src/systemctl/systemctl.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
Index: systemd-208/src/systemctl/systemctl.c
===================================================================
--- systemd-208.orig/src/systemctl/systemctl.c
+++ systemd-208/src/systemctl/systemctl.c
@@ -6115,6 +6115,28 @@ int main(int argc, char*argv[]) {
* ellipsized. */
original_stdout_is_tty = isatty(STDOUT_FILENO);
+ if (secure_getenv("SYSTEMCTL_OPTIONS") &&
+ (!program_invocation_short_name ||
+ (program_invocation_short_name && strstr(program_invocation_short_name, "systemctl")))) {
+ char **parsed_systemctl_options = strv_split_quoted(getenv("SYSTEMCTL_OPTIONS"));
+
+ if (*parsed_systemctl_options && **parsed_systemctl_options) {
+ char **k,**a;
+ char **new_argv = new(char*, strv_length(argv) + strv_length(parsed_systemctl_options) + 1);
+ new_argv[0] = strdup(argv[0]);
+ for (k = new_argv+1, a = parsed_systemctl_options; *a; k++, a++) {
+ *k = strdup(*a);
+ }
+ for (a = argv+1; *a; k++, a++) {
+ *k = strdup(*a);
+ }
+ *k = NULL;
+ argv = new_argv;
+ argc = strv_length(new_argv);
+ strv_free (parsed_systemctl_options);
+ }
+ }
+
r = parse_argv(argc, argv);
if (r < 0)
goto finish;