Compare commits
28 Commits
Author | SHA1 | Date |
---|---|---|
Zbigniew Jędrzejewski-Szmek | af5f2ab9d6 | |
Zbigniew Jędrzejewski-Szmek | 5539b72f8d | |
Zbigniew Jędrzejewski-Szmek | 46a556fc69 | |
Zbigniew Jędrzejewski-Szmek | 4b73dbdf76 | |
Michal Schmidt | b356b73f5c | |
Lennart Poettering | 329d18d4d8 | |
Michal Schmidt | e3e6fc8f15 | |
Lennart Poettering | 41548cd105 | |
Lennart Poettering | a323eb72ba | |
Michal Schmidt | 39f05ae675 | |
Michal Schmidt | ca5f3014c4 | |
Michal Schmidt | 7182762424 | |
Michal Schmidt | 26011bc6e6 | |
Michal Schmidt | b3f9281de5 | |
Michal Schmidt | 54dbdc6c2a | |
Lennart Poettering | 088e0218dc | |
Michal Schmidt | 98b317417a | |
Michal Schmidt | d1a04b4502 | |
Michal Schmidt | 38eaaea79e | |
Lennart Poettering | 9d8d62c94d | |
Lennart Poettering | 40644af5eb | |
Michal Schmidt | a3bf5bccad | |
Michal Schmidt | eac5d45ed7 | |
Michal Schmidt | aa2b4b80c5 | |
Michal Schmidt | c4848b4158 | |
Michal Schmidt | 2ac6fcbaae | |
Michal Schmidt | 7164b0807b | |
Lennart Poettering | 181708243f |
|
@ -0,0 +1,28 @@
|
|||
From c673e19a9026f17cd1e0f33e5ec1610622d908cb Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Fri, 11 Jan 2013 22:36:06 +0100
|
||||
Subject: [PATCH] (F18) units: don't always use sulogin in rescue.service
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Undo commit 7f0086f8c9307a9a62f31a4aa5c8d3de74abd06b. I don't want this
|
||||
changed within a Fedora release.
|
||||
---
|
||||
units/rescue.service.m4.in | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
|
||||
index 269797a..dde5271 100644
|
||||
--- a/units/rescue.service.m4.in
|
||||
+++ b/units/rescue.service.m4.in
|
||||
@@ -18,7 +18,8 @@ Environment=HOME=/root
|
||||
WorkingDirectory=/root
|
||||
ExecStartPre=-/bin/plymouth quit
|
||||
ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
|
||||
-ExecStart=-/sbin/sulogin
|
||||
+EnvironmentFile=/etc/sysconfig/init
|
||||
+ExecStart=-/bin/bash -c "exec ${SINGLE}"
|
||||
ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
|
||||
Type=idle
|
||||
StandardInput=tty-force
|
|
@ -1,120 +0,0 @@
|
|||
From 2b3509a898dcb65d6fba41f3c9cd484b00730017 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Thu, 15 Nov 2012 16:55:09 +0100
|
||||
Subject: [PATCH] revert udev killing
|
||||
|
||||
revert of upstream commit 194bbe33382f5365be3865ed1779147cb680f1d3
|
||||
---
|
||||
src/udev/udevd.c | 32 ++++++++++++++++----------------
|
||||
1 file changed, 16 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
|
||||
index ebd601e..53322b0 100644
|
||||
--- a/src/udev/udevd.c
|
||||
+++ b/src/udev/udevd.c
|
||||
@@ -74,7 +74,6 @@ static int exec_delay;
|
||||
static sigset_t sigmask_orig;
|
||||
static UDEV_LIST(event_list);
|
||||
static UDEV_LIST(worker_list);
|
||||
-char *udev_cgroup;
|
||||
static bool udev_exit;
|
||||
|
||||
enum event_state {
|
||||
@@ -453,13 +452,22 @@ static int event_queue_insert(struct udev_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static void worker_kill(struct udev *udev)
|
||||
+static void worker_kill(struct udev *udev, int retain)
|
||||
{
|
||||
struct udev_list_node *loop;
|
||||
+ int max;
|
||||
+
|
||||
+ if (children <= retain)
|
||||
+ return;
|
||||
+
|
||||
+ max = children - retain;
|
||||
|
||||
udev_list_node_foreach(loop, &worker_list) {
|
||||
struct worker *worker = node_to_worker(loop);
|
||||
|
||||
+ if (max-- <= 0)
|
||||
+ break;
|
||||
+
|
||||
if (worker->state == WORKER_KILLED)
|
||||
continue;
|
||||
|
||||
@@ -631,7 +639,7 @@ static struct udev_ctrl_connection *handle_ctrl_msg(struct udev_ctrl *uctrl)
|
||||
log_debug("udevd message (SET_LOG_PRIORITY) received, log_priority=%i\n", i);
|
||||
log_set_max_level(i);
|
||||
udev_set_log_priority(udev, i);
|
||||
- worker_kill(udev);
|
||||
+ worker_kill(udev, 0);
|
||||
}
|
||||
|
||||
if (udev_ctrl_get_stop_exec_queue(ctrl_msg) > 0) {
|
||||
@@ -673,7 +681,7 @@ static struct udev_ctrl_connection *handle_ctrl_msg(struct udev_ctrl *uctrl)
|
||||
}
|
||||
free(key);
|
||||
}
|
||||
- worker_kill(udev);
|
||||
+ worker_kill(udev, 0);
|
||||
}
|
||||
|
||||
i = udev_ctrl_get_set_children_max(ctrl_msg);
|
||||
@@ -1198,10 +1206,6 @@ int main(int argc, char *argv[])
|
||||
rc = 3;
|
||||
goto exit;
|
||||
}
|
||||
-
|
||||
- /* get our own cgroup, we regularly kill everything udev has left behind */
|
||||
- if (cg_get_by_pid(SYSTEMD_CGROUP_CONTROLLER, 0, &udev_cgroup) < 0)
|
||||
- udev_cgroup = NULL;
|
||||
} else {
|
||||
/* open control and netlink socket */
|
||||
udev_ctrl = udev_ctrl_new(udev);
|
||||
@@ -1400,7 +1404,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* discard queued events and kill workers */
|
||||
event_queue_cleanup(udev, EVENT_QUEUED);
|
||||
- worker_kill(udev);
|
||||
+ worker_kill(udev, 0);
|
||||
|
||||
/* exit after all has cleaned up */
|
||||
if (udev_list_node_is_empty(&event_list) && udev_list_node_is_empty(&worker_list))
|
||||
@@ -1408,13 +1412,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* timeout at exit for workers to finish */
|
||||
timeout = 30 * 1000;
|
||||
- } else if (udev_list_node_is_empty(&event_list) && !children) {
|
||||
+ } else if (udev_list_node_is_empty(&event_list) && children <= 2) {
|
||||
/* we are idle */
|
||||
timeout = -1;
|
||||
-
|
||||
- /* cleanup possible left-over processes in our cgroup */
|
||||
- if (udev_cgroup)
|
||||
- cg_kill(SYSTEMD_CGROUP_CONTROLLER, udev_cgroup, SIGKILL, false, true, NULL);
|
||||
} else {
|
||||
/* kill idle or hanging workers */
|
||||
timeout = 3 * 1000;
|
||||
@@ -1435,7 +1435,7 @@ int main(int argc, char *argv[])
|
||||
/* kill idle workers */
|
||||
if (udev_list_node_is_empty(&event_list)) {
|
||||
log_debug("cleanup idle workers\n");
|
||||
- worker_kill(udev);
|
||||
+ worker_kill(udev, 2);
|
||||
}
|
||||
|
||||
/* check for hanging events */
|
||||
@@ -1490,7 +1490,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* reload requested, HUP signal received, rules changed, builtin changed */
|
||||
if (reload) {
|
||||
- worker_kill(udev);
|
||||
+ worker_kill(udev, 0);
|
||||
rules = udev_rules_unref(rules);
|
||||
udev_builtin_exit(udev);
|
||||
reload = false;
|
||||
--
|
||||
1.7.11.7
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
From 0049f05a8bb82c3e084bacc5945596761d706c55 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 16 Nov 2012 01:30:29 +0100
|
||||
Subject: [PATCH] shutdown: readd explicit sync() when shutting down
|
||||
|
||||
As it turns out reboot() doesn't actually imply a file system sync, but
|
||||
only a disk sync. Accordingly, readd explicit sync() invocations
|
||||
immediately before we invoke reboot().
|
||||
|
||||
This is much less dramatic than it might sounds as we umount all
|
||||
disks/read-only remount them anyway before going down.
|
||||
---
|
||||
src/core/service.c | 1 +
|
||||
src/core/shutdown.c | 7 +++++++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index cf08485..df72aba 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -2485,6 +2485,7 @@ static int service_start_limit_test(Service *s) {
|
||||
|
||||
case SERVICE_START_LIMIT_REBOOT_IMMEDIATE:
|
||||
log_warning("%s start request repeated too quickly, rebooting immediately.", UNIT(s)->id);
|
||||
+ sync();
|
||||
reboot(RB_AUTOBOOT);
|
||||
break;
|
||||
|
||||
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
|
||||
index cc8c57b..b59aef1 100644
|
||||
--- a/src/core/shutdown.c
|
||||
+++ b/src/core/shutdown.c
|
||||
@@ -273,6 +273,13 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
+ /* The kernel will automaticall flush ATA disks and suchlike
|
||||
+ * on reboot(), but the file systems need to be synce'd
|
||||
+ * explicitly in advance. So let's do this here, but not
|
||||
+ * needlessly slow down containers. */
|
||||
+ if (!in_container)
|
||||
+ sync();
|
||||
+
|
||||
if (cmd == LINUX_REBOOT_CMD_KEXEC) {
|
||||
|
||||
if (!in_container) {
|
||||
--
|
||||
1.7.12.1
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
From 891a4918ef75fa81e22691156c050d061bd53dd3 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 16 Nov 2012 18:15:30 +0100
|
||||
Subject: [PATCH] switch-root: try pivot_root() before overmounting /
|
||||
|
||||
We should always try to umount the old root dir if possible, instead of
|
||||
overmounting it -- if that's possible.
|
||||
|
||||
The initial ("first") kernel rootfs can never be umounted, hence
|
||||
for the usual nitrd case we never bothered using pivot_root() and
|
||||
hence with fully unmounting it. However, fedup now tranisitions twice
|
||||
during boot, and in that case it is highly desirable that the "second"
|
||||
root dir is entirely unmounted when we switch to the "third". This patch
|
||||
makes that possible.
|
||||
|
||||
The pivot_root() needs a directory in the "third" root dir, to move the
|
||||
"second" root dir to. We use /mnt for that, under the assumption that
|
||||
this directory is likely to exist, and is not itself a mount point.
|
||||
---
|
||||
src/core/switch-root.c | 27 ++++++++++++++++++++++++++-
|
||||
1 file changed, 26 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/switch-root.c b/src/core/switch-root.c
|
||||
index 150332a..ce0e41d 100644
|
||||
--- a/src/core/switch-root.c
|
||||
+++ b/src/core/switch-root.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "util.h"
|
||||
#include "path-util.h"
|
||||
#include "switch-root.h"
|
||||
+#include "missing.h"
|
||||
|
||||
int switch_root(const char *new_root) {
|
||||
|
||||
@@ -44,10 +45,21 @@ int switch_root(const char *new_root) {
|
||||
struct stat new_root_stat;
|
||||
bool old_root_remove;
|
||||
const char *i;
|
||||
+ _cleanup_free_ char *temporary_old_root = NULL;
|
||||
|
||||
if (path_equal(new_root, "/"))
|
||||
return 0;
|
||||
|
||||
+ /* When using pivot_root() we assume that /mnt exists as place
|
||||
+ * we can temporarily move the old root to. As we immediately
|
||||
+ * unmount it from there it doesn't matter much which
|
||||
+ * directory we choose for this, but it should be more likely
|
||||
+ * than not that /mnt exists and is suitable as mount point
|
||||
+ * and is on the same fs as the old root dir */
|
||||
+ temporary_old_root = strappend(new_root, "/mnt");
|
||||
+ if (!temporary_old_root)
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
old_root_remove = in_initrd();
|
||||
|
||||
if (stat(new_root, &new_root_stat) < 0) {
|
||||
@@ -103,7 +115,20 @@ int switch_root(const char *new_root) {
|
||||
log_warning("Failed to open root directory: %m");
|
||||
}
|
||||
|
||||
- if (mount(new_root, "/", NULL, MS_MOVE, NULL) < 0) {
|
||||
+ /* We first try a pivot_root() so that we can umount the old
|
||||
+ * root dir. In many cases (i.e. where rootfs is /), that's
|
||||
+ * not possible however, and hence we simply overmount root */
|
||||
+ if (pivot_root(new_root, temporary_old_root) >= 0) {
|
||||
+
|
||||
+ /* Immediately get rid of the old root. Since we are
|
||||
+ * running off it we need to do this lazily. */
|
||||
+ if (umount2(temporary_old_root, MNT_DETACH) < 0) {
|
||||
+ r = -errno;
|
||||
+ log_error("Failed to umount old root dir %s: %m", temporary_old_root);
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ } else if (mount(new_root, "/", NULL, MS_MOVE, NULL) < 0) {
|
||||
r = -errno;
|
||||
log_error("Failed to mount moving %s to /: %m", new_root);
|
||||
goto fail;
|
||||
--
|
||||
1.7.12.1
|
||||
|
|
@ -1,95 +0,0 @@
|
|||
From 93bd157722c76b47d80742f290373c1ce2865070 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 16 Nov 2012 18:36:28 +0100
|
||||
Subject: [PATCH] umount: always remount read-only before unmounting in final
|
||||
shutdown loop
|
||||
|
||||
---
|
||||
src/core/umount.c | 57 ++++++++++++++++++++++++++-----------------------------
|
||||
1 file changed, 27 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/src/core/umount.c b/src/core/umount.c
|
||||
index 83c9de3..e794057 100644
|
||||
--- a/src/core/umount.c
|
||||
+++ b/src/core/umount.c
|
||||
@@ -407,6 +407,33 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
|
||||
assert(head);
|
||||
|
||||
LIST_FOREACH_SAFE(mount_point, m, n, *head) {
|
||||
+
|
||||
+ /* If we are in a container, don't attempt to
|
||||
+ read-only mount anything as that brings no real
|
||||
+ benefits, but might confuse the host, as we remount
|
||||
+ the superblock here, not the bind mound. */
|
||||
+ if (detect_container(NULL) <= 0) {
|
||||
+ /* We always try to remount directories
|
||||
+ * read-only first, before we go on and umount
|
||||
+ * them.
|
||||
+ *
|
||||
+ * Mount points can be stacked. If a mount
|
||||
+ * point is stacked below / or /usr, we
|
||||
+ * cannnot umount or remount it directly,
|
||||
+ * since there is no way to refer to the
|
||||
+ * underlying mount. There's nothing we can do
|
||||
+ * about it for the general case, but we can
|
||||
+ * do something about it if it is aliased
|
||||
+ * somehwere else via a bind mount. If we
|
||||
+ * explicitly remount the super block of that
|
||||
+ * alias read-only we hence should be
|
||||
+ * relatively safe regarding keeping the fs we
|
||||
+ * can otherwise not see dirty. */
|
||||
+ mount(NULL, m->path, NULL, MS_REMOUNT|MS_RDONLY, NULL);
|
||||
+ }
|
||||
+
|
||||
+ /* Skip / and /usr since we cannot unmount that
|
||||
+ * anyway, since we are running from it */
|
||||
if (path_equal(m->path, "/")
|
||||
#ifndef HAVE_SPLIT_USR
|
||||
|| path_equal(m->path, "/usr")
|
||||
@@ -432,29 +459,6 @@ static int mount_points_list_umount(MountPoint **head, bool *changed, bool log_e
|
||||
return n_failed;
|
||||
}
|
||||
|
||||
-static int mount_points_list_remount_read_only(MountPoint **head, bool *changed) {
|
||||
- MountPoint *m, *n;
|
||||
- int n_failed = 0;
|
||||
-
|
||||
- assert(head);
|
||||
-
|
||||
- LIST_FOREACH_SAFE(mount_point, m, n, *head) {
|
||||
-
|
||||
- /* Trying to remount read-only */
|
||||
- if (mount(NULL, m->path, NULL, MS_REMOUNT|MS_RDONLY, NULL) == 0) {
|
||||
- if (changed)
|
||||
- *changed = true;
|
||||
-
|
||||
- mount_point_free(head, m);
|
||||
- } else {
|
||||
- log_warning("Could not remount as read-only %s: %m", m->path);
|
||||
- n_failed++;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return n_failed;
|
||||
-}
|
||||
-
|
||||
static int swap_points_list_off(MountPoint **head, bool *changed) {
|
||||
MountPoint *m, *n;
|
||||
int n_failed = 0;
|
||||
@@ -571,13 +575,6 @@ int umount_all(bool *changed) {
|
||||
if (r <= 0)
|
||||
goto end;
|
||||
|
||||
- /* If we are in a container, don't attempt to read-only mount
|
||||
- anything as that brings no real benefits, but might confuse
|
||||
- the host, as we remount the superblock here, not the bind
|
||||
- mound. */
|
||||
- if (detect_container(NULL) <= 0)
|
||||
- r = mount_points_list_remount_read_only(&mp_list_head, changed);
|
||||
-
|
||||
end:
|
||||
mount_points_list_free(&mp_list_head);
|
||||
|
||||
--
|
||||
1.7.12.1
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
From 1a9e807ff085455b4a196feb99a5388889752537 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Tue, 9 Apr 2013 11:06:56 +0200
|
||||
Subject: [PATCH] (F18) Revert "service: sysv - remove distribution specific
|
||||
targets"
|
||||
|
||||
This reverts commit 3f141375cb4ff4f850b267258e776c90df594990.
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
man/systemd.special.xml | 28 ++++++++++++++++++++++++++++
|
||||
src/core/service.c | 8 ++++++++
|
||||
src/core/special.h | 2 ++
|
||||
units/mail-transfer-agent.target | 13 +++++++++++++
|
||||
5 files changed, 52 insertions(+)
|
||||
create mode 100644 units/mail-transfer-agent.target
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 21a0e4b..57be908 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -361,6 +361,7 @@ dist_systemunit_DATA = \
|
||||
units/network-online.target \
|
||||
units/nss-lookup.target \
|
||||
units/nss-user-lookup.target \
|
||||
+ units/mail-transfer-agent.target \
|
||||
units/hibernate.target \
|
||||
units/hybrid-sleep.target \
|
||||
units/poweroff.target \
|
||||
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
|
||||
index cd0f5aa..b055c6b 100644
|
||||
--- a/man/systemd.special.xml
|
||||
+++ b/man/systemd.special.xml
|
||||
@@ -69,6 +69,7 @@
|
||||
<filename>kexec.target</filename>,
|
||||
<filename>local-fs.target</filename>,
|
||||
<filename>local-fs-pre.target</filename>,
|
||||
+ <filename>mail-transfer-agent.target</filename>,
|
||||
<filename>multi-user.target</filename>,
|
||||
<filename>network.target</filename>,
|
||||
<filename>network-online.target</filename>,
|
||||
@@ -209,6 +210,14 @@
|
||||
<filename>gdm.service</filename>
|
||||
or a similar display manager
|
||||
service.</para>
|
||||
+ <para>systemd automatically
|
||||
+ adds dependencies of type
|
||||
+ After for this target unit to
|
||||
+ all SysV init script service
|
||||
+ units with a LSB header
|
||||
+ referring to the
|
||||
+ <literal>$x-display-manager</literal>
|
||||
+ facility.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
@@ -366,6 +375,25 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
+ <term><filename>mail-transfer-agent.target</filename></term>
|
||||
+ <listitem>
|
||||
+ <para>The mail transfer agent
|
||||
+ (MTA) service. Usually this
|
||||
+ should pull-in all units
|
||||
+ necessary for
|
||||
+ sending/receiving mails on the
|
||||
+ local host.</para>
|
||||
+
|
||||
+ <para>systemd automatically
|
||||
+ adds dependencies of type
|
||||
+ After for this target unit to
|
||||
+ all SysV init script service
|
||||
+ units with an LSB header
|
||||
+ referring to the
|
||||
+ <literal>$mail-transfer-agent</literal>.</para>
|
||||
+ </listitem>
|
||||
+ </varlistentry>
|
||||
+ <varlistentry>
|
||||
<term><filename>multi-user.target</filename></term>
|
||||
<listitem>
|
||||
<para>A special target unit
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index a104b30..29e3504 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -355,6 +355,13 @@ static int sysv_translate_facility(const char *name, const char *filename, char
|
||||
"remote_fs", SPECIAL_REMOTE_FS_TARGET,
|
||||
"syslog", NULL,
|
||||
"time", SPECIAL_TIME_SYNC_TARGET,
|
||||
+
|
||||
+ /* common extensions */
|
||||
+ "mail-transfer-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
|
||||
+ "x-display-manager", SPECIAL_DISPLAY_MANAGER_SERVICE,
|
||||
+ "null", NULL,
|
||||
+ "mail-transport-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
|
||||
+ "smtp", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
|
||||
};
|
||||
|
||||
unsigned i;
|
||||
@@ -805,6 +812,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||
}
|
||||
|
||||
r = sysv_translate_facility(n, path_get_file_name(path), &m);
|
||||
+
|
||||
if (r < 0) {
|
||||
log_error_unit(u->id,
|
||||
"[%s:%u] Failed to translate LSB dependency %s, ignoring: %s",
|
||||
diff --git a/src/core/special.h b/src/core/special.h
|
||||
index a9b50bc..d5a0fe8 100644
|
||||
--- a/src/core/special.h
|
||||
+++ b/src/core/special.h
|
||||
@@ -63,6 +63,8 @@
|
||||
#define SPECIAL_NSS_LOOKUP_TARGET "nss-lookup.target" /* LSB's $named */
|
||||
#define SPECIAL_RPCBIND_TARGET "rpcbind.target" /* LSB's $portmap */
|
||||
#define SPECIAL_TIME_SYNC_TARGET "time-sync.target" /* LSB's $time */
|
||||
+#define SPECIAL_DISPLAY_MANAGER_SERVICE "display-manager.service" /* Common extension of LSB */
|
||||
+#define SPECIAL_MAIL_TRANSFER_AGENT_TARGET "mail-transfer-agent.target" /* Common extension of LSB */
|
||||
|
||||
/*
|
||||
* Rules regarding adding further high level targets like the above:
|
||||
diff --git a/units/mail-transfer-agent.target b/units/mail-transfer-agent.target
|
||||
new file mode 100644
|
||||
index 0000000..d2f24d1
|
||||
--- /dev/null
|
||||
+++ b/units/mail-transfer-agent.target
|
||||
@@ -0,0 +1,13 @@
|
||||
+# This file is part of systemd.
|
||||
+#
|
||||
+# systemd is free software; you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU Lesser General Public License as published by
|
||||
+# the Free Software Foundation; either version 2.1 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+# This exists mostly for compatibility with SysV/LSB units, and
|
||||
+# implementations lacking socket/bus activation.
|
||||
+
|
||||
+[Unit]
|
||||
+Description=Mail Transfer Agent
|
||||
+Documentation=man:systemd.special(7)
|
|
@ -0,0 +1,86 @@
|
|||
From 520a6b9454fd4e905298c8b37a8141b764035b17 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Fri, 11 Jan 2013 23:22:49 +0100
|
||||
Subject: [PATCH] (F18) re-add http-daemon.target
|
||||
|
||||
Partial revert of 669b04a492e33601e6c34a40bc96ad9ffa11c5a2.
|
||||
In case someone uses the odd facility names in F18. Who knows.
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
man/systemd.special.xml | 1 +
|
||||
src/core/service.c | 5 +++++
|
||||
src/core/special.h | 1 +
|
||||
units/http-daemon.target | 12 ++++++++++++
|
||||
5 files changed, 20 insertions(+)
|
||||
create mode 100644 units/http-daemon.target
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 57be908..ce56d05 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -364,6 +364,7 @@ dist_systemunit_DATA = \
|
||||
units/mail-transfer-agent.target \
|
||||
units/hibernate.target \
|
||||
units/hybrid-sleep.target \
|
||||
+ units/http-daemon.target \
|
||||
units/poweroff.target \
|
||||
units/reboot.target \
|
||||
units/rescue.target \
|
||||
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
|
||||
index b055c6b..2a1c320 100644
|
||||
--- a/man/systemd.special.xml
|
||||
+++ b/man/systemd.special.xml
|
||||
@@ -63,6 +63,7 @@
|
||||
<filename>graphical.target</filename>,
|
||||
<filename>halt.target</filename>,
|
||||
<filename>hibernate.target</filename>,
|
||||
+ <filename>http-daemon.target</filename>,
|
||||
<filename>hybrid-sleep.target</filename>,
|
||||
<filename>initrd-fs.target</filename>,
|
||||
<filename>kbrequest.target</filename>,
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index 29e3504..e9e42b4 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -362,6 +362,11 @@ static int sysv_translate_facility(const char *name, const char *filename, char
|
||||
"null", NULL,
|
||||
"mail-transport-agent", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
|
||||
"smtp", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
|
||||
+
|
||||
+ /* re-added these for F18 */
|
||||
+ "MTA", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
|
||||
+ "smtpdaemon", SPECIAL_MAIL_TRANSFER_AGENT_TARGET,
|
||||
+ "httpd", SPECIAL_HTTP_DAEMON_TARGET,
|
||||
};
|
||||
|
||||
unsigned i;
|
||||
diff --git a/src/core/special.h b/src/core/special.h
|
||||
index d5a0fe8..570cecc 100644
|
||||
--- a/src/core/special.h
|
||||
+++ b/src/core/special.h
|
||||
@@ -91,6 +91,7 @@
|
||||
* of a kind. .target units can be used to support multiple
|
||||
* implementations that can run side-by-side.
|
||||
*/
|
||||
+#define SPECIAL_HTTP_DAEMON_TARGET "http-daemon.target"
|
||||
|
||||
/* Magic early boot services */
|
||||
#define SPECIAL_FSCK_SERVICE "systemd-fsck@.service"
|
||||
diff --git a/units/http-daemon.target b/units/http-daemon.target
|
||||
new file mode 100644
|
||||
index 0000000..8d018cb
|
||||
--- /dev/null
|
||||
+++ b/units/http-daemon.target
|
||||
@@ -0,0 +1,12 @@
|
||||
+# This file is part of systemd.
|
||||
+#
|
||||
+# systemd is free software; you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU Lesser General Public License as published by
|
||||
+# the Free Software Foundation; either version 2.1 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+# This exists mostly for compatibility with SysV/LSB units, and
|
||||
+# implementations lacking socket/bus activation.
|
||||
+
|
||||
+[Unit]
|
||||
+Description=Web Server
|
|
@ -0,0 +1,23 @@
|
|||
From 926f734836ab0b67e62d55b54e503728da30cee1 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Fri, 11 Jan 2013 23:47:11 +0100
|
||||
Subject: [PATCH] (F18) bring back single.service
|
||||
|
||||
---
|
||||
Makefile.am | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index ce56d05..18b9c4c 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -4011,7 +4011,8 @@ endif
|
||||
SYSTEM_UNIT_ALIASES += \
|
||||
graphical.target default.target \
|
||||
reboot.target ctrl-alt-del.target \
|
||||
- getty@.service autovt@.service
|
||||
+ getty@.service autovt@.service \
|
||||
+ rescue.service single.service
|
||||
|
||||
USER_UNIT_ALIASES += \
|
||||
$(systemunitdir)/shutdown.target shutdown.target \
|
|
@ -0,0 +1,98 @@
|
|||
From 6df56a7905ad44949885c90d97f246a77309112e Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Mon, 28 Jan 2013 14:15:56 +0100
|
||||
Subject: [PATCH] (F18) Revert "udev: network device renaming - immediately
|
||||
give up if the target name isn't available"
|
||||
|
||||
This reverts commit 97595710b77aa162ca5e20da57d0a1ed7355eaad (and fixes
|
||||
it up for printk_kmsg-related changes that came later).
|
||||
|
||||
Many users upgraded from earlier Fedora releases and kept their
|
||||
/etc/udev/rules.d/70-persistent-net.rules with rules renaming interfaces
|
||||
into the ethX namespace. The udev change that made this entirely
|
||||
unsupported was not announced loud enough. For F18 let's re-add the
|
||||
renaming hack.
|
||||
|
||||
Add an annoying message about the need to fix udev rules.
|
||||
|
||||
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=896135
|
||||
---
|
||||
src/udev/udev-event.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++---
|
||||
1 file changed, 51 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
|
||||
index 3db2cb7..4253bbd 100644
|
||||
--- a/src/udev/udev-event.c
|
||||
+++ b/src/udev/udev-event.c
|
||||
@@ -750,7 +750,14 @@ static int rename_netif(struct udev_event *event)
|
||||
struct udev_device *dev = event->dev;
|
||||
int sk;
|
||||
struct ifreq ifr;
|
||||
+ int loop;
|
||||
int err;
|
||||
+ static const char rename_hack_msg_fmt[] =
|
||||
+ "Tried to rename network interface %s, but the target name %s already exists! "
|
||||
+ "The names that udev rules assign to network interfaces must be changed. "
|
||||
+ "Avoid names that collide with kernel created ones. "
|
||||
+ "A workaround will be attempted now, but this WILL BREAK in a future release! "
|
||||
+ "See https://bugs.freedesktop.org/show_bug.cgi?id=56929#c3\n";
|
||||
|
||||
log_debug("changing net interface name from '%s' to '%s'\n",
|
||||
udev_device_get_sysname(dev), event->name);
|
||||
@@ -766,12 +773,53 @@ static int rename_netif(struct udev_event *event)
|
||||
strscpy(ifr.ifr_name, IFNAMSIZ, udev_device_get_sysname(dev));
|
||||
strscpy(ifr.ifr_newname, IFNAMSIZ, event->name);
|
||||
err = ioctl(sk, SIOCSIFNAME, &ifr);
|
||||
- if (err >= 0) {
|
||||
+ if (err == 0) {
|
||||
print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname);
|
||||
- } else {
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* keep trying if the destination interface name already exists */
|
||||
+ err = -errno;
|
||||
+ if (err != -EEXIST)
|
||||
+ goto out;
|
||||
+
|
||||
+ /* F18: scream both into dmesg and journal */
|
||||
+ print_kmsg(rename_hack_msg_fmt, ifr.ifr_name, ifr.ifr_newname);
|
||||
+ log_error (rename_hack_msg_fmt, ifr.ifr_name, ifr.ifr_newname);
|
||||
+
|
||||
+ /* free our own name, another process may wait for us */
|
||||
+ snprintf(ifr.ifr_newname, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev));
|
||||
+ err = ioctl(sk, SIOCSIFNAME, &ifr);
|
||||
+ if (err < 0) {
|
||||
err = -errno;
|
||||
- log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname);
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* log temporary name */
|
||||
+ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname);
|
||||
+
|
||||
+ /* wait a maximum of 90 seconds for our target to become available */
|
||||
+ strscpy(ifr.ifr_name, IFNAMSIZ, ifr.ifr_newname);
|
||||
+ strscpy(ifr.ifr_newname, IFNAMSIZ, event->name);
|
||||
+ loop = 90 * 20;
|
||||
+ while (loop--) {
|
||||
+ const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 };
|
||||
+
|
||||
+ nanosleep(&duration, NULL);
|
||||
+
|
||||
+ err = ioctl(sk, SIOCSIFNAME, &ifr);
|
||||
+ if (err == 0) {
|
||||
+ print_kmsg("renamed network interface %s to %s\n", ifr.ifr_name, ifr.ifr_newname);
|
||||
+ break;
|
||||
+ }
|
||||
+ err = -errno;
|
||||
+ if (err != -EEXIST)
|
||||
+ break;
|
||||
}
|
||||
+
|
||||
+out:
|
||||
+ if (err < 0)
|
||||
+ log_error("error changing net interface name %s to %s: %m\n", ifr.ifr_name, ifr.ifr_newname);
|
||||
close(sk);
|
||||
return err;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
From ad9cc4bca4fc351b38b4b44050e1f8d8408d0f7c Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Tue, 9 Apr 2013 11:27:22 +0200
|
||||
Subject: [PATCH] (F18): explain what happened to 'systemctl dot'
|
||||
|
||||
---
|
||||
src/systemctl/systemctl.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index fd9f580..9a5810d 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -895,6 +895,11 @@ static int list_dependencies(DBusConnection *bus, char **args) {
|
||||
return list_dependencies_one(bus, u, 0, NULL, 0);
|
||||
}
|
||||
|
||||
+static int dot(DBusConnection *bus, char **args) {
|
||||
+ log_info("The 'systemctl dot' command has been removed. Use 'systemd-analyze dot' instead.");
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static int list_jobs(DBusConnection *bus, char **args) {
|
||||
_cleanup_dbus_message_unref_ DBusMessage *reply = NULL;
|
||||
DBusMessageIter iter, sub, sub2;
|
||||
@@ -5202,6 +5207,7 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError
|
||||
{ "status", MORE, 1, show },
|
||||
{ "help", MORE, 2, show },
|
||||
{ "dump", EQUAL, 1, dump },
|
||||
+ { "dot", EQUAL, 1, dot },
|
||||
{ "snapshot", LESS, 2, snapshot },
|
||||
{ "delete", MORE, 2, delete_snapshot },
|
||||
{ "daemon-reload", EQUAL, 1, daemon_reload },
|
|
@ -0,0 +1,23 @@
|
|||
From adedcc48f4871cef702f014a9f2b29e387784468 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Tue, 9 Apr 2013 11:31:07 +0200
|
||||
Subject: [PATCH] (F18): Make predictable net names opt-in instead of opt-out
|
||||
|
||||
Users can simply pass "net.ifnames=1" on the kernel command line.
|
||||
---
|
||||
rules/80-net-name-slot.rules | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rules/80-net-name-slot.rules b/rules/80-net-name-slot.rules
|
||||
index 15b5bc4..c0f66d1 100644
|
||||
--- a/rules/80-net-name-slot.rules
|
||||
+++ b/rules/80-net-name-slot.rules
|
||||
@@ -5,7 +5,7 @@ SUBSYSTEM!="net", GOTO="net_name_slot_end"
|
||||
NAME!="", GOTO="net_name_slot_end"
|
||||
|
||||
IMPORT{cmdline}="net.ifnames"
|
||||
-ENV{net.ifnames}=="0", GOTO="net_name_slot_end"
|
||||
+ENV{net.ifnames}!="1", GOTO="net_name_slot_end"
|
||||
|
||||
NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
|
||||
NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
|
|
@ -0,0 +1,50 @@
|
|||
From dbf6dabeabac8cee73d8b958920996be0bad29dc Mon Sep 17 00:00:00 2001
|
||||
From: Pali Rohar <pali.rohar@gmail.com>
|
||||
Date: Tue, 9 Apr 2013 15:32:22 +0200
|
||||
Subject: [PATCH] keymap: Add HP EliteBook 8460p
|
||||
|
||||
Taken from
|
||||
https://code.launchpad.net/~pali/ubuntu/raring/udev/hp-elitebook-8460p/+merge/157420
|
||||
|
||||
Signed-off-by: Martin Pitt <martinpitt@gnome.org>
|
||||
(cherry picked from commit 72bd03c636b72156e93ea43886b0b54d96446d27)
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
keymaps/hewlett-packard_elitebook-8460p | 3 +++
|
||||
src/udev/keymap/95-keymap.rules | 1 +
|
||||
3 files changed, 5 insertions(+)
|
||||
create mode 100644 keymaps/hewlett-packard_elitebook-8460p
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 18b9c4c..c192cb3 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -2400,6 +2400,7 @@ dist_udevkeymap_DATA = \
|
||||
keymaps/hewlett-packard-tablet \
|
||||
keymaps/hewlett-packard-tx2 \
|
||||
keymaps/hewlett-packard_elitebook-8440p \
|
||||
+ keymaps/hewlett-packard_elitebook-8460p \
|
||||
keymaps/hewlett-packard-hdx9494nr \
|
||||
keymaps/ibm-thinkpad-usb-keyboard-trackpoint \
|
||||
keymaps/inventec-symphony_6.0_7.0 \
|
||||
diff --git a/keymaps/hewlett-packard_elitebook-8460p b/keymaps/hewlett-packard_elitebook-8460p
|
||||
new file mode 100644
|
||||
index 0000000..1fe1b72
|
||||
--- /dev/null
|
||||
+++ b/keymaps/hewlett-packard_elitebook-8460p
|
||||
@@ -0,0 +1,3 @@
|
||||
+0xF8 wlan # Wireless HW switch button
|
||||
+0xB3 prog1 # Fn+F11 - Ambient Light Sensor button
|
||||
+0xB1 prog2 # Fn+ESC - System information button
|
||||
diff --git a/src/udev/keymap/95-keymap.rules b/src/udev/keymap/95-keymap.rules
|
||||
index 4e0ddfc..cc57cb0 100644
|
||||
--- a/src/udev/keymap/95-keymap.rules
|
||||
+++ b/src/udev/keymap/95-keymap.rules
|
||||
@@ -100,6 +100,7 @@ ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*"
|
||||
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www"
|
||||
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill 0xB2 www"
|
||||
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP EliteBook 8440p", RUN+="keymap $name hewlett-packard_elitebook-8440p"
|
||||
+ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP EliteBook 8446p", RUN+="keymap $name hewlett-packard_elitebook-8460p"
|
||||
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HDX9494NR", RUN+="keymap $name hewlett-packard-hdx9494nr"
|
||||
# HP Pavillion dv6315ea has empty DMI_VENDOR
|
||||
ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play
|
|
@ -0,0 +1,23 @@
|
|||
From 3ca3c5bf548528c021d92746c237a72340e2a621 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Pitt <martinpitt@gnome.org>
|
||||
Date: Tue, 9 Apr 2013 15:44:41 +0200
|
||||
Subject: [PATCH] keymap: Fix typo in previous commit (cherry picked from
|
||||
commit c8f5f5e72841d7b21a618507170b973c049f12ef)
|
||||
|
||||
---
|
||||
src/udev/keymap/95-keymap.rules | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/udev/keymap/95-keymap.rules b/src/udev/keymap/95-keymap.rules
|
||||
index cc57cb0..33baa72 100644
|
||||
--- a/src/udev/keymap/95-keymap.rules
|
||||
+++ b/src/udev/keymap/95-keymap.rules
|
||||
@@ -100,7 +100,7 @@ ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*"
|
||||
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP G62 Notebook PC", RUN+="keymap $name 0xB2 www"
|
||||
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP ProBook*", RUN+="keymap $name 0xF8 rfkill 0xB2 www"
|
||||
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP EliteBook 8440p", RUN+="keymap $name hewlett-packard_elitebook-8440p"
|
||||
-ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP EliteBook 8446p", RUN+="keymap $name hewlett-packard_elitebook-8460p"
|
||||
+ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HP EliteBook 8460p", RUN+="keymap $name hewlett-packard_elitebook-8460p"
|
||||
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="HDX9494NR", RUN+="keymap $name hewlett-packard-hdx9494nr"
|
||||
# HP Pavillion dv6315ea has empty DMI_VENDOR
|
||||
ATTR{[dmi/id]board_vendor}=="Quanta", ATTR{[dmi/id]board_name}=="30B7", ATTR{[dmi/id]board_version}=="65.2B", RUN+="keymap $name 0x88 media" # "quick play
|
|
@ -0,0 +1,24 @@
|
|||
From afc0bf73792bb9def4b5ad552b6de7fef8349b8a Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 9 Apr 2013 18:29:24 +0200
|
||||
Subject: [PATCH] shutdown: print a nice message before returning to initrd
|
||||
(cherry picked from commit 30d743f43007ed5a3db1f9a053b6d87c0940adb2)
|
||||
|
||||
---
|
||||
src/core/shutdown.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
|
||||
index 86ea054..2db761d 100644
|
||||
--- a/src/core/shutdown.c
|
||||
+++ b/src/core/shutdown.c
|
||||
@@ -274,6 +274,9 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if (prepare_new_root() >= 0 &&
|
||||
pivot_to_new_root() >= 0) {
|
||||
+
|
||||
+ log_info("Returning to initrd...");
|
||||
+
|
||||
execv("/shutdown", argv);
|
||||
log_error("Failed to execute shutdown binary: %m");
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
From cb8bbba80a0001ea3d82d3a834727d4360e2e5ab Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 9 Apr 2013 19:05:49 +0200
|
||||
Subject: [PATCH] units: fix some left-over mentions of remote-fs-setup.target
|
||||
(cherry picked from commit 8df31a9c980009d8a4e0ca51cc31174efb7e25c9)
|
||||
|
||||
---
|
||||
man/systemd.special.xml | 2 +-
|
||||
units/remote-fs.target | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
|
||||
index 2a1c320..08adbf4 100644
|
||||
--- a/man/systemd.special.xml
|
||||
+++ b/man/systemd.special.xml
|
||||
@@ -966,7 +966,7 @@
|
||||
to be pulled in by the first
|
||||
remote mount showing up it
|
||||
should use
|
||||
- <filename>remote-fs-setup.target</filename>
|
||||
+ <filename>network-online.target</filename>
|
||||
(see above).</para>
|
||||
|
||||
<para>Again, this target unit
|
||||
diff --git a/units/remote-fs.target b/units/remote-fs.target
|
||||
index e867b8d..09213e8 100644
|
||||
--- a/units/remote-fs.target
|
||||
+++ b/units/remote-fs.target
|
||||
@@ -8,7 +8,7 @@
|
||||
[Unit]
|
||||
Description=Remote File Systems
|
||||
Documentation=man:systemd.special(7)
|
||||
-After=remote-fs-pre.target remote-fs-setup.target
|
||||
+After=remote-fs-pre.target
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
|
@ -0,0 +1,46 @@
|
|||
From 74a2502ee5d65be05bfdf8e8f80ea6d58a1f3404 Mon Sep 17 00:00:00 2001
|
||||
From: Fedora systemd team <systemd-maint@redhat.com>
|
||||
Date: Wed, 10 Apr 2013 09:49:24 +0200
|
||||
Subject: [PATCH] logind: avoid creating stale session state files
|
||||
|
||||
There were old session state files accumulating in /run/systemd/session.
|
||||
They confused e.g. "reboot", which thought there were still users logged
|
||||
in. The files got created like this:
|
||||
|
||||
session_stop(Session *s) ->
|
||||
...
|
||||
unlink(s->state_file);
|
||||
...
|
||||
seat_set_active(s->seat, NULL) ->
|
||||
session_save(...); /* re-creates the state file we just
|
||||
unlinked */
|
||||
|
||||
Fix it simply by clearing the s->started flag earlier to prevent
|
||||
any further writes of the state file (session_save() checks the flag).
|
||||
(cherry picked from commit 50fb97935d689a520251b2d543599be14bdfd0ed)
|
||||
---
|
||||
src/login/logind-session.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
|
||||
index 97c24d0..bf8775b 100644
|
||||
--- a/src/login/logind-session.c
|
||||
+++ b/src/login/logind-session.c
|
||||
@@ -710,6 +710,8 @@ int session_stop(Session *s) {
|
||||
if (s->started)
|
||||
session_send_signal(s, false);
|
||||
|
||||
+ s->started = false;
|
||||
+
|
||||
if (s->seat) {
|
||||
if (s->seat->active == s)
|
||||
seat_set_active(s->seat, NULL);
|
||||
@@ -721,8 +723,6 @@ int session_stop(Session *s) {
|
||||
user_send_changed(s->user, "Sessions\0");
|
||||
user_save(s->user);
|
||||
|
||||
- s->started = false;
|
||||
-
|
||||
return r;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From 4ae14051d9c63b35eb9b7bbc660c89ce04234af4 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Thu, 11 Apr 2013 13:37:50 +0200
|
||||
Subject: [PATCH] (F18) main: downgrade message about failure to isolate
|
||||
default target
|
||||
|
||||
dracut in F18 uses basic.target as default.target. It is pointless to
|
||||
log this as error for everyone. Downgrade it to debug.
|
||||
---
|
||||
src/core/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/main.c b/src/core/main.c
|
||||
index 7899761..364f1d1 100644
|
||||
--- a/src/core/main.c
|
||||
+++ b/src/core/main.c
|
||||
@@ -1727,7 +1727,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
r = manager_add_job(m, JOB_START, target, JOB_ISOLATE, false, &error, &default_unit_job);
|
||||
if (r == -EPERM) {
|
||||
- log_error("Default target could not be isolated, starting instead: %s", bus_error(&error, r));
|
||||
+ log_debug("Default target could not be isolated, starting instead: %s", bus_error(&error, r));
|
||||
dbus_error_free(&error);
|
||||
|
||||
r = manager_add_job(m, JOB_START, target, JOB_REPLACE, false, &error, &default_unit_job);
|
|
@ -0,0 +1,165 @@
|
|||
From ddba0d7ae4da28e6f12b140f1a6a3eb2da907cda Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sat, 13 Apr 2013 20:22:53 -0400
|
||||
Subject: [PATCH] fileio: in envfiles, do not skip lines following empty lines
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=63477
|
||||
(cherry picked from commit d3b6d0c21ea5a0d15ec6dbd8b8d179138b7463bc)
|
||||
---
|
||||
src/binfmt/binfmt.c | 2 +-
|
||||
src/journal/catalog.c | 2 +-
|
||||
src/modules-load/modules-load.c | 2 +-
|
||||
src/shared/conf-parser.c | 2 +-
|
||||
src/shared/install.c | 2 +-
|
||||
src/shared/util.h | 2 +-
|
||||
src/sysctl/sysctl.c | 2 +-
|
||||
src/test/test-unit-file.c | 31 +++++++++++++++++++++++++++++++
|
||||
8 files changed, 38 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c
|
||||
index 9ca1e60..5a42b3d 100644
|
||||
--- a/src/binfmt/binfmt.c
|
||||
+++ b/src/binfmt/binfmt.c
|
||||
@@ -110,7 +110,7 @@ static int apply_file(const char *path, bool ignore_enoent) {
|
||||
p = strstrip(l);
|
||||
if (!*p)
|
||||
continue;
|
||||
- if (strchr(COMMENTS, *p))
|
||||
+ if (strchr(COMMENTS "\n", *p))
|
||||
continue;
|
||||
|
||||
k = apply_rule(p);
|
||||
diff --git a/src/journal/catalog.c b/src/journal/catalog.c
|
||||
index ebf0622..7681af6 100644
|
||||
--- a/src/journal/catalog.c
|
||||
+++ b/src/journal/catalog.c
|
||||
@@ -180,7 +180,7 @@ int catalog_import_file(Hashmap *h, struct strbuf *sb, const char *path) {
|
||||
continue;
|
||||
}
|
||||
|
||||
- if (strchr(COMMENTS, line[0]))
|
||||
+ if (strchr(COMMENTS "\n", line[0]))
|
||||
continue;
|
||||
|
||||
if (empty_line &&
|
||||
diff --git a/src/modules-load/modules-load.c b/src/modules-load/modules-load.c
|
||||
index 9ee2603..b3f7af0 100644
|
||||
--- a/src/modules-load/modules-load.c
|
||||
+++ b/src/modules-load/modules-load.c
|
||||
@@ -206,7 +206,7 @@ static int apply_file(struct kmod_ctx *ctx, const char *path, bool ignore_enoent
|
||||
l = strstrip(line);
|
||||
if (!*l)
|
||||
continue;
|
||||
- if (strchr(COMMENTS, *l))
|
||||
+ if (strchr(COMMENTS "\n", *l))
|
||||
continue;
|
||||
|
||||
k = load_module(ctx, l);
|
||||
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
|
||||
index fbacf98..fea2e56 100644
|
||||
--- a/src/shared/conf-parser.c
|
||||
+++ b/src/shared/conf-parser.c
|
||||
@@ -174,7 +174,7 @@ static int parse_line(
|
||||
if (!*l)
|
||||
return 0;
|
||||
|
||||
- if (strchr(COMMENTS, *l))
|
||||
+ if (strchr(COMMENTS "\n", *l))
|
||||
return 0;
|
||||
|
||||
if (startswith(l, ".include ")) {
|
||||
diff --git a/src/shared/install.c b/src/shared/install.c
|
||||
index 9e87039..230f18b 100644
|
||||
--- a/src/shared/install.c
|
||||
+++ b/src/shared/install.c
|
||||
@@ -1699,7 +1699,7 @@ int unit_file_query_preset(UnitFileScope scope, const char *name) {
|
||||
if (!*l)
|
||||
continue;
|
||||
|
||||
- if (strchr(COMMENTS, *l))
|
||||
+ if (strchr(COMMENTS "\n", *l))
|
||||
continue;
|
||||
|
||||
if (first_word(l, "enable")) {
|
||||
diff --git a/src/shared/util.h b/src/shared/util.h
|
||||
index 3885123..d3838e1 100644
|
||||
--- a/src/shared/util.h
|
||||
+++ b/src/shared/util.h
|
||||
@@ -52,7 +52,7 @@ union dirent_storage {
|
||||
#define WHITESPACE " \t\n\r"
|
||||
#define NEWLINE "\n\r"
|
||||
#define QUOTES "\"\'"
|
||||
-#define COMMENTS "#;\n"
|
||||
+#define COMMENTS "#;"
|
||||
|
||||
#define FORMAT_BYTES_MAX 8
|
||||
|
||||
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
|
||||
index e0ba78a..db18dd9 100644
|
||||
--- a/src/sysctl/sysctl.c
|
||||
+++ b/src/sysctl/sysctl.c
|
||||
@@ -149,7 +149,7 @@ static int parse_file(Hashmap *sysctl_options, const char *path, bool ignore_eno
|
||||
if (!*p)
|
||||
continue;
|
||||
|
||||
- if (strchr(COMMENTS, *p))
|
||||
+ if (strchr(COMMENTS "\n", *p))
|
||||
continue;
|
||||
|
||||
value = strchr(p, '=');
|
||||
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
|
||||
index 3cf8463..1bf11e6 100644
|
||||
--- a/src/test/test-unit-file.c
|
||||
+++ b/src/test/test-unit-file.c
|
||||
@@ -199,6 +199,17 @@ static void test_config_parse_exec(void) {
|
||||
"#--nouser-config \\\n" \
|
||||
"normal=line"
|
||||
|
||||
+#define env_file_4 \
|
||||
+ "# Generated\n" \
|
||||
+ "\n" \
|
||||
+ "HWMON_MODULES=\"coretemp f71882fg\"\n" \
|
||||
+ "\n" \
|
||||
+ "# For compatibility reasons\n" \
|
||||
+ "\n" \
|
||||
+ "MODULE_0=coretemp\n" \
|
||||
+ "MODULE_1=f71882fg"
|
||||
+
|
||||
+
|
||||
static void test_load_env_file_1(void) {
|
||||
char _cleanup_strv_free_ **data = NULL;
|
||||
int r;
|
||||
@@ -251,6 +262,25 @@ static void test_load_env_file_3(void) {
|
||||
unlink(name);
|
||||
}
|
||||
|
||||
+static void test_load_env_file_4(void) {
|
||||
+ char _cleanup_strv_free_ **data = NULL;
|
||||
+ int r;
|
||||
+
|
||||
+ char name[] = "/tmp/test-load-env-file.XXXXXX";
|
||||
+ int _cleanup_close_ fd = mkstemp(name);
|
||||
+ assert(fd >= 0);
|
||||
+ assert_se(write(fd, env_file_4, sizeof(env_file_4)) == sizeof(env_file_4));
|
||||
+
|
||||
+ r = load_env_file(name, NULL, &data);
|
||||
+ assert(r == 0);
|
||||
+ assert(streq(data[0], "HWMON_MODULES=coretemp f71882fg"));
|
||||
+ assert(streq(data[1], "MODULE_0=coretemp"));
|
||||
+ assert(streq(data[2], "MODULE_1=f71882fg"));
|
||||
+ assert(data[3] == NULL);
|
||||
+ unlink(name);
|
||||
+}
|
||||
+
|
||||
+
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wnonnull"
|
||||
|
||||
@@ -327,6 +357,7 @@ int main(int argc, char *argv[]) {
|
||||
test_load_env_file_1();
|
||||
test_load_env_file_2();
|
||||
test_load_env_file_3();
|
||||
+ test_load_env_file_4();
|
||||
test_install_printf();
|
||||
|
||||
return 0;
|
|
@ -0,0 +1,53 @@
|
|||
From c2e005019582254480fb29d56cb2b306759590f0 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Mon, 15 Apr 2013 18:07:00 +0200
|
||||
Subject: [PATCH] (F18) ship a dummy syslog.target
|
||||
|
||||
There are buggy unit files which Require syslog.target.
|
||||
For F18 resurrect a syslog.target unit as a workaround.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=951957
|
||||
---
|
||||
Makefile.am | 1 +
|
||||
units/syslog.target | 20 ++++++++++++++++++++
|
||||
2 files changed, 21 insertions(+)
|
||||
create mode 100644 units/syslog.target
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index c192cb3..c7b5a4a 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -397,6 +397,7 @@ dist_systemunit_DATA = \
|
||||
units/quotaon.service \
|
||||
units/systemd-ask-password-wall.path \
|
||||
units/systemd-ask-password-console.path \
|
||||
+ units/syslog.target \
|
||||
units/systemd-udevd-control.socket \
|
||||
units/systemd-udevd-kernel.socket \
|
||||
units/system-update.target \
|
||||
diff --git a/units/syslog.target b/units/syslog.target
|
||||
new file mode 100644
|
||||
index 0000000..96eb155
|
||||
--- /dev/null
|
||||
+++ b/units/syslog.target
|
||||
@@ -0,0 +1,20 @@
|
||||
+# This file is part of systemd.
|
||||
+#
|
||||
+# systemd is free software; you can redistribute it and/or modify it
|
||||
+# under the terms of the GNU Lesser General Public License as published by
|
||||
+# the Free Software Foundation; either version 2.1 of the License, or
|
||||
+# (at your option) any later version.
|
||||
+
|
||||
+# This unit file exists only for compatibility with broken unit files
|
||||
+# that express hard requirement dependencies on syslog.target (i.e.
|
||||
+# invalid usage of a provides-like target).
|
||||
+
|
||||
+[Unit]
|
||||
+Description=Dummy Syslog target for compatibility with broken unit files
|
||||
+Documentation=man:systemd.special(7)
|
||||
+Documentation=http://www.freedesktop.org/wiki/Software/systemd/syslog
|
||||
+
|
||||
+# Avoid that we conflict with shutdown.target, so that we can stay
|
||||
+# until the very end and do not cancel shutdown.target if we should
|
||||
+# happen to be activated very late.
|
||||
+DefaultDependencies=no
|
|
@ -0,0 +1,33 @@
|
|||
From cf1981844284b076bfca34aa7f5e8b577d75fa38 Mon Sep 17 00:00:00 2001
|
||||
From: Mirco Tischler <mt-ml@gmx.de>
|
||||
Date: Sat, 13 Apr 2013 01:03:49 +0200
|
||||
Subject: [PATCH] journal: fix broken tags _SOURCE_REALTIME_TIMESTAMP and
|
||||
_MACHINE_ID (cherry picked from commit
|
||||
d378991747d67fff1d4dc39e7fb2bc8f49f1b561)
|
||||
|
||||
---
|
||||
src/journal/journald-server.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
||||
index 53e3830..be84323 100644
|
||||
--- a/src/journal/journald-server.c
|
||||
+++ b/src/journal/journald-server.c
|
||||
@@ -538,7 +538,7 @@ static void dispatch_message_real(
|
||||
char pid[sizeof("_PID=") + DECIMAL_STR_MAX(ucred->pid)],
|
||||
uid[sizeof("_UID=") + DECIMAL_STR_MAX(ucred->uid)],
|
||||
gid[sizeof("_GID=") + DECIMAL_STR_MAX(ucred->gid)],
|
||||
- source_time[sizeof("_SOURCE_REALTIME_TIMESTAMP=" + DECIMAL_STR_MAX(usec_t))],
|
||||
+ source_time[sizeof("_SOURCE_REALTIME_TIMESTAMP=") + DECIMAL_STR_MAX(usec_t)],
|
||||
boot_id[sizeof("_BOOT_ID=") + 32] = "_BOOT_ID=",
|
||||
machine_id[sizeof("_MACHINE_ID=") + 32] = "_MACHINE_ID=";
|
||||
|
||||
@@ -699,7 +699,7 @@ static void dispatch_message_real(
|
||||
|
||||
r = sd_id128_get_machine(&id);
|
||||
if (r >= 0) {
|
||||
- sd_id128_to_string(id, machine_id + sizeof("_MACHINE_ID") - 1);
|
||||
+ sd_id128_to_string(id, machine_id + sizeof("_MACHINE_ID=") - 1);
|
||||
IOVEC_SET_STRING(iovec[n++], machine_id);
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From d6ef4083085e184026c9a120dc7b75ce319ee401 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Mon, 15 Apr 2013 18:34:53 +0200
|
||||
Subject: [PATCH] do not change console to non-unicode for LANG=C
|
||||
|
||||
If systemd-vconsole-setup was started with LANG=C (no locale.conf), then
|
||||
it would set the console to non-unicode, which is not what we want.
|
||||
(cherry picked from commit fee79e010f1f8ad2bce6b41c67e8ddd4f419ff4b)
|
||||
---
|
||||
src/shared/util.c | 18 +++++++++++++++++-
|
||||
1 file changed, 17 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
||||
index 57943b6..7f633a3 100644
|
||||
--- a/src/shared/util.c
|
||||
+++ b/src/shared/util.c
|
||||
@@ -5402,7 +5402,23 @@ bool is_locale_utf8(void) {
|
||||
goto out;
|
||||
}
|
||||
|
||||
- cached_answer = streq(set, "UTF-8");
|
||||
+ if(streq(set, "UTF-8")) {
|
||||
+ cached_answer = true;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ /* For LC_CTYPE=="C" return true,
|
||||
+ * because CTYPE is effectly unset and
|
||||
+ * everything defaults to UTF-8 nowadays. */
|
||||
+
|
||||
+ set = setlocale(LC_CTYPE, NULL);
|
||||
+ if (!set) {
|
||||
+ cached_answer = true;
|
||||
+ goto out;
|
||||
+ }
|
||||
+
|
||||
+ cached_answer = streq(set, "C");
|
||||
+
|
||||
out:
|
||||
return (bool)cached_answer;
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
From a5179e0936a14cfe43457dca678888bf2bce5634 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Tue, 16 Apr 2013 23:07:14 +0200
|
||||
Subject: [PATCH] journal: fix off-by-one error in native message iovec
|
||||
counting
|
||||
|
||||
Thanks to Cristian Ciupitu for a reproducer.
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=924359
|
||||
(cherry picked from commit f6422def2c10aa0dea1b872d2f187853e61bd015)
|
||||
---
|
||||
src/journal/journald-native.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/journal/journald-native.c b/src/journal/journald-native.c
|
||||
index 9d1f39f..f878dfc 100644
|
||||
--- a/src/journal/journald-native.c
|
||||
+++ b/src/journal/journald-native.c
|
||||
@@ -123,11 +123,12 @@ void server_process_native_message(
|
||||
|
||||
/* A property follows */
|
||||
|
||||
- if (n+N_IOVEC_META_FIELDS >= m) {
|
||||
+ /* n received properties, +1 for _TRANSPORT */
|
||||
+ if (n + 1 + N_IOVEC_META_FIELDS >= m) {
|
||||
struct iovec *c;
|
||||
unsigned u;
|
||||
|
||||
- u = MAX((n+N_IOVEC_META_FIELDS+1) * 2U, 4U);
|
||||
+ u = MAX((n + 1 + N_IOVEC_META_FIELDS) * 2U, 4U);
|
||||
c = realloc(iovec, u * sizeof(struct iovec));
|
||||
if (!c) {
|
||||
log_oom();
|
|
@ -0,0 +1,39 @@
|
|||
From cb5ec34519c5fd6671e4ca17790962ee916ac96e Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 12 Apr 2013 11:56:27 +0200
|
||||
Subject: [PATCH] core/device.c: fix possible segfault
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=63189
|
||||
|
||||
better fail than segfault
|
||||
|
||||
systemd[1]: Failed to load device unit: Invalid argument
|
||||
systemd[1]: Failed to process udev device event: Invalid argument
|
||||
(cherry picked from commit 003ac9d0318ce28e0b29af5440c9f28f884da04c)
|
||||
---
|
||||
src/core/device.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/device.c b/src/core/device.c
|
||||
index fb94868..734d3f3 100644
|
||||
--- a/src/core/device.c
|
||||
+++ b/src/core/device.c
|
||||
@@ -312,6 +312,7 @@ fail:
|
||||
static int device_process_new_device(Manager *m, struct udev_device *dev, bool update_state) {
|
||||
const char *sysfs, *dn;
|
||||
struct udev_list_entry *item = NULL, *first = NULL;
|
||||
+ int r;
|
||||
|
||||
assert(m);
|
||||
|
||||
@@ -319,7 +320,9 @@ static int device_process_new_device(Manager *m, struct udev_device *dev, bool u
|
||||
return -ENOMEM;
|
||||
|
||||
/* Add the main unit named after the sysfs path */
|
||||
- device_update_unit(m, dev, sysfs, true);
|
||||
+ r = device_update_unit(m, dev, sysfs, true);
|
||||
+ if (r < 0)
|
||||
+ return r;
|
||||
|
||||
/* Add an additional unit for the device node */
|
||||
if ((dn = udev_device_get_devnode(dev)))
|
|
@ -0,0 +1,40 @@
|
|||
From e52f3bf8e776454f3caaf92f812a937116a612d2 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
Date: Fri, 3 May 2013 17:08:55 +0200
|
||||
Subject: [PATCH] (F18) sysctl: give files with later names precedence over
|
||||
earlier ones
|
||||
|
||||
This restores the sysctl.d precedence rules of v197.
|
||||
---
|
||||
man/sysctl.d.xml | 2 +-
|
||||
src/sysctl/sysctl.c | 4 +++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml
|
||||
index 759b874..a5868e6 100644
|
||||
--- a/man/sysctl.d.xml
|
||||
+++ b/man/sysctl.d.xml
|
||||
@@ -92,7 +92,7 @@
|
||||
alphabetical order, regardless in which of the
|
||||
directories they reside, to guarantee that a specific
|
||||
configuration file takes precedence over another file
|
||||
- with an alphabetically later name, if both files
|
||||
+ with an alphabetically earlier name, if both files
|
||||
contain the same variable setting.</para>
|
||||
|
||||
<para>If the administrator wants to disable a
|
||||
diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c
|
||||
index db18dd9..2735127 100644
|
||||
--- a/src/sysctl/sysctl.c
|
||||
+++ b/src/sysctl/sysctl.c
|
||||
@@ -306,7 +306,9 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
r = parse_file(sysctl_options, "/etc/sysctl.conf", true);
|
||||
|
||||
- STRV_FOREACH(f, files) {
|
||||
+ /* F18: iterate backwards to preserve v197's behaviour */
|
||||
+ f = files + strv_length(files) - 1;
|
||||
+ STRV_FOREACH_BACKWARDS(f, files) {
|
||||
k = parse_file(sysctl_options, *f, true);
|
||||
if (k < 0 && r == 0)
|
||||
r = k;
|
|
@ -0,0 +1,27 @@
|
|||
From 32b7c187fb1c6bb26576467bbe99bf4ad576354c Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Fri, 12 Apr 2013 09:45:26 +0200
|
||||
Subject: [PATCH] cryptsetup: set the timeout to 0 by default
|
||||
|
||||
cryptsetup itself has no timeout as default from the beginning. So the
|
||||
default timeout has been "0" from the beginning.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=949702
|
||||
(cherry picked from commit 49714341c3f815118f8a51136aa9857bab7144c2)
|
||||
---
|
||||
src/cryptsetup/cryptsetup.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
|
||||
index ae4aa8d..376f748 100644
|
||||
--- a/src/cryptsetup/cryptsetup.c
|
||||
+++ b/src/cryptsetup/cryptsetup.c
|
||||
@@ -44,7 +44,7 @@ static unsigned opt_tries = 0;
|
||||
static bool opt_readonly = false;
|
||||
static bool opt_verify = false;
|
||||
static bool opt_discards = false;
|
||||
-static usec_t opt_timeout = DEFAULT_TIMEOUT_USEC;
|
||||
+static usec_t opt_timeout = 0;
|
||||
|
||||
/* Options Debian's crypttab knows we don't:
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
From c3093ffebfb2d123e7aaddef9b562b39e39427aa Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 18 Apr 2013 02:21:01 +0200
|
||||
Subject: [PATCH] man: document that timeout=0 is the default for entries in
|
||||
crypttab (cherry picked from commit 8b95c916386eff949d5a8abadf82cda09799794f)
|
||||
|
||||
---
|
||||
man/crypttab.xml | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/man/crypttab.xml b/man/crypttab.xml
|
||||
index a94163b..deb577b 100644
|
||||
--- a/man/crypttab.xml
|
||||
+++ b/man/crypttab.xml
|
||||
@@ -219,9 +219,10 @@
|
||||
<listitem><para>Specify the timeout
|
||||
for querying for a password. If no
|
||||
unit is specified seconds is used.
|
||||
- Supported units are s, ms,
|
||||
- us, min, h, d. A timeout of 0 waits
|
||||
- indefinitely.</para></listitem>
|
||||
+ Supported units are s, ms, us, min, h,
|
||||
+ d. A timeout of 0 waits indefinitely
|
||||
+ (which is the
|
||||
+ default).</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
|
@ -0,0 +1,126 @@
|
|||
From 6444a4192d0f40ea94f90a1704d5e1edc8a3623f Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 11 Apr 2013 15:44:33 +0200
|
||||
Subject: [PATCH] cryptsetup-generator: add support for rd.luks.key=
|
||||
|
||||
Also clarify rd.luks.uuid and luks.uuid in the manual.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=905683
|
||||
(cherry picked from commit 951657bd0a5bb32b5f56cc6b91ad2ea4094bdfaf)
|
||||
---
|
||||
man/kernel-command-line.xml | 2 ++
|
||||
man/systemd-cryptsetup-generator.xml | 26 +++++++++++++++++++++++++-
|
||||
src/cryptsetup/cryptsetup-generator.c | 22 +++++++++++++++++++---
|
||||
3 files changed, 46 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/man/kernel-command-line.xml b/man/kernel-command-line.xml
|
||||
index f249798..6d064f6 100644
|
||||
--- a/man/kernel-command-line.xml
|
||||
+++ b/man/kernel-command-line.xml
|
||||
@@ -237,6 +237,8 @@
|
||||
<term><varname>rd.luks.crypttab=</varname></term>
|
||||
<term><varname>luks.uuid=</varname></term>
|
||||
<term><varname>rd.luks.uuid=</varname></term>
|
||||
+ <term><varname>luks.key=</varname></term>
|
||||
+ <term><varname>rd.luks.key=</varname></term>
|
||||
|
||||
<listitem>
|
||||
<para>Configures the LUKS
|
||||
diff --git a/man/systemd-cryptsetup-generator.xml b/man/systemd-cryptsetup-generator.xml
|
||||
index 292e967..7950032 100644
|
||||
--- a/man/systemd-cryptsetup-generator.xml
|
||||
+++ b/man/systemd-cryptsetup-generator.xml
|
||||
@@ -128,7 +128,31 @@
|
||||
(initrd) while
|
||||
<varname>luks.uuid=</varname> is
|
||||
honored by both the main system and
|
||||
- the initrd.</para></listitem>
|
||||
+ the initrd.</para>
|
||||
+ <para>If /etc/crypttab contains entries with
|
||||
+ the same UUID, then the options for this entry
|
||||
+ will be used.</para>
|
||||
+ <para>If /etc/crypttab exists, only those UUID
|
||||
+ specified on the kernel command line
|
||||
+ will be activated in the initrd or the real root.</para>
|
||||
+ </listitem>
|
||||
+ </varlistentry>
|
||||
+ <varlistentry>
|
||||
+ <term><varname>luks.key=</varname></term>
|
||||
+ <term><varname>rd.luks.key=</varname></term>
|
||||
+
|
||||
+ <listitem><para>Takes a password file as argument.</para>
|
||||
+ <para>For those entries specified with
|
||||
+ <varname>rd.luks.uuid=</varname> or <varname>luks.uuid=</varname>,
|
||||
+ the password file will be set to the password file specified by
|
||||
+ <varname>rd.luks.key=</varname> or <varname>luks.key</varname></para>
|
||||
+ <para><varname>rd.luks.key=</varname>
|
||||
+ is honored only by initial RAM disk
|
||||
+ (initrd) while
|
||||
+ <varname>luks.key=</varname> is
|
||||
+ honored by both the main system and
|
||||
+ the initrd.</para>
|
||||
+ </listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
|
||||
index fd2080b..fd634ae 100644
|
||||
--- a/src/cryptsetup/cryptsetup-generator.c
|
||||
+++ b/src/cryptsetup/cryptsetup-generator.c
|
||||
@@ -233,7 +233,7 @@ static int create_disk(
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int parse_proc_cmdline(char ***arg_proc_cmdline_disks) {
|
||||
+static int parse_proc_cmdline(char ***arg_proc_cmdline_disks, char **arg_proc_cmdline_keyfile) {
|
||||
char _cleanup_free_ *line = NULL;
|
||||
char *w = NULL, *state = NULL;
|
||||
int r;
|
||||
@@ -300,6 +300,21 @@ static int parse_proc_cmdline(char ***arg_proc_cmdline_disks) {
|
||||
return log_oom();
|
||||
}
|
||||
|
||||
+ } else if (startswith(word, "luks.key=")) {
|
||||
+ *arg_proc_cmdline_keyfile = strdup(word + 9);
|
||||
+ if (! arg_proc_cmdline_keyfile)
|
||||
+ return log_oom();
|
||||
+
|
||||
+ } else if (startswith(word, "rd.luks.key=")) {
|
||||
+
|
||||
+ if (in_initrd()) {
|
||||
+ if (*arg_proc_cmdline_keyfile)
|
||||
+ free(*arg_proc_cmdline_keyfile);
|
||||
+ *arg_proc_cmdline_keyfile = strdup(word + 12);
|
||||
+ if (!arg_proc_cmdline_keyfile)
|
||||
+ return log_oom();
|
||||
+ }
|
||||
+
|
||||
} else if (startswith(word, "luks.") ||
|
||||
(in_initrd() && startswith(word, "rd.luks."))) {
|
||||
|
||||
@@ -319,6 +334,7 @@ int main(int argc, char *argv[]) {
|
||||
char **i;
|
||||
char _cleanup_strv_free_ **arg_proc_cmdline_disks_done = NULL;
|
||||
char _cleanup_strv_free_ **arg_proc_cmdline_disks = NULL;
|
||||
+ char _cleanup_free_ *arg_proc_cmdline_keyfile = NULL;
|
||||
|
||||
if (argc > 1 && argc != 4) {
|
||||
log_error("This program takes three or no arguments.");
|
||||
@@ -334,7 +350,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
umask(0022);
|
||||
|
||||
- if (parse_proc_cmdline(&arg_proc_cmdline_disks) < 0)
|
||||
+ if (parse_proc_cmdline(&arg_proc_cmdline_disks, &arg_proc_cmdline_keyfile) < 0)
|
||||
return EXIT_FAILURE;
|
||||
|
||||
if (!arg_enabled)
|
||||
@@ -425,7 +441,7 @@ int main(int argc, char *argv[]) {
|
||||
if (!name || !device)
|
||||
return log_oom();
|
||||
|
||||
- if (create_disk(name, device, NULL, "timeout=0") < 0)
|
||||
+ if (create_disk(name, device, arg_proc_cmdline_keyfile, "timeout=0") < 0)
|
||||
r = EXIT_FAILURE;
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
From 82e4f4eec9280a7867e4659f782dc7f0207537ad Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Fri, 19 Apr 2013 13:58:57 +0200
|
||||
Subject: [PATCH] crypt-setup-generator: correctly check return of strdup
|
||||
(cherry picked from commit 5a8e21785907df7466fef5e1cb54ce3bf99e5362)
|
||||
|
||||
---
|
||||
src/cryptsetup/cryptsetup-generator.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
|
||||
index fd634ae..18f4641 100644
|
||||
--- a/src/cryptsetup/cryptsetup-generator.c
|
||||
+++ b/src/cryptsetup/cryptsetup-generator.c
|
||||
@@ -302,7 +302,7 @@ static int parse_proc_cmdline(char ***arg_proc_cmdline_disks, char **arg_proc_cm
|
||||
|
||||
} else if (startswith(word, "luks.key=")) {
|
||||
*arg_proc_cmdline_keyfile = strdup(word + 9);
|
||||
- if (! arg_proc_cmdline_keyfile)
|
||||
+ if (!*arg_proc_cmdline_keyfile)
|
||||
return log_oom();
|
||||
|
||||
} else if (startswith(word, "rd.luks.key=")) {
|
||||
@@ -311,7 +311,7 @@ static int parse_proc_cmdline(char ***arg_proc_cmdline_disks, char **arg_proc_cm
|
||||
if (*arg_proc_cmdline_keyfile)
|
||||
free(*arg_proc_cmdline_keyfile);
|
||||
*arg_proc_cmdline_keyfile = strdup(word + 12);
|
||||
- if (!arg_proc_cmdline_keyfile)
|
||||
+ if (!*arg_proc_cmdline_keyfile)
|
||||
return log_oom();
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
From bc70fcd53738e7b1242e1e5b10a0cb6fd118bfa8 Mon Sep 17 00:00:00 2001
|
||||
From: Lukas Nykryn <lnykryn@redhat.com>
|
||||
Date: Fri, 19 Apr 2013 13:58:58 +0200
|
||||
Subject: [PATCH] logind-dbus: initialize result variable (cherry picked from
|
||||
commit 7f6437976d31fa772ccef9abedd152d6f5372303)
|
||||
|
||||
---
|
||||
src/login/logind-dbus.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
|
||||
index aa212d1..7a38cdb 100644
|
||||
--- a/src/login/logind-dbus.c
|
||||
+++ b/src/login/logind-dbus.c
|
||||
@@ -1117,7 +1117,7 @@ static int bus_manager_can_shutdown_or_sleep(
|
||||
DBusMessage **_reply) {
|
||||
|
||||
bool multiple_sessions, challenge, blocked, b;
|
||||
- const char *result;
|
||||
+ const char *result = NULL;
|
||||
_cleanup_dbus_message_unref_ DBusMessage *reply = NULL;
|
||||
int r;
|
||||
unsigned long ul;
|
|
@ -0,0 +1,34 @@
|
|||
From 95b26286428a066a8c3f6c817c840dfa8ada4db5 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Reisner <dreisner@archlinux.org>
|
||||
Date: Fri, 19 Apr 2013 16:31:25 -0400
|
||||
Subject: [PATCH] nss-myhostname: ensure that glibc's assert is used (cherry
|
||||
picked from commit 1e335af70f29d1a1e9c132338aa35b8971934441)
|
||||
|
||||
---
|
||||
src/nss-myhostname/nss-myhostname.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c
|
||||
index b0fb832..5c3602d 100644
|
||||
--- a/src/nss-myhostname/nss-myhostname.c
|
||||
+++ b/src/nss-myhostname/nss-myhostname.c
|
||||
@@ -25,7 +25,6 @@
|
||||
#include <netdb.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
-#include <assert.h>
|
||||
#include <unistd.h>
|
||||
#include <net/if.h>
|
||||
#include <stdlib.h>
|
||||
@@ -33,6 +32,11 @@
|
||||
|
||||
#include "ifconf.h"
|
||||
|
||||
+/* Ensure that glibc's assert is used. We cannot use assert from macro.h, as
|
||||
+ * libnss_myhostname will be linked into arbitrary programs which will, in turn
|
||||
+ * attempt to write to the journal via log_dispatch() */
|
||||
+#include <assert.h>
|
||||
+
|
||||
/* We use 127.0.0.2 as IPv4 address. This has the advantage over
|
||||
* 127.0.0.1 that it can be translated back to the local hostname. For
|
||||
* IPv6 we use ::1 which unfortunately will not translate back to the
|
|
@ -0,0 +1,24 @@
|
|||
From ae7b225ce71462681825308c046a342a3b45d77e Mon Sep 17 00:00:00 2001
|
||||
From: Evangelos Foutras <evangelos@foutrelis.com>
|
||||
Date: Sat, 20 Apr 2013 00:17:08 +0300
|
||||
Subject: [PATCH] build-sys: prevent library underlinking
|
||||
|
||||
Underlinking can cause subtle bugs like the recent issue with
|
||||
libnss_myhostname (which was fixed in commit 1e335af7).
|
||||
(cherry picked from commit 9d2d0fe1e3f28a639c26b62391f79cfd1450d91b)
|
||||
---
|
||||
configure.ac | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 5820b30..79a6720 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -144,6 +144,7 @@ AC_SUBST([OUR_CPPFLAGS], $with_cppflags)
|
||||
|
||||
CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
|
||||
-Wl,--as-needed \
|
||||
+ -Wl,--no-undefined \
|
||||
-Wl,--gc-sections \
|
||||
-Wl,-z,relro \
|
||||
-Wl,-z,now])
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,630 @@
|
|||
From cdfddefd1faeb3439a42aaf12ffa3def7260a7cc Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
Date: Sat, 20 Apr 2013 18:41:57 +0200
|
||||
Subject: [PATCH] hwdb: update (cherry picked from commit
|
||||
de7a659c055f613efd77b6d54b8491b0f3fd50f1)
|
||||
|
||||
---
|
||||
hwdb/20-OUI.hwdb | 121 +++++++++++++++++++++++++++++++++++++-----
|
||||
hwdb/20-pci-vendor-model.hwdb | 69 ++++++++++++++----------
|
||||
2 files changed, 149 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/hwdb/20-OUI.hwdb b/hwdb/20-OUI.hwdb
|
||||
index 1fc88fa..afdc9e4 100644
|
||||
--- a/hwdb/20-OUI.hwdb
|
||||
+++ b/hwdb/20-OUI.hwdb
|
||||
@@ -1730,7 +1730,7 @@ OUI:0050C2248*
|
||||
ID_OUI_FROM_DATABASE=Dixtal Biomedica Ind. Com. Ltda.
|
||||
|
||||
OUI:0050C2249*
|
||||
- ID_OUI_FROM_DATABASE=Dipl.-Ing. W. Bender GmbH & Co. KG
|
||||
+ ID_OUI_FROM_DATABASE=Bender GmbH & Co. KG
|
||||
|
||||
OUI:0050C224A*
|
||||
ID_OUI_FROM_DATABASE=CDS Rail
|
||||
@@ -2351,7 +2351,7 @@ OUI:0050C2319*
|
||||
ID_OUI_FROM_DATABASE=Invatron Systems Corp.
|
||||
|
||||
OUI:0050C231A*
|
||||
- ID_OUI_FROM_DATABASE=IN-SNEC ZODIAC
|
||||
+ ID_OUI_FROM_DATABASE=Zodiak Data Systems
|
||||
|
||||
OUI:0050C231B*
|
||||
ID_OUI_FROM_DATABASE=Datacon
|
||||
@@ -10859,7 +10859,7 @@ OUI:0050C2E3E*
|
||||
ID_OUI_FROM_DATABASE=Monnit Corp.
|
||||
|
||||
OUI:0050C2E3F*
|
||||
- ID_OUI_FROM_DATABASE=VISITO S.R.L. IT10346660011
|
||||
+ ID_OUI_FROM_DATABASE=VISITO S.R.L.
|
||||
|
||||
OUI:0050C2E40*
|
||||
ID_OUI_FROM_DATABASE=Ecrin Systems
|
||||
@@ -12844,6 +12844,24 @@ OUI:40D8550D7*
|
||||
OUI:40D8550D8*
|
||||
ID_OUI_FROM_DATABASE=NEXT! s.c. S.Piela B.Dryja
|
||||
|
||||
+OUI:40D8550D9*
|
||||
+ ID_OUI_FROM_DATABASE=YUKO ELECTRIC CO.,LTD
|
||||
+
|
||||
+OUI:40D8550DA*
|
||||
+ ID_OUI_FROM_DATABASE=Devialet SA
|
||||
+
|
||||
+OUI:40D8550DB*
|
||||
+ ID_OUI_FROM_DATABASE=Top Connect OU
|
||||
+
|
||||
+OUI:40D8550DC*
|
||||
+ ID_OUI_FROM_DATABASE=NVS Technologies Inc
|
||||
+
|
||||
+OUI:40D8550DD*
|
||||
+ ID_OUI_FROM_DATABASE=Embed Limited
|
||||
+
|
||||
+OUI:40D8550DE*
|
||||
+ ID_OUI_FROM_DATABASE=Vishay Nobel AB
|
||||
+
|
||||
OUI:000000*
|
||||
ID_OUI_FROM_DATABASE=XEROX CORPORATION
|
||||
|
||||
@@ -14354,7 +14372,7 @@ OUI:0001F7*
|
||||
ID_OUI_FROM_DATABASE=Image Display Systems, Inc.
|
||||
|
||||
OUI:0001F8*
|
||||
- ID_OUI_FROM_DATABASE=Adherent Systems, Ltd.
|
||||
+ ID_OUI_FROM_DATABASE=Texio Technology Corporation
|
||||
|
||||
OUI:0001F9*
|
||||
ID_OUI_FROM_DATABASE=TeraGlobal Communications Corp.
|
||||
@@ -17318,7 +17336,7 @@ OUI:0005D5*
|
||||
ID_OUI_FROM_DATABASE=Speedcom Wireless
|
||||
|
||||
OUI:0005D6*
|
||||
- ID_OUI_FROM_DATABASE=Titan Wireless
|
||||
+ ID_OUI_FROM_DATABASE=L-3 Linkabit
|
||||
|
||||
OUI:0005D7*
|
||||
ID_OUI_FROM_DATABASE=Vista Imaging, Inc.
|
||||
@@ -21563,7 +21581,7 @@ OUI:000B79*
|
||||
ID_OUI_FROM_DATABASE=X-COM, Inc.
|
||||
|
||||
OUI:000B7A*
|
||||
- ID_OUI_FROM_DATABASE=Wave Science Inc.
|
||||
+ ID_OUI_FROM_DATABASE=L-3 Linkabit
|
||||
|
||||
OUI:000B7B*
|
||||
ID_OUI_FROM_DATABASE=Test-Um Inc.
|
||||
@@ -23147,7 +23165,7 @@ OUI:000D8C*
|
||||
ID_OUI_FROM_DATABASE=Shanghai Wedone Digital Ltd. CO.
|
||||
|
||||
OUI:000D8D*
|
||||
- ID_OUI_FROM_DATABASE=ProLinx Communication Gateways, Inc.
|
||||
+ ID_OUI_FROM_DATABASE=Prosoft Technology, Inc
|
||||
|
||||
OUI:000D8E*
|
||||
ID_OUI_FROM_DATABASE=Koden Electronics Co., Ltd.
|
||||
@@ -23912,7 +23930,7 @@ OUI:000E91*
|
||||
ID_OUI_FROM_DATABASE=Navico Auckland Ltd
|
||||
|
||||
OUI:000E92*
|
||||
- ID_OUI_FROM_DATABASE=Millinet Co., Ltd.
|
||||
+ ID_OUI_FROM_DATABASE=Open Telecom
|
||||
|
||||
OUI:000E93*
|
||||
ID_OUI_FROM_DATABASE=Milénio 3 Sistemas Electrónicos, Lda.
|
||||
@@ -24515,7 +24533,7 @@ OUI:000F5C*
|
||||
ID_OUI_FROM_DATABASE=Day One Digital Media Limited
|
||||
|
||||
OUI:000F5D*
|
||||
- ID_OUI_FROM_DATABASE=PacketFront Network Products AB
|
||||
+ ID_OUI_FROM_DATABASE=Genexis BV
|
||||
|
||||
OUI:000F5E*
|
||||
ID_OUI_FROM_DATABASE=Veo
|
||||
@@ -24680,7 +24698,7 @@ OUI:000F93*
|
||||
ID_OUI_FROM_DATABASE=Landis+Gyr Ltd.
|
||||
|
||||
OUI:000F94*
|
||||
- ID_OUI_FROM_DATABASE=Genexis
|
||||
+ ID_OUI_FROM_DATABASE=Genexis BV
|
||||
|
||||
OUI:000F95*
|
||||
ID_OUI_FROM_DATABASE=ELECOM Co.,LTD Laneed Division
|
||||
@@ -28508,7 +28526,7 @@ OUI:001490*
|
||||
ID_OUI_FROM_DATABASE=ASP Corporation
|
||||
|
||||
OUI:001491*
|
||||
- ID_OUI_FROM_DATABASE=Daniels Electronics Ltd.
|
||||
+ ID_OUI_FROM_DATABASE=Daniels Electronics Ltd. dbo Codan Rado Communications
|
||||
|
||||
OUI:001492*
|
||||
ID_OUI_FROM_DATABASE=Liteon, Mobile Media Solution SBU
|
||||
@@ -43010,7 +43028,7 @@ OUI:003061*
|
||||
ID_OUI_FROM_DATABASE=MobyTEL
|
||||
|
||||
OUI:003062*
|
||||
- ID_OUI_FROM_DATABASE=PATH 1 NETWORK TECHNOL'S INC.
|
||||
+ ID_OUI_FROM_DATABASE=IP Video Networks Inc
|
||||
|
||||
OUI:003063*
|
||||
ID_OUI_FROM_DATABASE=SANTERA SYSTEMS, INC.
|
||||
@@ -45832,6 +45850,9 @@ OUI:0070B0*
|
||||
OUI:0070B3*
|
||||
ID_OUI_FROM_DATABASE=DATA RECALL LTD.
|
||||
|
||||
+OUI:0075E1*
|
||||
+ ID_OUI_FROM_DATABASE=Ampt, LLC
|
||||
+
|
||||
OUI:00789E*
|
||||
ID_OUI_FROM_DATABASE=SAGEMCOM
|
||||
|
||||
@@ -46526,7 +46547,7 @@ OUI:0080E4*
|
||||
ID_OUI_FROM_DATABASE=NORTHWEST DIGITAL SYSTEMS, INC
|
||||
|
||||
OUI:0080E5*
|
||||
- ID_OUI_FROM_DATABASE=LSI Logic Corporation
|
||||
+ ID_OUI_FROM_DATABASE=NetApp, Inc
|
||||
|
||||
OUI:0080E6*
|
||||
ID_OUI_FROM_DATABASE=PEER NETWORKS, INC.
|
||||
@@ -47291,7 +47312,7 @@ OUI:0090DC*
|
||||
ID_OUI_FROM_DATABASE=TECO INFORMATION SYSTEMS
|
||||
|
||||
OUI:0090DD*
|
||||
- ID_OUI_FROM_DATABASE=THE MIHARU COMMUNICATIONS CO., LTD.
|
||||
+ ID_OUI_FROM_DATABASE=MIHARU COMMUNICATIONS Inc
|
||||
|
||||
OUI:0090DE*
|
||||
ID_OUI_FROM_DATABASE=CARDKEY SYSTEMS, INC.
|
||||
@@ -51979,6 +52000,9 @@ OUI:0CEEE6*
|
||||
OUI:0CEF7C*
|
||||
ID_OUI_FROM_DATABASE=AnaCom Inc
|
||||
|
||||
+OUI:0CF019*
|
||||
+ ID_OUI_FROM_DATABASE=Malgn Technology Co., Ltd.
|
||||
+
|
||||
OUI:0CF0B4*
|
||||
ID_OUI_FROM_DATABASE=Globalsat International Technology Ltd
|
||||
|
||||
@@ -52150,6 +52174,9 @@ OUI:1077B1*
|
||||
OUI:1078D2*
|
||||
ID_OUI_FROM_DATABASE=ELITEGROUP COMPUTER SYSTEM CO., LTD.
|
||||
|
||||
+OUI:107A86*
|
||||
+ ID_OUI_FROM_DATABASE=U&U ENGINEERING INC.
|
||||
+
|
||||
OUI:1083D2*
|
||||
ID_OUI_FROM_DATABASE=Microseven Systems, LLC
|
||||
|
||||
@@ -54142,12 +54169,18 @@ OUI:34A183*
|
||||
OUI:34A55D*
|
||||
ID_OUI_FROM_DATABASE=TECHNOSOFT INTERNATIONAL SRL
|
||||
|
||||
+OUI:34A68C*
|
||||
+ ID_OUI_FROM_DATABASE=Shine Profit Development Limited
|
||||
+
|
||||
OUI:34A709*
|
||||
ID_OUI_FROM_DATABASE=Trevil srl
|
||||
|
||||
OUI:34A7BA*
|
||||
ID_OUI_FROM_DATABASE=Fischer International Systems Corporation
|
||||
|
||||
+OUI:34A843*
|
||||
+ ID_OUI_FROM_DATABASE=KYOCERA Display Corporation
|
||||
+
|
||||
OUI:34A84E*
|
||||
ID_OUI_FROM_DATABASE=Cisco
|
||||
|
||||
@@ -54595,6 +54628,9 @@ OUI:3C94D5*
|
||||
OUI:3C970E*
|
||||
ID_OUI_FROM_DATABASE=Wistron InfoComm(Kunshan)Co.,Ltd.
|
||||
|
||||
+OUI:3C977E*
|
||||
+ ID_OUI_FROM_DATABASE=IPS Technology Limited
|
||||
+
|
||||
OUI:3C98BF*
|
||||
ID_OUI_FROM_DATABASE=Quest Controls, Inc.
|
||||
|
||||
@@ -54892,6 +54928,9 @@ OUI:40BC73*
|
||||
OUI:40BC8B*
|
||||
ID_OUI_FROM_DATABASE=itelio GmbH
|
||||
|
||||
+OUI:40BD9E*
|
||||
+ ID_OUI_FROM_DATABASE=Physio-Control, Inc
|
||||
+
|
||||
OUI:40BF17*
|
||||
ID_OUI_FROM_DATABASE=Digistar Telecom. SA
|
||||
|
||||
@@ -56050,6 +56089,9 @@ OUI:587521*
|
||||
OUI:587675*
|
||||
ID_OUI_FROM_DATABASE=Beijing ECHO Technologies Co.,Ltd
|
||||
|
||||
+OUI:587A4D*
|
||||
+ ID_OUI_FROM_DATABASE=Stonesoft Corporation
|
||||
+
|
||||
OUI:587FC8*
|
||||
ID_OUI_FROM_DATABASE=S2M
|
||||
|
||||
@@ -56155,6 +56197,9 @@ OUI:58ECE1*
|
||||
OUI:58EECE*
|
||||
ID_OUI_FROM_DATABASE=Icon Time Systems
|
||||
|
||||
+OUI:58F387*
|
||||
+ ID_OUI_FROM_DATABASE=HCCP
|
||||
+
|
||||
OUI:58F67B*
|
||||
ID_OUI_FROM_DATABASE=Xia Men UnionCore Technology LTD.
|
||||
|
||||
@@ -56962,6 +57007,9 @@ OUI:680927*
|
||||
OUI:68122D*
|
||||
ID_OUI_FROM_DATABASE=Special Instrument Development Co., Ltd.
|
||||
|
||||
+OUI:681590*
|
||||
+ ID_OUI_FROM_DATABASE=SAGEMCOM SAS
|
||||
+
|
||||
OUI:6815D3*
|
||||
ID_OUI_FROM_DATABASE=Zaklady Elektroniki i Mechaniki Precyzyjnej R&G S.A.
|
||||
|
||||
@@ -57247,6 +57295,9 @@ OUI:6C416A*
|
||||
OUI:6C504D*
|
||||
ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
|
||||
|
||||
+OUI:6C5779*
|
||||
+ ID_OUI_FROM_DATABASE=Aclima, Inc.
|
||||
+
|
||||
OUI:6C5A34*
|
||||
ID_OUI_FROM_DATABASE=Shenzhen Haitianxiong Electronic Co., Ltd.
|
||||
|
||||
@@ -60052,6 +60103,9 @@ OUI:9C4E36*
|
||||
OUI:9C4E8E*
|
||||
ID_OUI_FROM_DATABASE=ALT Systems Ltd
|
||||
|
||||
+OUI:9C4EBF*
|
||||
+ ID_OUI_FROM_DATABASE=BoxCast
|
||||
+
|
||||
OUI:9C53CD*
|
||||
ID_OUI_FROM_DATABASE=ENGICAM s.r.l.
|
||||
|
||||
@@ -60721,6 +60775,9 @@ OUI:A4F3C1*
|
||||
OUI:A4F7D0*
|
||||
ID_OUI_FROM_DATABASE=LAN Accessories Co., Ltd.
|
||||
|
||||
+OUI:A4FB8D*
|
||||
+ ID_OUI_FROM_DATABASE=Hangzhou Dunchong Technology Co.Ltd
|
||||
+
|
||||
OUI:A4FCCE*
|
||||
ID_OUI_FROM_DATABASE=Security Expert Ltd.
|
||||
|
||||
@@ -61276,6 +61333,9 @@ OUI:B075D5*
|
||||
OUI:B077AC*
|
||||
ID_OUI_FROM_DATABASE=Motorola Mobility, Inc.
|
||||
|
||||
+OUI:B0793C*
|
||||
+ ID_OUI_FROM_DATABASE=Revolv Inc
|
||||
+
|
||||
OUI:B07994*
|
||||
ID_OUI_FROM_DATABASE=Motorola Mobility LLC
|
||||
|
||||
@@ -62182,6 +62242,9 @@ OUI:C038F9*
|
||||
OUI:C03B8F*
|
||||
ID_OUI_FROM_DATABASE=Minicom Digital Signage
|
||||
|
||||
+OUI:C03E0F*
|
||||
+ ID_OUI_FROM_DATABASE=BSkyB Ltd
|
||||
+
|
||||
OUI:C03F0E*
|
||||
ID_OUI_FROM_DATABASE=NETGEAR
|
||||
|
||||
@@ -62320,6 +62383,9 @@ OUI:C0D044*
|
||||
OUI:C0D962*
|
||||
ID_OUI_FROM_DATABASE=Askey Computer Corp.
|
||||
|
||||
+OUI:C0DA74*
|
||||
+ ID_OUI_FROM_DATABASE=Hangzhou Sunyard Technology Co., Ltd.
|
||||
+
|
||||
OUI:C0DF77*
|
||||
ID_OUI_FROM_DATABASE=Conrad Electronic SE
|
||||
|
||||
@@ -63034,6 +63100,9 @@ OUI:CCCD64*
|
||||
OUI:CCCE40*
|
||||
ID_OUI_FROM_DATABASE=Janteq Corp
|
||||
|
||||
+OUI:CCD29B*
|
||||
+ ID_OUI_FROM_DATABASE=Shenzhen Bopengfa Elec&Technology CO.,Ltd
|
||||
+
|
||||
OUI:CCD539*
|
||||
ID_OUI_FROM_DATABASE=Cisco
|
||||
|
||||
@@ -63424,6 +63493,9 @@ OUI:D466A8*
|
||||
OUI:D467E7*
|
||||
ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Tech.Co.,Ltd.
|
||||
|
||||
+OUI:D46A91*
|
||||
+ ID_OUI_FROM_DATABASE=Snap AV
|
||||
+
|
||||
OUI:D46CBF*
|
||||
ID_OUI_FROM_DATABASE=Goodrich ISR
|
||||
|
||||
@@ -63742,6 +63814,9 @@ OUI:D8AFF1*
|
||||
OUI:D8B02E*
|
||||
ID_OUI_FROM_DATABASE=Guangzhou Zonerich Business Machine Co., Ltd
|
||||
|
||||
+OUI:D8B04C*
|
||||
+ ID_OUI_FROM_DATABASE=Jinan USR IOT Technology Co., Ltd.
|
||||
+
|
||||
OUI:D8B12A*
|
||||
ID_OUI_FROM_DATABASE=Panasonic Mobile Communications Co., Ltd.
|
||||
|
||||
@@ -63790,6 +63865,9 @@ OUI:D8D5B9*
|
||||
OUI:D8D67E*
|
||||
ID_OUI_FROM_DATABASE=GSK CNC EQUIPMENT CO.,LTD
|
||||
|
||||
+OUI:D8DA52*
|
||||
+ ID_OUI_FROM_DATABASE=APATOR S.A.
|
||||
+
|
||||
OUI:D8DCE9*
|
||||
ID_OUI_FROM_DATABASE=Kunshan Erlab ductless filtration system Co.,Ltd
|
||||
|
||||
@@ -64558,6 +64636,9 @@ OUI:E84E06*
|
||||
OUI:E84ECE*
|
||||
ID_OUI_FROM_DATABASE=Nintendo Co., Ltd.
|
||||
|
||||
+OUI:E8519D*
|
||||
+ ID_OUI_FROM_DATABASE=Yeonhab Precision Co.,LTD
|
||||
+
|
||||
OUI:E85484*
|
||||
ID_OUI_FROM_DATABASE=NEO INFORMATION SYSTEMS CO., LTD.
|
||||
|
||||
@@ -64612,6 +64693,9 @@ OUI:E88D28*
|
||||
OUI:E88DF5*
|
||||
ID_OUI_FROM_DATABASE=ZNYX Networks, Inc.
|
||||
|
||||
+OUI:E89218*
|
||||
+ ID_OUI_FROM_DATABASE=Arcontia International AB
|
||||
+
|
||||
OUI:E892A4*
|
||||
ID_OUI_FROM_DATABASE=LG Electronics
|
||||
|
||||
@@ -64960,6 +65044,9 @@ OUI:F0219D*
|
||||
OUI:F02329*
|
||||
ID_OUI_FROM_DATABASE=SHOWA DENKI CO.,LTD.
|
||||
|
||||
+OUI:F02405*
|
||||
+ ID_OUI_FROM_DATABASE=OPUS High Technology Corporation
|
||||
+
|
||||
OUI:F02408*
|
||||
ID_OUI_FROM_DATABASE=Talaris (Sweden) AB
|
||||
|
||||
@@ -64969,6 +65056,9 @@ OUI:F02572*
|
||||
OUI:F0264C*
|
||||
ID_OUI_FROM_DATABASE=Dr. Sigrist AG
|
||||
|
||||
+OUI:F02765*
|
||||
+ ID_OUI_FROM_DATABASE=Murata Manufactuaring Co.,Ltd.
|
||||
+
|
||||
OUI:F02929*
|
||||
ID_OUI_FROM_DATABASE=Cisco
|
||||
|
||||
@@ -65449,6 +65539,9 @@ OUI:F83376*
|
||||
OUI:F83553*
|
||||
ID_OUI_FROM_DATABASE=Magenta Research Ltd.
|
||||
|
||||
+OUI:F835DD*
|
||||
+ ID_OUI_FROM_DATABASE=Gemtek Technology Co., Ltd.
|
||||
+
|
||||
OUI:F83DFF*
|
||||
ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
|
||||
|
||||
diff --git a/hwdb/20-pci-vendor-model.hwdb b/hwdb/20-pci-vendor-model.hwdb
|
||||
index fafa324..a46426f 100644
|
||||
--- a/hwdb/20-pci-vendor-model.hwdb
|
||||
+++ b/hwdb/20-pci-vendor-model.hwdb
|
||||
@@ -1590,7 +1590,7 @@ pci:v00001001d00009100*
|
||||
ID_MODEL_FROM_DATABASE=INI-9100/9100W SCSI Host
|
||||
|
||||
pci:v00001002*
|
||||
- ID_VENDOR_FROM_DATABASE=Advanced Micro Devices [AMD] nee ATI
|
||||
+ ID_VENDOR_FROM_DATABASE=AMD/ATI [Advanced Micro Devices, Inc.]
|
||||
|
||||
pci:v00001002d00001304*
|
||||
ID_MODEL_FROM_DATABASE=Kaveri
|
||||
@@ -2808,7 +2808,7 @@ pci:v00001002d00004C46sv00001028sd000000B1*
|
||||
ID_MODEL_FROM_DATABASE=Latitude C600
|
||||
|
||||
pci:v00001002d00004C47*
|
||||
- ID_MODEL_FROM_DATABASE=3D Rage IIC PCI/Mobility Radeon 7500/7500C
|
||||
+ ID_MODEL_FROM_DATABASE=3D Rage IIC PCI / Mobility Radeon 7500/7500C
|
||||
|
||||
pci:v00001002d00004C49*
|
||||
ID_MODEL_FROM_DATABASE=3D Rage LT PRO PCI
|
||||
@@ -4083,10 +4083,10 @@ pci:v00001002d00006603*
|
||||
ID_MODEL_FROM_DATABASE=Mars
|
||||
|
||||
pci:v00001002d00006606*
|
||||
- ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8790M]
|
||||
+ ID_MODEL_FROM_DATABASE=Mars XTX [Radeon HD 8790M]
|
||||
|
||||
pci:v00001002d00006607*
|
||||
- ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8530M]
|
||||
+ ID_MODEL_FROM_DATABASE=Mars LE [Radeon HD 8530M]
|
||||
|
||||
pci:v00001002d00006610*
|
||||
ID_MODEL_FROM_DATABASE=Oland [Radeon HD 8600 Series]
|
||||
@@ -4101,7 +4101,7 @@ pci:v00001002d00006620*
|
||||
ID_MODEL_FROM_DATABASE=Mars
|
||||
|
||||
pci:v00001002d00006621*
|
||||
- ID_MODEL_FROM_DATABASE=Mars
|
||||
+ ID_MODEL_FROM_DATABASE=Mars PRO
|
||||
|
||||
pci:v00001002d00006623*
|
||||
ID_MODEL_FROM_DATABASE=Mars
|
||||
@@ -4110,10 +4110,10 @@ pci:v00001002d00006631*
|
||||
ID_MODEL_FROM_DATABASE=Oland
|
||||
|
||||
pci:v00001002d00006640*
|
||||
- ID_MODEL_FROM_DATABASE=Saturn
|
||||
+ ID_MODEL_FROM_DATABASE=Saturn XT
|
||||
|
||||
pci:v00001002d00006641*
|
||||
- ID_MODEL_FROM_DATABASE=Saturn
|
||||
+ ID_MODEL_FROM_DATABASE=Saturn PRO
|
||||
|
||||
pci:v00001002d00006649*
|
||||
ID_MODEL_FROM_DATABASE=Bonaire
|
||||
@@ -4134,13 +4134,19 @@ pci:v00001002d0000665Csv00001787sd00002329*
|
||||
ID_MODEL_FROM_DATABASE=Radeon HD 7790 TurboDuo
|
||||
|
||||
pci:v00001002d00006660*
|
||||
- ID_MODEL_FROM_DATABASE=Sun [Radeon HD 8600M Series]
|
||||
+ ID_MODEL_FROM_DATABASE=Sun XT [Radeon HD 8600M Series]
|
||||
+
|
||||
+pci:v00001002d00006663*
|
||||
+ ID_MODEL_FROM_DATABASE=Sun PRO [Radeon HD 8500M Series]
|
||||
|
||||
pci:v00001002d00006667*
|
||||
ID_MODEL_FROM_DATABASE=Sun
|
||||
|
||||
pci:v00001002d0000666F*
|
||||
- ID_MODEL_FROM_DATABASE=Sun
|
||||
+ ID_MODEL_FROM_DATABASE=Sun LE
|
||||
+
|
||||
+pci:v00001002d00006670*
|
||||
+ ID_MODEL_FROM_DATABASE=Hainan
|
||||
|
||||
pci:v00001002d00006704*
|
||||
ID_MODEL_FROM_DATABASE=Cayman PRO GL [FirePro V7900]
|
||||
@@ -4253,15 +4259,6 @@ pci:v00001002d00006742sv00008086sd00002111*
|
||||
pci:v00001002d00006743*
|
||||
ID_MODEL_FROM_DATABASE=Whistler [Radeon E6760]
|
||||
|
||||
-pci:v00001002d00006746*
|
||||
- ID_MODEL_FROM_DATABASE=Turks GL [ATI FirePro V (FireGL V) Graphics Adapter]
|
||||
-
|
||||
-pci:v00001002d00006747*
|
||||
- ID_MODEL_FROM_DATABASE=Turks GL [ATI FirePro V (FireGL V) Graphics Adapter]
|
||||
-
|
||||
-pci:v00001002d00006748*
|
||||
- ID_MODEL_FROM_DATABASE=Turks GL [ATI FirePro V (FireGL V) Graphics Adapter]
|
||||
-
|
||||
pci:v00001002d00006749*
|
||||
ID_MODEL_FROM_DATABASE=Turks GL [FirePro V4900]
|
||||
|
||||
@@ -4319,9 +4316,6 @@ pci:v00001002d00006760sv00001043sd000084A0*
|
||||
pci:v00001002d00006761*
|
||||
ID_MODEL_FROM_DATABASE=Seymour LP [Radeon HD 6430M]
|
||||
|
||||
-pci:v00001002d00006762*
|
||||
- ID_MODEL_FROM_DATABASE=Caicos GL [ATI FirePro V (FireGL V) Graphics Adapter]
|
||||
-
|
||||
pci:v00001002d00006763*
|
||||
ID_MODEL_FROM_DATABASE=Seymour [Radeon E6460]
|
||||
|
||||
@@ -4473,7 +4467,7 @@ pci:v00001002d0000679Asv00001462sd00003000*
|
||||
ID_MODEL_FROM_DATABASE=Radeon HD 8950 OEM
|
||||
|
||||
pci:v00001002d0000679B*
|
||||
- ID_MODEL_FROM_DATABASE=New Zealand [Radeon HD 7900 Series]
|
||||
+ ID_MODEL_FROM_DATABASE=New Zealand [Radeon HD 7990]
|
||||
|
||||
pci:v00001002d0000679E*
|
||||
ID_MODEL_FROM_DATABASE=Tahiti LE [Radeon HD 7870 XT]
|
||||
@@ -4634,9 +4628,6 @@ pci:v00001002d00006849*
|
||||
pci:v00001002d0000684C*
|
||||
ID_MODEL_FROM_DATABASE=Pitcairn [ATI FirePro V(FireGL V) Graphics Adapter]
|
||||
|
||||
-pci:v00001002d00006858*
|
||||
- ID_MODEL_FROM_DATABASE=Lombok [Radeon HD 7400 series]
|
||||
-
|
||||
pci:v00001002d00006880*
|
||||
ID_MODEL_FROM_DATABASE=Cypress
|
||||
|
||||
@@ -7575,7 +7566,7 @@ pci:v00001021*
|
||||
ID_VENDOR_FROM_DATABASE=OKI Electric Industry Co. Ltd.
|
||||
|
||||
pci:v00001022*
|
||||
- ID_VENDOR_FROM_DATABASE=Advanced Micro Devices [AMD]
|
||||
+ ID_VENDOR_FROM_DATABASE=Advanced Micro Devices, Inc. [AMD]
|
||||
|
||||
pci:v00001022d00001100*
|
||||
ID_MODEL_FROM_DATABASE=K8 [Athlon64/Opteron] HyperTransport Technology Configuration
|
||||
@@ -22482,7 +22473,7 @@ pci:v000010DEd00000FC6sv00001043sd00008428*
|
||||
ID_MODEL_FROM_DATABASE=GTX650-DC-1GD5
|
||||
|
||||
pci:v000010DEd00000FD1*
|
||||
- ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 650M / GTX 660M LE]
|
||||
+ ID_MODEL_FROM_DATABASE=GK107M [GeForce GT 650M]
|
||||
|
||||
pci:v000010DEd00000FD1sv00001043sd00001597*
|
||||
ID_MODEL_FROM_DATABASE=GeForce GT 650M
|
||||
@@ -22871,6 +22862,9 @@ pci:v000010DEd00001140sv000017AAsd0000500D*
|
||||
pci:v000010DEd00001180*
|
||||
ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 680]
|
||||
|
||||
+pci:v000010DEd00001180sv00003842sd00003682*
|
||||
+ ID_MODEL_FROM_DATABASE=GeForce GTX 680 Mac Edition
|
||||
+
|
||||
pci:v000010DEd00001183*
|
||||
ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 660 Ti]
|
||||
|
||||
@@ -22946,6 +22940,9 @@ pci:v000010DEd000011C2*
|
||||
pci:v000010DEd000011C3*
|
||||
ID_MODEL_FROM_DATABASE=GK106 [GeForce GTX 650 Ti OEM]
|
||||
|
||||
+pci:v000010DEd000011C3sv000010DEsd00001030*
|
||||
+ ID_MODEL_FROM_DATABASE=GeForce GTX 650 Ti OEM
|
||||
+
|
||||
pci:v000010DEd000011C4*
|
||||
ID_MODEL_FROM_DATABASE=GK106 [GeForce GTX 645 OEM]
|
||||
|
||||
@@ -24161,6 +24158,9 @@ pci:v00001102d00000004sv00001102sd00001007*
|
||||
pci:v00001102d00000004sv00001102sd00001009*
|
||||
ID_MODEL_FROM_DATABASE=SB Audigy2 OEM HP
|
||||
|
||||
+pci:v00001102d00000004sv00001102sd00002001*
|
||||
+ ID_MODEL_FROM_DATABASE=SB Audigy 2 ZS Platinum Pro
|
||||
+
|
||||
pci:v00001102d00000004sv00001102sd00002002*
|
||||
ID_MODEL_FROM_DATABASE=SB Audigy 2 ZS (SB0350)
|
||||
|
||||
@@ -49994,6 +49994,12 @@ pci:v00008086d000008AFsv00008086sd00001015*
|
||||
pci:v00008086d000008AFsv00008086sd00001017*
|
||||
ID_MODEL_FROM_DATABASE=Centrino Wireless-N 100 BG
|
||||
|
||||
+pci:v00008086d000008B1*
|
||||
+ ID_MODEL_FROM_DATABASE=Intel(R) Dual Band Wireless-AC 7260
|
||||
+
|
||||
+pci:v00008086d000008B2*
|
||||
+ ID_MODEL_FROM_DATABASE=Intel(R) Dual Band Wireless-AC 7260
|
||||
+
|
||||
pci:v00008086d00000960*
|
||||
ID_MODEL_FROM_DATABASE=80960RP (i960RP) Microprocessor/Bridge
|
||||
|
||||
@@ -52985,6 +52991,9 @@ pci:v00008086d00001521sv00001028sd00001F60*
|
||||
pci:v00008086d00001521sv00001028sd00001F62*
|
||||
ID_MODEL_FROM_DATABASE=Intel GbE 2P I350crNDC
|
||||
|
||||
+pci:v00008086d00001521sv0000103Csd000017D1*
|
||||
+ ID_MODEL_FROM_DATABASE=Ethernet 1Gb 4-port 366FLR Adapter
|
||||
+
|
||||
pci:v00008086d00001521sv0000103Csd0000337F*
|
||||
ID_MODEL_FROM_DATABASE=Ethernet 1Gb 2-port 361i Adapter
|
||||
|
||||
@@ -53198,6 +53207,9 @@ pci:v00008086d0000155A*
|
||||
pci:v00008086d00001560*
|
||||
ID_MODEL_FROM_DATABASE=Ethernet Controller X540-AT1
|
||||
|
||||
+pci:v00008086d0000157B*
|
||||
+ ID_MODEL_FROM_DATABASE=I210 Gigabit Network Connection
|
||||
+
|
||||
pci:v00008086d00001960*
|
||||
ID_MODEL_FROM_DATABASE=80960RP (i960RP) Microprocessor
|
||||
|
||||
@@ -66107,6 +66119,9 @@ pci:v0000CACEd00000002*
|
||||
pci:v0000CACEd00000023*
|
||||
ID_MODEL_FROM_DATABASE=AirPcap N
|
||||
|
||||
+pci:v0000CAED*
|
||||
+ ID_VENDOR_FROM_DATABASE=Canny Edge
|
||||
+
|
||||
pci:v0000CAFE*
|
||||
ID_VENDOR_FROM_DATABASE=Chrysalis-ITS
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,249 @@
|
|||
From 00d49751a37d257386fb7588744da629c476a153 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 14 Apr 2013 22:29:43 -0400
|
||||
Subject: [PATCH] conf-parser: generate 7 parsing functions from a macro
|
||||
|
||||
Those functions were identical, apart from typos. Log message
|
||||
is modified to contain the type of destination var (int, double,
|
||||
...). I think this might make it easier to understand why a value
|
||||
was rejected (e.g. a minus from an unsigned type).
|
||||
(cherry picked from commit eb3491d9ab2f2a3a28d9a6749b2c4b8abff173c6)
|
||||
---
|
||||
src/shared/conf-parser.c | 216 ++++++++---------------------------------------
|
||||
1 file changed, 33 insertions(+), 183 deletions(-)
|
||||
|
||||
diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c
|
||||
index fea2e56..a98805e 100644
|
||||
--- a/src/shared/conf-parser.c
|
||||
+++ b/src/shared/conf-parser.c
|
||||
@@ -341,140 +341,40 @@ int config_parse(
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int config_parse_int(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- int *i = data;
|
||||
- int r;
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
- assert(data);
|
||||
-
|
||||
- r = safe_atoi(rvalue, i);
|
||||
- if (r < 0) {
|
||||
- log_error("[%s:%u] Failed to parse numeric value, ingoring: %s", filename, line, rvalue);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-int config_parse_long(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- long *i = data;
|
||||
- int r;
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
- assert(data);
|
||||
-
|
||||
- r = safe_atoli(rvalue, i);
|
||||
- if (r < 0) {
|
||||
- log_error("[%s:%u] Failed to parse numeric value, ignoring: %s", filename, line, rvalue);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-int config_parse_uint64(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- uint64_t *u = data;
|
||||
- int r;
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
- assert(data);
|
||||
-
|
||||
- r = safe_atou64(rvalue, u);
|
||||
- if (r < 0) {
|
||||
- log_error("[%s:%u] Failed to parse numeric value, ignoring: %s", filename, line, rvalue);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-int config_parse_unsigned(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- unsigned *u = data;
|
||||
- int r;
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
- assert(data);
|
||||
-
|
||||
- r = safe_atou(rvalue, u);
|
||||
- if (r < 0) {
|
||||
- log_error("[%s:%u] Failed to parse numeric value: %s", filename, line, rvalue);
|
||||
- return r;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-int config_parse_double(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
+#define DEFINE_PARSER(type, vartype, conv_func) \
|
||||
+ int config_parse_##type(const char *filename, \
|
||||
+ unsigned line, \
|
||||
+ const char *section, \
|
||||
+ const char *lvalue, \
|
||||
+ int ltype, \
|
||||
+ const char *rvalue, \
|
||||
+ void *data, \
|
||||
+ void *userdata) { \
|
||||
+ \
|
||||
+ vartype *i = data; \
|
||||
+ int r; \
|
||||
+ \
|
||||
+ assert(filename); \
|
||||
+ assert(lvalue); \
|
||||
+ assert(rvalue); \
|
||||
+ assert(data); \
|
||||
+ \
|
||||
+ r = conv_func(rvalue, i); \
|
||||
+ if (r < 0) \
|
||||
+ log_error("[%s:%u] Failed to parse %s value, ignoring: %s", \
|
||||
+ filename, line, #vartype, rvalue); \
|
||||
+ \
|
||||
+ return 0; \
|
||||
+ }
|
||||
+
|
||||
+DEFINE_PARSER(int, int, safe_atoi)
|
||||
+DEFINE_PARSER(long, long, safe_atoli)
|
||||
+DEFINE_PARSER(uint64, uint64_t, safe_atou64)
|
||||
+DEFINE_PARSER(unsigned, unsigned, safe_atou)
|
||||
+DEFINE_PARSER(double, double, safe_atod)
|
||||
+DEFINE_PARSER(nsec, nsec_t, parse_nsec)
|
||||
+DEFINE_PARSER(sec, usec_t, parse_sec)
|
||||
|
||||
- double *d = data;
|
||||
- int r;
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
- assert(data);
|
||||
-
|
||||
- r = safe_atod(rvalue, d);
|
||||
- if (r < 0) {
|
||||
- log_error("[%s:%u] Failed to parse numeric value: %s", filename, line, rvalue);
|
||||
- return r;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
|
||||
int config_parse_bytes_size(
|
||||
const char *filename,
|
||||
@@ -774,56 +674,6 @@ int config_parse_path_strv(
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int config_parse_sec(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- usec_t *usec = data;
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
- assert(data);
|
||||
-
|
||||
- if (parse_sec(rvalue, usec) < 0) {
|
||||
- log_error("[%s:%u] Failed to parse time value, ignoring: %s", filename, line, rvalue);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-int config_parse_nsec(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- nsec_t *nsec = data;
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
- assert(data);
|
||||
-
|
||||
- if (parse_nsec(rvalue, nsec) < 0) {
|
||||
- log_error("[%s:%u] Failed to parse time value, ignoring: %s", filename, line, rvalue);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
int config_parse_mode(
|
||||
const char *filename,
|
||||
unsigned line,
|
|
@ -0,0 +1,113 @@
|
|||
From b2a8e869df99e85d44f346ce6d42a8f89d73811a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 15 Apr 2013 21:33:43 -0400
|
||||
Subject: [PATCH] core/main: generate 4 parsing functions from a macro (cherry
|
||||
picked from commit 799de03f51def1cb3cea376c2e3e783c721c9b89)
|
||||
|
||||
---
|
||||
src/core/main.c | 89 ++++++++++++++-------------------------------------------
|
||||
1 file changed, 21 insertions(+), 68 deletions(-)
|
||||
|
||||
diff --git a/src/core/main.c b/src/core/main.c
|
||||
index 364f1d1..0ffd98f 100644
|
||||
--- a/src/core/main.c
|
||||
+++ b/src/core/main.c
|
||||
@@ -421,77 +421,30 @@ static int parse_proc_cmdline_word(const char *word) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int config_parse_level2(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
-
|
||||
- log_set_max_level_from_string(rvalue);
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-static int config_parse_target(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
-
|
||||
- log_set_target_from_string(rvalue);
|
||||
- return 0;
|
||||
+#define DEFINE_SETTER(name, func) \
|
||||
+ static int name( \
|
||||
+ const char *filename, \
|
||||
+ unsigned line, \
|
||||
+ const char *section, \
|
||||
+ const char *lvalue, \
|
||||
+ int ltype, \
|
||||
+ const char *rvalue, \
|
||||
+ void *data, \
|
||||
+ void *userdata) { \
|
||||
+ \
|
||||
+ assert(filename); \
|
||||
+ assert(lvalue); \
|
||||
+ assert(rvalue); \
|
||||
+ \
|
||||
+ func(rvalue); \
|
||||
+ return 0; \
|
||||
}
|
||||
|
||||
-static int config_parse_color(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
-
|
||||
- log_show_color_from_string(rvalue);
|
||||
- return 0;
|
||||
-}
|
||||
+DEFINE_SETTER(config_parse_level2, log_set_max_level_from_string)
|
||||
+DEFINE_SETTER(config_parse_target, log_set_target_from_string)
|
||||
+DEFINE_SETTER(config_parse_color, log_show_color_from_string)
|
||||
+DEFINE_SETTER(config_parse_location, log_show_location_from_string)
|
||||
|
||||
-static int config_parse_location(
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
-
|
||||
- log_show_location_from_string(rvalue);
|
||||
- return 0;
|
||||
-}
|
||||
|
||||
static int config_parse_cpu_affinity2(
|
||||
const char *filename,
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,23 @@
|
|||
From ff85663ec052967f096e127e096949b75af97a13 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 15 Apr 2013 21:55:07 +0200
|
||||
Subject: [PATCH] core: let's make our log messages proper sentences with full
|
||||
stops (cherry picked from commit 7a9ec5c9027d919839ab6e286ede753caa164241)
|
||||
|
||||
---
|
||||
src/core/unit.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/unit.c b/src/core/unit.c
|
||||
index 63e42b2..b4fc095 100644
|
||||
--- a/src/core/unit.c
|
||||
+++ b/src/core/unit.c
|
||||
@@ -1456,7 +1456,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
|
||||
if (ns != os && ns == UNIT_FAILED) {
|
||||
log_struct_unit(LOG_NOTICE,
|
||||
u->id,
|
||||
- "MESSAGE=Unit %s entered failed state", u->id,
|
||||
+ "MESSAGE=Unit %s entered failed state.", u->id,
|
||||
NULL);
|
||||
unit_trigger_on_failure(u);
|
||||
}
|
|
@ -0,0 +1,142 @@
|
|||
From 9b37b0f4ac301027fd67ee5950b5c8c1fc8d53ed Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 15 Apr 2013 01:40:44 -0400
|
||||
Subject: [PATCH] core: log a few more things under UNIT=... (cherry picked
|
||||
from commit c1b6628d64e5340d905d974bb95d673a4aae60c1)
|
||||
|
||||
---
|
||||
src/core/unit.c | 41 ++++++++++++++++++++++-------------------
|
||||
src/test/test-unit-file.c | 3 +++
|
||||
2 files changed, 25 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/core/unit.c b/src/core/unit.c
|
||||
index b4fc095..2525f49 100644
|
||||
--- a/src/core/unit.c
|
||||
+++ b/src/core/unit.c
|
||||
@@ -914,8 +914,8 @@ int unit_load(Unit *u) {
|
||||
if (u->on_failure_isolate &&
|
||||
set_size(u->dependencies[UNIT_ON_FAILURE]) > 1) {
|
||||
|
||||
- log_error("More than one OnFailure= dependencies specified for %s but OnFailureIsolate= enabled. Refusing.",
|
||||
- u->id);
|
||||
+ log_error_unit(u->id,
|
||||
+ "More than one OnFailure= dependencies specified for %s but OnFailureIsolate= enabled. Refusing.", u->id);
|
||||
|
||||
r = -EINVAL;
|
||||
goto fail;
|
||||
@@ -934,7 +934,8 @@ fail:
|
||||
unit_add_to_dbus_queue(u);
|
||||
unit_add_to_gc_queue(u);
|
||||
|
||||
- log_debug("Failed to load configuration for %s: %s", u->id, strerror(-r));
|
||||
+ log_debug_unit(u->id, "Failed to load configuration for %s: %s",
|
||||
+ u->id, strerror(-r));
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -1031,10 +1032,10 @@ static void unit_status_log_starting_stopping_reloading(Unit *u, JobType t) {
|
||||
SD_MESSAGE_UNIT_RELOADING;
|
||||
|
||||
log_struct_unit(LOG_INFO,
|
||||
- u->id,
|
||||
- MESSAGE_ID(mid),
|
||||
- "MESSAGE=%s", buf,
|
||||
- NULL);
|
||||
+ u->id,
|
||||
+ MESSAGE_ID(mid),
|
||||
+ "MESSAGE=%s", buf,
|
||||
+ NULL);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -1067,13 +1068,14 @@ int unit_start(Unit *u) {
|
||||
* but we don't want to recheck the condition in that case. */
|
||||
if (state != UNIT_ACTIVATING &&
|
||||
!unit_condition_test(u)) {
|
||||
- log_debug("Starting of %s requested but condition failed. Ignoring.", u->id);
|
||||
+ log_debug_unit(u->id, "Starting of %s requested but condition failed. Ignoring.", u->id);
|
||||
return -EALREADY;
|
||||
}
|
||||
|
||||
/* Forward to the main object, if we aren't it. */
|
||||
if ((following = unit_following(u))) {
|
||||
- log_debug("Redirecting start request from %s to %s.", u->id, following->id);
|
||||
+ log_debug_unit(u->id, "Redirecting start request from %s to %s.",
|
||||
+ u->id, following->id);
|
||||
return unit_start(following);
|
||||
}
|
||||
|
||||
@@ -1124,7 +1126,8 @@ int unit_stop(Unit *u) {
|
||||
return -EALREADY;
|
||||
|
||||
if ((following = unit_following(u))) {
|
||||
- log_debug("Redirecting stop request from %s to %s.", u->id, following->id);
|
||||
+ log_debug_unit(u->id, "Redirecting stop request from %s to %s.",
|
||||
+ u->id, following->id);
|
||||
return unit_stop(following);
|
||||
}
|
||||
|
||||
@@ -1164,7 +1167,8 @@ int unit_reload(Unit *u) {
|
||||
return -ENOEXEC;
|
||||
|
||||
if ((following = unit_following(u))) {
|
||||
- log_debug("Redirecting reload request from %s to %s.", u->id, following->id);
|
||||
+ log_debug_unit(u->id, "Redirecting reload request from %s to %s.",
|
||||
+ u->id, following->id);
|
||||
return unit_reload(following);
|
||||
}
|
||||
|
||||
@@ -1217,7 +1221,7 @@ static void unit_check_unneeded(Unit *u) {
|
||||
if (unit_pending_active(other))
|
||||
return;
|
||||
|
||||
- log_info("Service %s is not needed anymore. Stopping.", u->id);
|
||||
+ log_info_unit(u->id, "Service %s is not needed anymore. Stopping.", u->id);
|
||||
|
||||
/* Ok, nobody needs us anymore. Sniff. Then let's commit suicide */
|
||||
manager_add_job(u->manager, JOB_STOP, u, JOB_FAIL, true, NULL, NULL);
|
||||
@@ -1309,13 +1313,14 @@ void unit_trigger_on_failure(Unit *u) {
|
||||
if (set_size(u->dependencies[UNIT_ON_FAILURE]) <= 0)
|
||||
return;
|
||||
|
||||
- log_info("Triggering OnFailure= dependencies of %s.", u->id);
|
||||
+ log_info_unit(u->id, "Triggering OnFailure= dependencies of %s.", u->id);
|
||||
|
||||
SET_FOREACH(other, u->dependencies[UNIT_ON_FAILURE], i) {
|
||||
int r;
|
||||
|
||||
- if ((r = manager_add_job(u->manager, JOB_START, other, u->on_failure_isolate ? JOB_ISOLATE : JOB_REPLACE, true, NULL, NULL)) < 0)
|
||||
- log_error("Failed to enqueue OnFailure= job: %s", strerror(-r));
|
||||
+ r = manager_add_job(u->manager, JOB_START, other, u->on_failure_isolate ? JOB_ISOLATE : JOB_REPLACE, true, NULL, NULL);
|
||||
+ if (r < 0)
|
||||
+ log_error_unit(u->id, "Failed to enqueue OnFailure= job: %s", strerror(-r));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1454,10 +1459,8 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
|
||||
check_unneeded_dependencies(u);
|
||||
|
||||
if (ns != os && ns == UNIT_FAILED) {
|
||||
- log_struct_unit(LOG_NOTICE,
|
||||
- u->id,
|
||||
- "MESSAGE=Unit %s entered failed state.", u->id,
|
||||
- NULL);
|
||||
+ log_notice_unit(u->id,
|
||||
+ "MESSAGE=Unit %s entered failed state.", u->id);
|
||||
unit_trigger_on_failure(u);
|
||||
}
|
||||
}
|
||||
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
|
||||
index ea79902..31b0fb2 100644
|
||||
--- a/src/test/test-unit-file.c
|
||||
+++ b/src/test/test-unit-file.c
|
||||
@@ -352,6 +352,9 @@ static void test_install_printf(void) {
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
||||
+ log_parse_environment();
|
||||
+ log_open();
|
||||
+
|
||||
test_unit_file_get_set();
|
||||
test_config_parse_exec();
|
||||
test_load_env_file_1();
|
|
@ -0,0 +1,209 @@
|
|||
From 34be942435bd6de19fe65544fa1defff24a3790a Mon Sep 17 00:00:00 2001
|
||||
From: Simon Peeters <peeters.simon@gmail.com>
|
||||
Date: Thu, 11 Apr 2013 00:39:01 +0200
|
||||
Subject: [PATCH] Move bus_error to dbus-common and remove
|
||||
bus_error_message_or_strerror
|
||||
|
||||
bus_error and bus_error_message_or_strerror dit almost exactly the same,
|
||||
so use only one of them and place it in dbus-common.
|
||||
(cherry picked from commit 449101fce2757575c4813a9512890536365445f6)
|
||||
---
|
||||
src/core/bus-errors.h | 13 -------------
|
||||
src/core/load-fragment.c | 2 +-
|
||||
src/core/main.c | 2 +-
|
||||
src/core/path.c | 2 +-
|
||||
src/core/service.c | 2 +-
|
||||
src/core/socket.c | 2 +-
|
||||
src/core/timer.c | 2 +-
|
||||
src/core/transaction.c | 1 +
|
||||
src/login/inhibit.c | 4 ++--
|
||||
src/login/logind-dbus.c | 2 +-
|
||||
src/shared/dbus-common.c | 5 ++---
|
||||
src/shared/dbus-common.h | 2 +-
|
||||
12 files changed, 13 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/src/core/bus-errors.h b/src/core/bus-errors.h
|
||||
index 04c1b28..7a4084e 100644
|
||||
--- a/src/core/bus-errors.h
|
||||
+++ b/src/core/bus-errors.h
|
||||
@@ -21,9 +21,6 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
-#include <string.h>
|
||||
-#include <dbus/dbus.h>
|
||||
-
|
||||
#define BUS_ERROR_NO_SUCH_UNIT "org.freedesktop.systemd1.NoSuchUnit"
|
||||
#define BUS_ERROR_NO_SUCH_JOB "org.freedesktop.systemd1.NoSuchJob"
|
||||
#define BUS_ERROR_NOT_SUBSCRIBED "org.freedesktop.systemd1.NotSubscribed"
|
||||
@@ -43,13 +40,3 @@
|
||||
#define BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC "org.freedesktop.systemd1.TransactionOrderIsCyclic"
|
||||
#define BUS_ERROR_SHUTTING_DOWN "org.freedesktop.systemd1.ShuttingDown"
|
||||
#define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess"
|
||||
-
|
||||
-static inline const char *bus_error(const DBusError *e, int r) {
|
||||
- if (e && e->message)
|
||||
- return e->message;
|
||||
-
|
||||
- if (r >= 0)
|
||||
- return strerror(r);
|
||||
-
|
||||
- return strerror(-r);
|
||||
-}
|
||||
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
|
||||
index 2a21727..52cdeb0 100644
|
||||
--- a/src/core/load-fragment.c
|
||||
+++ b/src/core/load-fragment.c
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "missing.h"
|
||||
#include "unit-name.h"
|
||||
#include "unit-printf.h"
|
||||
-#include "bus-errors.h"
|
||||
+#include "dbus-common.h"
|
||||
#include "utf8.h"
|
||||
#include "path-util.h"
|
||||
#include "syscall-list.h"
|
||||
diff --git a/src/core/main.c b/src/core/main.c
|
||||
index 259787c..f647865 100644
|
||||
--- a/src/core/main.c
|
||||
+++ b/src/core/main.c
|
||||
@@ -40,7 +40,7 @@
|
||||
#include "fdset.h"
|
||||
#include "special.h"
|
||||
#include "conf-parser.h"
|
||||
-#include "bus-errors.h"
|
||||
+#include "dbus-common.h"
|
||||
#include "missing.h"
|
||||
#include "label.h"
|
||||
#include "build.h"
|
||||
diff --git a/src/core/path.c b/src/core/path.c
|
||||
index ff49c06..b8ba057 100644
|
||||
--- a/src/core/path.c
|
||||
+++ b/src/core/path.c
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "mkdir.h"
|
||||
#include "dbus-path.h"
|
||||
#include "special.h"
|
||||
-#include "bus-errors.h"
|
||||
+#include "dbus-common.h"
|
||||
#include "path-util.h"
|
||||
#include "macro.h"
|
||||
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index e9e42b4..9ceff42 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "unit-printf.h"
|
||||
#include "dbus-service.h"
|
||||
#include "special.h"
|
||||
-#include "bus-errors.h"
|
||||
+#include "dbus-common.h"
|
||||
#include "exit-status.h"
|
||||
#include "def.h"
|
||||
#include "path-util.h"
|
||||
diff --git a/src/core/socket.c b/src/core/socket.c
|
||||
index f3cbe08..9f1af1e 100644
|
||||
--- a/src/core/socket.c
|
||||
+++ b/src/core/socket.c
|
||||
@@ -46,7 +46,7 @@
|
||||
#include "dbus-socket.h"
|
||||
#include "missing.h"
|
||||
#include "special.h"
|
||||
-#include "bus-errors.h"
|
||||
+#include "dbus-common.h"
|
||||
#include "label.h"
|
||||
#include "exit-status.h"
|
||||
#include "def.h"
|
||||
diff --git a/src/core/timer.c b/src/core/timer.c
|
||||
index 16ca573..107dbb3 100644
|
||||
--- a/src/core/timer.c
|
||||
+++ b/src/core/timer.c
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "timer.h"
|
||||
#include "dbus-timer.h"
|
||||
#include "special.h"
|
||||
-#include "bus-errors.h"
|
||||
+#include "dbus-common.h"
|
||||
|
||||
static const UnitActiveState state_translation_table[_TIMER_STATE_MAX] = {
|
||||
[TIMER_DEAD] = UNIT_INACTIVE,
|
||||
diff --git a/src/core/transaction.c b/src/core/transaction.c
|
||||
index 4a8d90e..610344e 100644
|
||||
--- a/src/core/transaction.c
|
||||
+++ b/src/core/transaction.c
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#include "transaction.h"
|
||||
#include "bus-errors.h"
|
||||
+#include "dbus-common.h"
|
||||
|
||||
static void transaction_unlink_job(Transaction *tr, Job *j, bool delete_dependencies);
|
||||
|
||||
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
|
||||
index 9cb321f..fbab42a 100644
|
||||
--- a/src/login/inhibit.c
|
||||
+++ b/src/login/inhibit.c
|
||||
@@ -251,7 +251,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
r = print_inhibitors(bus, &error);
|
||||
if (r < 0) {
|
||||
- log_error("Failed to list inhibitors: %s", bus_error_message_or_strerror(&error, -r));
|
||||
+ log_error("Failed to list inhibitors: %s", bus_error(&error, r));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ int main(int argc, char *argv[]) {
|
||||
free(w);
|
||||
|
||||
if (fd < 0) {
|
||||
- log_error("Failed to inhibit: %s", bus_error_message_or_strerror(&error, -r));
|
||||
+ log_error("Failed to inhibit: %s", bus_error(&error, r));
|
||||
r = fd;
|
||||
goto finish;
|
||||
}
|
||||
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
|
||||
index 7a38cdb..775a50f 100644
|
||||
--- a/src/login/logind-dbus.c
|
||||
+++ b/src/login/logind-dbus.c
|
||||
@@ -2437,7 +2437,7 @@ int manager_dispatch_delayed(Manager *manager) {
|
||||
dbus_error_init(&error);
|
||||
r = execute_shutdown_or_sleep(manager, manager->action_what, manager->action_unit, &error);
|
||||
if (r < 0) {
|
||||
- log_warning("Failed to send delayed message: %s", bus_error_message_or_strerror(&error, -r));
|
||||
+ log_warning("Failed to send delayed message: %s", bus_error(&error, r));
|
||||
dbus_error_free(&error);
|
||||
|
||||
manager->action_unit = NULL;
|
||||
diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c
|
||||
index 5afce76..b8c15cb 100644
|
||||
--- a/src/shared/dbus-common.c
|
||||
+++ b/src/shared/dbus-common.c
|
||||
@@ -258,12 +258,11 @@ const char *bus_error_message(const DBusError *error) {
|
||||
return error->message;
|
||||
}
|
||||
|
||||
-const char *bus_error_message_or_strerror(const DBusError *error, int err) {
|
||||
-
|
||||
+const char *bus_error(const DBusError *error, int err) {
|
||||
if (error && dbus_error_is_set(error))
|
||||
return bus_error_message(error);
|
||||
|
||||
- return strerror(err);
|
||||
+ return strerror(err < 0 ? -err : err);
|
||||
}
|
||||
|
||||
DBusHandlerResult bus_default_message_handler(
|
||||
diff --git a/src/shared/dbus-common.h b/src/shared/dbus-common.h
|
||||
index f7f614c..16fc14b 100644
|
||||
--- a/src/shared/dbus-common.h
|
||||
+++ b/src/shared/dbus-common.h
|
||||
@@ -92,7 +92,7 @@ int bus_connect_system_ssh(const char *user, const char *host, DBusConnection **
|
||||
int bus_connect_system_polkit(DBusConnection **_bus, DBusError *error);
|
||||
|
||||
const char *bus_error_message(const DBusError *error);
|
||||
-const char *bus_error_message_or_strerror(const DBusError *error, int err);
|
||||
+const char *bus_error(const DBusError *e, int r);
|
||||
|
||||
typedef int (*BusPropertyCallback)(DBusMessageIter *iter, const char *property, void *data);
|
||||
typedef int (*BusPropertySetCallback)(DBusMessageIter *iter, const char *property, void *data);
|
|
@ -0,0 +1,909 @@
|
|||
From 77529d5944b1fb1385de5b2c21a643741ac4c6a3 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 23 Apr 2013 15:53:16 -0300
|
||||
Subject: [PATCH] unit: rework trigger dependency logic
|
||||
|
||||
Instead of having explicit type-specific callbacks that inform the
|
||||
triggering unit when a triggered unit changes state, make this generic
|
||||
so that state changes are forwarded betwee any triggered and triggering
|
||||
unit.
|
||||
|
||||
Also, get rid of UnitRef references from automount, timer, path units,
|
||||
to the units they trigger and rely exclsuively on UNIT_TRIGGER type
|
||||
dendencies.
|
||||
(cherry picked from commit 3ecaa09bccd8a59c9f1e06756a1334a162206dc4)
|
||||
---
|
||||
src/core/automount.c | 40 ++++++-------
|
||||
src/core/automount.h | 2 -
|
||||
src/core/dbus-path.c | 6 +-
|
||||
src/core/dbus-timer.c | 6 +-
|
||||
src/core/job.c | 4 +-
|
||||
src/core/load-fragment-gperf.gperf.m4 | 4 +-
|
||||
src/core/load-fragment.c | 103 ++++++++++-----------------------
|
||||
src/core/load-fragment.h | 3 +-
|
||||
src/core/path.c | 69 +++++++++++-----------
|
||||
src/core/path.h | 4 --
|
||||
src/core/timer.c | 105 ++++++++++++++++------------------
|
||||
src/core/timer.h | 3 -
|
||||
src/core/unit.c | 19 ++++--
|
||||
src/core/unit.h | 11 +++-
|
||||
14 files changed, 166 insertions(+), 213 deletions(-)
|
||||
|
||||
diff --git a/src/core/automount.c b/src/core/automount.c
|
||||
index 4a98540..e6eedda 100644
|
||||
--- a/src/core/automount.c
|
||||
+++ b/src/core/automount.c
|
||||
@@ -109,7 +109,6 @@ static void automount_done(Unit *u) {
|
||||
assert(a);
|
||||
|
||||
unmount_autofs(a);
|
||||
- unit_ref_unset(&a->mount);
|
||||
|
||||
free(a->where);
|
||||
a->where = NULL;
|
||||
@@ -200,8 +199,8 @@ static int automount_verify(Automount *a) {
|
||||
}
|
||||
|
||||
static int automount_load(Unit *u) {
|
||||
- int r;
|
||||
Automount *a = AUTOMOUNT(u);
|
||||
+ int r;
|
||||
|
||||
assert(u);
|
||||
assert(u->load_state == UNIT_STUB);
|
||||
@@ -222,17 +221,15 @@ static int automount_load(Unit *u) {
|
||||
|
||||
path_kill_slashes(a->where);
|
||||
|
||||
- r = automount_add_mount_links(a);
|
||||
+ r = unit_load_related_unit(u, ".mount", &x);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
- r = unit_load_related_unit(u, ".mount", &x);
|
||||
+ r = unit_add_two_dependencies(u, UNIT_BEFORE, UNIT_TRIGGERS, x, true);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
- unit_ref_set(&a->mount, x);
|
||||
-
|
||||
- r = unit_add_two_dependencies(u, UNIT_BEFORE, UNIT_TRIGGERS, UNIT_DEREF(a->mount), true);
|
||||
+ r = automount_add_mount_links(a);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -586,12 +583,11 @@ fail:
|
||||
}
|
||||
|
||||
static void automount_enter_runnning(Automount *a) {
|
||||
- int r;
|
||||
- struct stat st;
|
||||
_cleanup_dbus_error_free_ DBusError error;
|
||||
+ struct stat st;
|
||||
+ int r;
|
||||
|
||||
assert(a);
|
||||
- assert(UNIT_DEREF(a->mount));
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
||||
@@ -616,11 +612,15 @@ static void automount_enter_runnning(Automount *a) {
|
||||
if (!S_ISDIR(st.st_mode) || st.st_dev != a->dev_id)
|
||||
log_info_unit(UNIT(a)->id,
|
||||
"%s's automount point already active?", UNIT(a)->id);
|
||||
- else if ((r = manager_add_job(UNIT(a)->manager, JOB_START, UNIT_DEREF(a->mount), JOB_REPLACE, true, &error, NULL)) < 0) {
|
||||
- log_warning_unit(UNIT(a)->id,
|
||||
- "%s failed to queue mount startup job: %s",
|
||||
- UNIT(a)->id, bus_error(&error, r));
|
||||
- goto fail;
|
||||
+ else {
|
||||
+ r = manager_add_job(UNIT(a)->manager, JOB_START, UNIT_TRIGGER(UNIT(a)),
|
||||
+ JOB_REPLACE, true, &error, NULL);
|
||||
+ if (r < 0) {
|
||||
+ log_warning_unit(UNIT(a)->id,
|
||||
+ "%s failed to queue mount startup job: %s",
|
||||
+ UNIT(a)->id, bus_error(&error, r));
|
||||
+ goto fail;
|
||||
+ }
|
||||
}
|
||||
|
||||
automount_set_state(a, AUTOMOUNT_RUNNING);
|
||||
@@ -643,7 +643,7 @@ static int automount_start(Unit *u) {
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
- if (UNIT_DEREF(a->mount)->load_state != UNIT_LOADED)
|
||||
+ if (UNIT_TRIGGER(u)->load_state != UNIT_LOADED)
|
||||
return -ENOENT;
|
||||
|
||||
a->result = AUTOMOUNT_SUCCESS;
|
||||
@@ -765,14 +765,12 @@ static const char *automount_sub_state_to_string(Unit *u) {
|
||||
}
|
||||
|
||||
static bool automount_check_gc(Unit *u) {
|
||||
- Automount *a = AUTOMOUNT(u);
|
||||
-
|
||||
- assert(a);
|
||||
+ assert(u);
|
||||
|
||||
- if (!UNIT_DEREF(a->mount))
|
||||
+ if (!UNIT_TRIGGER(u))
|
||||
return false;
|
||||
|
||||
- return UNIT_VTABLE(UNIT_DEREF(a->mount))->check_gc(UNIT_DEREF(a->mount));
|
||||
+ return UNIT_VTABLE(UNIT_TRIGGER(u))->check_gc(UNIT_TRIGGER(u));
|
||||
}
|
||||
|
||||
static void automount_fd_event(Unit *u, int fd, uint32_t events, Watch *w) {
|
||||
diff --git a/src/core/automount.h b/src/core/automount.h
|
||||
index 3d5736d..8276051 100644
|
||||
--- a/src/core/automount.h
|
||||
+++ b/src/core/automount.h
|
||||
@@ -48,8 +48,6 @@ struct Automount {
|
||||
|
||||
char *where;
|
||||
|
||||
- UnitRef mount;
|
||||
-
|
||||
int pipe_fd;
|
||||
mode_t directory_mode;
|
||||
Watch pipe_watch;
|
||||
diff --git a/src/core/dbus-path.c b/src/core/dbus-path.c
|
||||
index f7fed17..1e62083 100644
|
||||
--- a/src/core/dbus-path.c
|
||||
+++ b/src/core/dbus-path.c
|
||||
@@ -84,15 +84,15 @@ static int bus_path_append_paths(DBusMessageIter *i, const char *property, void
|
||||
}
|
||||
|
||||
static int bus_path_append_unit(DBusMessageIter *i, const char *property, void *data) {
|
||||
- Unit *u = data;
|
||||
- Path *p = PATH(u);
|
||||
+ Unit *u = data, *trigger;
|
||||
const char *t;
|
||||
|
||||
assert(i);
|
||||
assert(property);
|
||||
assert(u);
|
||||
|
||||
- t = UNIT_DEREF(p->unit) ? UNIT_DEREF(p->unit)->id : "";
|
||||
+ trigger = UNIT_TRIGGER(u);
|
||||
+ t = trigger ? trigger->id : "";
|
||||
|
||||
return dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t) ? 0 : -ENOMEM;
|
||||
}
|
||||
diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c
|
||||
index 75add81..4082f7f 100644
|
||||
--- a/src/core/dbus-timer.c
|
||||
+++ b/src/core/dbus-timer.c
|
||||
@@ -152,15 +152,15 @@ static int bus_timer_append_calendar_timers(DBusMessageIter *i, const char *prop
|
||||
}
|
||||
|
||||
static int bus_timer_append_unit(DBusMessageIter *i, const char *property, void *data) {
|
||||
- Unit *u = data;
|
||||
- Timer *timer = TIMER(u);
|
||||
+ Unit *u = data, *trigger;
|
||||
const char *t;
|
||||
|
||||
assert(i);
|
||||
assert(property);
|
||||
assert(u);
|
||||
|
||||
- t = UNIT_DEREF(timer->unit) ? UNIT_DEREF(timer->unit)->id : "";
|
||||
+ trigger = UNIT_TRIGGER(u);
|
||||
+ t = trigger ? trigger->id : "";
|
||||
|
||||
return dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &t) ? 0 : -ENOMEM;
|
||||
}
|
||||
diff --git a/src/core/job.c b/src/core/job.c
|
||||
index af5855b..9a425a6 100644
|
||||
--- a/src/core/job.c
|
||||
+++ b/src/core/job.c
|
||||
@@ -840,9 +840,11 @@ int job_finish_and_invalidate(Job *j, JobResult result, bool recursive) {
|
||||
job_result_to_string(result),
|
||||
NULL);
|
||||
|
||||
- unit_trigger_on_failure(u);
|
||||
+ unit_start_on_failure(u);
|
||||
}
|
||||
|
||||
+ unit_trigger_notify(u);
|
||||
+
|
||||
finish:
|
||||
/* Try to start the next jobs that can be started */
|
||||
SET_FOREACH(other, u->dependencies[UNIT_AFTER], i)
|
||||
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
|
||||
index d5e579f..4e1454e 100644
|
||||
--- a/src/core/load-fragment-gperf.gperf.m4
|
||||
+++ b/src/core/load-fragment-gperf.gperf.m4
|
||||
@@ -241,14 +241,14 @@ Timer.OnBootSec, config_parse_timer, 0,
|
||||
Timer.OnStartupSec, config_parse_timer, 0, 0
|
||||
Timer.OnUnitActiveSec, config_parse_timer, 0, 0
|
||||
Timer.OnUnitInactiveSec, config_parse_timer, 0, 0
|
||||
-Timer.Unit, config_parse_timer_unit, 0, 0
|
||||
+Timer.Unit, config_parse_trigger_unit, 0, 0
|
||||
m4_dnl
|
||||
Path.PathExists, config_parse_path_spec, 0, 0
|
||||
Path.PathExistsGlob, config_parse_path_spec, 0, 0
|
||||
Path.PathChanged, config_parse_path_spec, 0, 0
|
||||
Path.PathModified, config_parse_path_spec, 0, 0
|
||||
Path.DirectoryNotEmpty, config_parse_path_spec, 0, 0
|
||||
-Path.Unit, config_parse_path_unit, 0, 0
|
||||
+Path.Unit, config_parse_trigger_unit, 0, 0
|
||||
Path.MakeDirectory, config_parse_bool, 0, offsetof(Path, make_directory)
|
||||
Path.DirectoryMode, config_parse_mode, 0, offsetof(Path, directory_mode)
|
||||
m4_dnl The [Install] section is ignored here.
|
||||
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
|
||||
index 52cdeb0..2065f09 100644
|
||||
--- a/src/core/load-fragment.c
|
||||
+++ b/src/core/load-fragment.c
|
||||
@@ -1254,50 +1254,57 @@ int config_parse_timer(const char *unit,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int config_parse_timer_unit(const char *unit,
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
+int config_parse_trigger_unit(
|
||||
+ const char *unit,
|
||||
+ const char *filename,
|
||||
+ unsigned line,
|
||||
+ const char *section,
|
||||
+ const char *lvalue,
|
||||
+ int ltype,
|
||||
+ const char *rvalue,
|
||||
+ void *data,
|
||||
+ void *userdata) {
|
||||
|
||||
- Timer *t = data;
|
||||
- int r;
|
||||
- DBusError error;
|
||||
- Unit *u;
|
||||
_cleanup_free_ char *p = NULL;
|
||||
+ Unit *u = data;
|
||||
+ UnitType type;
|
||||
+ int r;
|
||||
|
||||
assert(filename);
|
||||
assert(lvalue);
|
||||
assert(rvalue);
|
||||
assert(data);
|
||||
|
||||
- dbus_error_init(&error);
|
||||
+ if (!set_isempty(u->dependencies[UNIT_TRIGGERS])) {
|
||||
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
||||
+ "Multiple units to trigger specified, ignoring: %s", rvalue);
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
- p = unit_name_printf(UNIT(t), rvalue);
|
||||
+ p = unit_name_printf(u, rvalue);
|
||||
if (!p)
|
||||
return log_oom();
|
||||
|
||||
- if (endswith(p, ".timer")) {
|
||||
+ type = unit_name_to_type(p);
|
||||
+ if (type < 0) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
||||
- "Unit cannot be of type timer, ignoring: %s", rvalue);
|
||||
+ "Unit type not valid, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
- r = manager_load_unit(UNIT(t)->manager, p, NULL, NULL, &u);
|
||||
+ if (type == u->type) {
|
||||
+ log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
||||
+ "Trigger cannot be of same type, ignoring: %s", rvalue);
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+ r = unit_add_two_dependencies_by_name(u, UNIT_BEFORE, UNIT_TRIGGERS, p, NULL, true);
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, -r,
|
||||
- "Failed to load unit %s, ignoring: %s",
|
||||
- rvalue, bus_error(&error, r));
|
||||
- dbus_error_free(&error);
|
||||
+ "Failed to add trigger on %s, ignoring: %s", p, strerror(-r));
|
||||
return 0;
|
||||
}
|
||||
|
||||
- unit_ref_set(&t->unit, u);
|
||||
-
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1367,53 +1374,6 @@ int config_parse_path_spec(const char *unit,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int config_parse_path_unit(const char *unit,
|
||||
- const char *filename,
|
||||
- unsigned line,
|
||||
- const char *section,
|
||||
- const char *lvalue,
|
||||
- int ltype,
|
||||
- const char *rvalue,
|
||||
- void *data,
|
||||
- void *userdata) {
|
||||
-
|
||||
- Path *t = data;
|
||||
- int r;
|
||||
- DBusError error;
|
||||
- Unit *u;
|
||||
- _cleanup_free_ char *p = NULL;
|
||||
-
|
||||
- assert(filename);
|
||||
- assert(lvalue);
|
||||
- assert(rvalue);
|
||||
- assert(data);
|
||||
-
|
||||
- dbus_error_init(&error);
|
||||
-
|
||||
- p = unit_name_printf(UNIT(t), rvalue);
|
||||
- if (!p)
|
||||
- return log_oom();
|
||||
-
|
||||
- if (endswith(p, ".path")) {
|
||||
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
||||
- "Unit cannot be of type path, ignoring: %s", p);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- r = manager_load_unit(UNIT(t)->manager, p, NULL, &error, &u);
|
||||
- if (r < 0) {
|
||||
- log_syntax(unit, LOG_ERR, filename, line, EINVAL,
|
||||
- "Failed to load unit %s, ignoring: %s",
|
||||
- p, bus_error(&error, r));
|
||||
- dbus_error_free(&error);
|
||||
- return 0;
|
||||
- }
|
||||
-
|
||||
- unit_ref_set(&t->unit, u);
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
int config_parse_socket_service(const char *unit,
|
||||
const char *filename,
|
||||
unsigned line,
|
||||
@@ -2482,10 +2442,9 @@ void unit_dump_config_items(FILE *f) {
|
||||
{ config_parse_unit_requires_mounts_for, "PATH [...]" },
|
||||
{ config_parse_exec_mount_flags, "MOUNTFLAG [...]" },
|
||||
{ config_parse_unit_string_printf, "STRING" },
|
||||
+ { config_parse_trigger_unit, "UNIT" },
|
||||
{ config_parse_timer, "TIMER" },
|
||||
- { config_parse_timer_unit, "NAME" },
|
||||
{ config_parse_path_spec, "PATH" },
|
||||
- { config_parse_path_unit, "UNIT" },
|
||||
{ config_parse_notify_access, "ACCESS" },
|
||||
{ config_parse_ip_tos, "TOS" },
|
||||
{ config_parse_unit_condition_path, "CONDITION" },
|
||||
diff --git a/src/core/load-fragment.h b/src/core/load-fragment.h
|
||||
index 0161ce0..ff7f22a 100644
|
||||
--- a/src/core/load-fragment.h
|
||||
+++ b/src/core/load-fragment.h
|
||||
@@ -61,9 +61,8 @@ int config_parse_fsck_passno(const char *unit, const char *filename, unsigned li
|
||||
int config_parse_kill_signal(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
int config_parse_exec_mount_flags(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
int config_parse_timer(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
-int config_parse_timer_unit(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
+int config_parse_trigger_unit(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
int config_parse_path_spec(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
-int config_parse_path_unit(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
int config_parse_socket_service(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
int config_parse_service_sockets(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
int config_parse_unit_env_file(const char *unit, const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
|
||||
diff --git a/src/core/path.c b/src/core/path.c
|
||||
index b8ba057..9d4f4f5 100644
|
||||
--- a/src/core/path.c
|
||||
+++ b/src/core/path.c
|
||||
@@ -298,7 +298,6 @@ static void path_done(Unit *u) {
|
||||
|
||||
assert(p);
|
||||
|
||||
- unit_ref_unset(&p->unit);
|
||||
path_free_specs(p);
|
||||
}
|
||||
|
||||
@@ -390,21 +389,18 @@ static int path_load(Unit *u) {
|
||||
|
||||
if (u->load_state == UNIT_LOADED) {
|
||||
|
||||
- if (!UNIT_DEREF(p->unit)) {
|
||||
+ if (set_isempty(u->dependencies[UNIT_TRIGGERS])) {
|
||||
Unit *x;
|
||||
|
||||
r = unit_load_related_unit(u, ".service", &x);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
- unit_ref_set(&p->unit, x);
|
||||
+ r = unit_add_two_dependencies(u, UNIT_BEFORE, UNIT_TRIGGERS, x, true);
|
||||
+ if (r < 0)
|
||||
+ return r;
|
||||
}
|
||||
|
||||
- r = unit_add_two_dependencies(u, UNIT_BEFORE, UNIT_TRIGGERS,
|
||||
- UNIT_DEREF(p->unit), true);
|
||||
- if (r < 0)
|
||||
- return r;
|
||||
-
|
||||
r = path_add_mount_links(p);
|
||||
if (r < 0)
|
||||
return r;
|
||||
@@ -421,11 +417,14 @@ static int path_load(Unit *u) {
|
||||
|
||||
static void path_dump(Unit *u, FILE *f, const char *prefix) {
|
||||
Path *p = PATH(u);
|
||||
+ Unit *trigger;
|
||||
PathSpec *s;
|
||||
|
||||
assert(p);
|
||||
assert(f);
|
||||
|
||||
+ trigger = UNIT_TRIGGER(u);
|
||||
+
|
||||
fprintf(f,
|
||||
"%sPath State: %s\n"
|
||||
"%sResult: %s\n"
|
||||
@@ -434,7 +433,7 @@ static void path_dump(Unit *u, FILE *f, const char *prefix) {
|
||||
"%sDirectoryMode: %04o\n",
|
||||
prefix, path_state_to_string(p->state),
|
||||
prefix, path_result_to_string(p->result),
|
||||
- prefix, UNIT_DEREF(p->unit)->id,
|
||||
+ prefix, trigger ? trigger->id : "n/a",
|
||||
prefix, yes_no(p->make_directory),
|
||||
prefix, p->directory_mode);
|
||||
|
||||
@@ -516,17 +515,18 @@ static void path_enter_dead(Path *p, PathResult f) {
|
||||
}
|
||||
|
||||
static void path_enter_running(Path *p) {
|
||||
+ _cleanup_dbus_error_free_ DBusError error;
|
||||
int r;
|
||||
- DBusError error;
|
||||
|
||||
assert(p);
|
||||
+
|
||||
dbus_error_init(&error);
|
||||
|
||||
/* Don't start job if we are supposed to go down */
|
||||
- if (UNIT(p)->job && UNIT(p)->job->type == JOB_STOP)
|
||||
+ if (unit_pending_inactive(UNIT(p)))
|
||||
return;
|
||||
|
||||
- r = manager_add_job(UNIT(p)->manager, JOB_START, UNIT_DEREF(p->unit),
|
||||
+ r = manager_add_job(UNIT(p)->manager, JOB_START, UNIT_TRIGGER(UNIT(p)),
|
||||
JOB_REPLACE, true, &error, NULL);
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
@@ -544,8 +544,6 @@ fail:
|
||||
log_warning("%s failed to queue unit startup job: %s",
|
||||
UNIT(p)->id, bus_error(&error, r));
|
||||
path_enter_dead(p, PATH_FAILURE_RESOURCES);
|
||||
-
|
||||
- dbus_error_free(&error);
|
||||
}
|
||||
|
||||
static bool path_check_good(Path *p, bool initial) {
|
||||
@@ -616,7 +614,7 @@ static int path_start(Unit *u) {
|
||||
assert(p);
|
||||
assert(p->state == PATH_DEAD || p->state == PATH_FAILED);
|
||||
|
||||
- if (UNIT_DEREF(p->unit)->load_state != UNIT_LOADED)
|
||||
+ if (UNIT_TRIGGER(u)->load_state != UNIT_LOADED)
|
||||
return -ENOENT;
|
||||
|
||||
path_mkdir(p);
|
||||
@@ -737,33 +735,28 @@ fail:
|
||||
path_enter_dead(p, PATH_FAILURE_RESOURCES);
|
||||
}
|
||||
|
||||
-void path_unit_notify(Unit *u, UnitActiveState new_state) {
|
||||
- Iterator i;
|
||||
- Unit *k;
|
||||
-
|
||||
- if (u->type == UNIT_PATH)
|
||||
- return;
|
||||
+static void path_trigger_notify(Unit *u, Unit *other) {
|
||||
+ Path *p = PATH(u);
|
||||
|
||||
- SET_FOREACH(k, u->dependencies[UNIT_TRIGGERED_BY], i) {
|
||||
- Path *p;
|
||||
+ assert(u);
|
||||
+ assert(other);
|
||||
|
||||
- if (k->type != UNIT_PATH)
|
||||
- continue;
|
||||
+ /* Invoked whenever the unit we trigger changes state or gains
|
||||
+ * or loses a job */
|
||||
|
||||
- if (k->load_state != UNIT_LOADED)
|
||||
- continue;
|
||||
-
|
||||
- p = PATH(k);
|
||||
+ if (other->load_state != UNIT_LOADED)
|
||||
+ return;
|
||||
|
||||
- if (p->state == PATH_RUNNING && new_state == UNIT_INACTIVE) {
|
||||
- log_debug("%s got notified about unit deactivation.",
|
||||
- UNIT(p)->id);
|
||||
+ if (p->state == PATH_RUNNING &&
|
||||
+ UNIT_IS_INACTIVE_OR_FAILED(unit_active_state(other))) {
|
||||
+ log_debug_unit(UNIT(p)->id,
|
||||
+ "%s got notified about unit deactivation.",
|
||||
+ UNIT(p)->id);
|
||||
|
||||
- /* Hmm, so inotify was triggered since the
|
||||
- * last activation, so I guess we need to
|
||||
- * recheck what is going on. */
|
||||
- path_enter_waiting(p, false, p->inotify_triggered);
|
||||
- }
|
||||
+ /* Hmm, so inotify was triggered since the
|
||||
+ * last activation, so I guess we need to
|
||||
+ * recheck what is going on. */
|
||||
+ path_enter_waiting(p, false, p->inotify_triggered);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -830,6 +823,8 @@ const UnitVTable path_vtable = {
|
||||
|
||||
.fd_event = path_fd_event,
|
||||
|
||||
+ .trigger_notify = path_trigger_notify,
|
||||
+
|
||||
.reset_failed = path_reset_failed,
|
||||
|
||||
.bus_interface = "org.freedesktop.systemd1.Path",
|
||||
diff --git a/src/core/path.h b/src/core/path.h
|
||||
index 645feef..9740415 100644
|
||||
--- a/src/core/path.h
|
||||
+++ b/src/core/path.h
|
||||
@@ -80,8 +80,6 @@ struct Path {
|
||||
|
||||
LIST_HEAD(PathSpec, specs);
|
||||
|
||||
- UnitRef unit;
|
||||
-
|
||||
PathState state, deserialized_state;
|
||||
|
||||
bool inotify_triggered;
|
||||
@@ -92,8 +90,6 @@ struct Path {
|
||||
PathResult result;
|
||||
};
|
||||
|
||||
-void path_unit_notify(Unit *u, UnitActiveState new_state);
|
||||
-
|
||||
/* Called from the mount code figure out if a mount is a dependency of
|
||||
* any of the paths of this path object */
|
||||
int path_add_one_mount_link(Path *p, Mount *m);
|
||||
diff --git a/src/core/timer.c b/src/core/timer.c
|
||||
index 107dbb3..b5d895f 100644
|
||||
--- a/src/core/timer.c
|
||||
+++ b/src/core/timer.c
|
||||
@@ -72,8 +72,6 @@ static void timer_done(Unit *u) {
|
||||
|
||||
unit_unwatch_timer(u, &t->monotonic_watch);
|
||||
unit_unwatch_timer(u, &t->realtime_watch);
|
||||
-
|
||||
- unit_ref_unset(&t->unit);
|
||||
}
|
||||
|
||||
static int timer_verify(Timer *t) {
|
||||
@@ -122,20 +120,18 @@ static int timer_load(Unit *u) {
|
||||
|
||||
if (u->load_state == UNIT_LOADED) {
|
||||
|
||||
- if (!UNIT_DEREF(t->unit)) {
|
||||
+ if (set_isempty(u->dependencies[UNIT_TRIGGERS])) {
|
||||
Unit *x;
|
||||
|
||||
r = unit_load_related_unit(u, ".service", &x);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
- unit_ref_set(&t->unit, x);
|
||||
+ r = unit_add_two_dependencies(u, UNIT_BEFORE, UNIT_TRIGGERS, x, true);
|
||||
+ if (r < 0)
|
||||
+ return r;
|
||||
}
|
||||
|
||||
- r = unit_add_two_dependencies(u, UNIT_BEFORE, UNIT_TRIGGERS, UNIT_DEREF(t->unit), true);
|
||||
- if (r < 0)
|
||||
- return r;
|
||||
-
|
||||
if (UNIT(t)->default_dependencies) {
|
||||
r = timer_add_default_dependencies(t);
|
||||
if (r < 0)
|
||||
@@ -148,15 +144,18 @@ static int timer_load(Unit *u) {
|
||||
|
||||
static void timer_dump(Unit *u, FILE *f, const char *prefix) {
|
||||
Timer *t = TIMER(u);
|
||||
+ Unit *trigger;
|
||||
TimerValue *v;
|
||||
|
||||
+ trigger = UNIT_TRIGGER(u);
|
||||
+
|
||||
fprintf(f,
|
||||
"%sTimer State: %s\n"
|
||||
"%sResult: %s\n"
|
||||
"%sUnit: %s\n",
|
||||
prefix, timer_state_to_string(t->state),
|
||||
prefix, timer_result_to_string(t->result),
|
||||
- prefix, UNIT_DEREF(t->unit)->id);
|
||||
+ prefix, trigger ? trigger->id : "n/a");
|
||||
|
||||
LIST_FOREACH(value, v, t->values) {
|
||||
|
||||
@@ -285,18 +284,18 @@ static void timer_enter_waiting(Timer *t, bool initial) {
|
||||
|
||||
case TIMER_UNIT_ACTIVE:
|
||||
|
||||
- if (UNIT_DEREF(t->unit)->inactive_exit_timestamp.monotonic <= 0)
|
||||
+ if (UNIT_TRIGGER(UNIT(t))->inactive_exit_timestamp.monotonic <= 0)
|
||||
continue;
|
||||
|
||||
- base = UNIT_DEREF(t->unit)->inactive_exit_timestamp.monotonic;
|
||||
+ base = UNIT_TRIGGER(UNIT(t))->inactive_exit_timestamp.monotonic;
|
||||
break;
|
||||
|
||||
case TIMER_UNIT_INACTIVE:
|
||||
|
||||
- if (UNIT_DEREF(t->unit)->inactive_enter_timestamp.monotonic <= 0)
|
||||
+ if (UNIT_TRIGGER(UNIT(t))->inactive_enter_timestamp.monotonic <= 0)
|
||||
continue;
|
||||
|
||||
- base = UNIT_DEREF(t->unit)->inactive_enter_timestamp.monotonic;
|
||||
+ base = UNIT_TRIGGER(UNIT(t))->inactive_enter_timestamp.monotonic;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -369,10 +368,11 @@ static void timer_enter_running(Timer *t) {
|
||||
dbus_error_init(&error);
|
||||
|
||||
/* Don't start job if we are supposed to go down */
|
||||
- if (UNIT(t)->job && UNIT(t)->job->type == JOB_STOP)
|
||||
+ if (unit_pending_inactive(UNIT(t)))
|
||||
return;
|
||||
|
||||
- r = manager_add_job(UNIT(t)->manager, JOB_START, UNIT_DEREF(t->unit), JOB_REPLACE, true, &error, NULL);
|
||||
+ r = manager_add_job(UNIT(t)->manager, JOB_START, UNIT_TRIGGER(UNIT(t)),
|
||||
+ JOB_REPLACE, true, &error, NULL);
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
@@ -394,7 +394,7 @@ static int timer_start(Unit *u) {
|
||||
assert(t);
|
||||
assert(t->state == TIMER_DEAD || t->state == TIMER_FAILED);
|
||||
|
||||
- if (UNIT_DEREF(t->unit)->load_state != UNIT_LOADED)
|
||||
+ if (UNIT_TRIGGER(u)->load_state != UNIT_LOADED)
|
||||
return -ENOENT;
|
||||
|
||||
t->result = TIMER_SUCCESS;
|
||||
@@ -481,58 +481,49 @@ static void timer_timer_event(Unit *u, uint64_t elapsed, Watch *w) {
|
||||
timer_enter_running(t);
|
||||
}
|
||||
|
||||
-void timer_unit_notify(Unit *u, UnitActiveState new_state) {
|
||||
- Iterator i;
|
||||
- Unit *k;
|
||||
+static void timer_trigger_notify(Unit *u, Unit *other) {
|
||||
+ Timer *t = TIMER(u);
|
||||
+ TimerValue *v;
|
||||
|
||||
- if (u->type == UNIT_TIMER)
|
||||
- return;
|
||||
+ assert(u);
|
||||
+ assert(other);
|
||||
|
||||
- SET_FOREACH(k, u->dependencies[UNIT_TRIGGERED_BY], i) {
|
||||
- Timer *t;
|
||||
- TimerValue *v;
|
||||
+ log_error("NOTIFY!");
|
||||
|
||||
- if (k->type != UNIT_TIMER)
|
||||
- continue;
|
||||
+ if (other->load_state != UNIT_LOADED)
|
||||
+ return;
|
||||
|
||||
- if (k->load_state != UNIT_LOADED)
|
||||
- continue;
|
||||
+ /* Reenable all timers that depend on unit state */
|
||||
+ LIST_FOREACH(value, v, t->values)
|
||||
+ if (v->base == TIMER_UNIT_ACTIVE ||
|
||||
+ v->base == TIMER_UNIT_INACTIVE)
|
||||
+ v->disabled = false;
|
||||
|
||||
- t = TIMER(k);
|
||||
+ switch (t->state) {
|
||||
|
||||
- /* Reenable all timers that depend on unit state */
|
||||
- LIST_FOREACH(value, v, t->values)
|
||||
- if (v->base == TIMER_UNIT_ACTIVE ||
|
||||
- v->base == TIMER_UNIT_INACTIVE)
|
||||
- v->disabled = false;
|
||||
+ case TIMER_WAITING:
|
||||
+ case TIMER_ELAPSED:
|
||||
|
||||
- switch (t->state) {
|
||||
+ /* Recalculate sleep time */
|
||||
+ timer_enter_waiting(t, false);
|
||||
+ break;
|
||||
|
||||
- case TIMER_WAITING:
|
||||
- case TIMER_ELAPSED:
|
||||
+ case TIMER_RUNNING:
|
||||
|
||||
- /* Recalculate sleep time */
|
||||
+ if (UNIT_IS_INACTIVE_OR_FAILED(unit_active_state(other))) {
|
||||
+ log_debug_unit(UNIT(t)->id,
|
||||
+ "%s got notified about unit deactivation.",
|
||||
+ UNIT(t)->id);
|
||||
timer_enter_waiting(t, false);
|
||||
- break;
|
||||
-
|
||||
- case TIMER_RUNNING:
|
||||
-
|
||||
- if (UNIT_IS_INACTIVE_OR_FAILED(new_state)) {
|
||||
- log_debug_unit(UNIT(t)->id,
|
||||
- "%s got notified about unit deactivation.",
|
||||
- UNIT(t)->id);
|
||||
- timer_enter_waiting(t, false);
|
||||
- }
|
||||
-
|
||||
- break;
|
||||
+ }
|
||||
+ break;
|
||||
|
||||
- case TIMER_DEAD:
|
||||
- case TIMER_FAILED:
|
||||
- break;
|
||||
+ case TIMER_DEAD:
|
||||
+ case TIMER_FAILED:
|
||||
+ break;
|
||||
|
||||
- default:
|
||||
- assert_not_reached("Unknown timer state");
|
||||
- }
|
||||
+ default:
|
||||
+ assert_not_reached("Unknown timer state");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -614,6 +605,8 @@ const UnitVTable timer_vtable = {
|
||||
|
||||
.timer_event = timer_timer_event,
|
||||
|
||||
+ .trigger_notify = timer_trigger_notify,
|
||||
+
|
||||
.reset_failed = timer_reset_failed,
|
||||
.time_change = timer_time_change,
|
||||
|
||||
diff --git a/src/core/timer.h b/src/core/timer.h
|
||||
index c145348..163bd6c 100644
|
||||
--- a/src/core/timer.h
|
||||
+++ b/src/core/timer.h
|
||||
@@ -74,7 +74,6 @@ struct Timer {
|
||||
usec_t next_elapse_realtime;
|
||||
|
||||
TimerState state, deserialized_state;
|
||||
- UnitRef unit;
|
||||
|
||||
Watch monotonic_watch;
|
||||
Watch realtime_watch;
|
||||
@@ -82,8 +81,6 @@ struct Timer {
|
||||
TimerResult result;
|
||||
};
|
||||
|
||||
-void timer_unit_notify(Unit *u, UnitActiveState new_state);
|
||||
-
|
||||
void timer_free_values(Timer *t);
|
||||
|
||||
extern const UnitVTable timer_vtable;
|
||||
diff --git a/src/core/unit.c b/src/core/unit.c
|
||||
index 2525f49..4da745b 100644
|
||||
--- a/src/core/unit.c
|
||||
+++ b/src/core/unit.c
|
||||
@@ -1304,7 +1304,7 @@ static void check_unneeded_dependencies(Unit *u) {
|
||||
unit_check_unneeded(other);
|
||||
}
|
||||
|
||||
-void unit_trigger_on_failure(Unit *u) {
|
||||
+void unit_start_on_failure(Unit *u) {
|
||||
Unit *other;
|
||||
Iterator i;
|
||||
|
||||
@@ -1324,6 +1324,17 @@ void unit_trigger_on_failure(Unit *u) {
|
||||
}
|
||||
}
|
||||
|
||||
+void unit_trigger_notify(Unit *u) {
|
||||
+ Unit *other;
|
||||
+ Iterator i;
|
||||
+
|
||||
+ assert(u);
|
||||
+
|
||||
+ SET_FOREACH(other, u->dependencies[UNIT_TRIGGERED_BY], i)
|
||||
+ if (UNIT_VTABLE(other)->trigger_notify)
|
||||
+ UNIT_VTABLE(other)->trigger_notify(other, u);
|
||||
+}
|
||||
+
|
||||
void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_success) {
|
||||
Manager *m;
|
||||
bool unexpected;
|
||||
@@ -1354,9 +1365,6 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
|
||||
u->active_enter_timestamp = ts;
|
||||
else if (UNIT_IS_ACTIVE_OR_RELOADING(os) && !UNIT_IS_ACTIVE_OR_RELOADING(ns))
|
||||
u->active_exit_timestamp = ts;
|
||||
-
|
||||
- timer_unit_notify(u, ns);
|
||||
- path_unit_notify(u, ns);
|
||||
}
|
||||
|
||||
if (UNIT_IS_INACTIVE_OR_FAILED(ns))
|
||||
@@ -1461,7 +1469,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
|
||||
if (ns != os && ns == UNIT_FAILED) {
|
||||
log_notice_unit(u->id,
|
||||
"MESSAGE=Unit %s entered failed state.", u->id);
|
||||
- unit_trigger_on_failure(u);
|
||||
+ unit_start_on_failure(u);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1512,6 +1520,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
|
||||
}
|
||||
|
||||
manager_recheck_journal(m);
|
||||
+ unit_trigger_notify(u);
|
||||
|
||||
/* Maybe we finished startup and are now ready for being
|
||||
* stopped because unneeded? */
|
||||
diff --git a/src/core/unit.h b/src/core/unit.h
|
||||
index a972a31..51a8364 100644
|
||||
--- a/src/core/unit.h
|
||||
+++ b/src/core/unit.h
|
||||
@@ -352,7 +352,7 @@ struct UnitVTable {
|
||||
/* Called whenever a process of this unit sends us a message */
|
||||
void (*notify_message)(Unit *u, pid_t pid, char **tags);
|
||||
|
||||
- /* Called whenever a name thus Unit registered for comes or
|
||||
+ /* Called whenever a name this Unit registered for comes or
|
||||
* goes away. */
|
||||
void (*bus_name_owner_change)(Unit *u, const char *name, const char *old_owner, const char *new_owner);
|
||||
|
||||
@@ -368,6 +368,10 @@ struct UnitVTable {
|
||||
/* Return the set of units that are following each other */
|
||||
int (*following_set)(Unit *u, Set **s);
|
||||
|
||||
+ /* Invoked each time a unit this unit is triggering changes
|
||||
+ * state or gains/loses a job */
|
||||
+ void (*trigger_notify)(Unit *u, Unit *trigger);
|
||||
+
|
||||
/* Called whenever CLOCK_REALTIME made a jump */
|
||||
void (*time_change)(Unit *u);
|
||||
|
||||
@@ -417,6 +421,8 @@ extern const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX];
|
||||
/* For casting the various unit types into a unit */
|
||||
#define UNIT(u) (&(u)->meta)
|
||||
|
||||
+#define UNIT_TRIGGER(u) ((Unit*) set_first((u)->dependencies[UNIT_TRIGGERS]))
|
||||
+
|
||||
DEFINE_CAST(SOCKET, Socket);
|
||||
DEFINE_CAST(TIMER, Timer);
|
||||
DEFINE_CAST(SERVICE, Service);
|
||||
@@ -540,7 +546,8 @@ char *unit_default_cgroup_path(Unit *u);
|
||||
|
||||
int unit_following_set(Unit *u, Set **s);
|
||||
|
||||
-void unit_trigger_on_failure(Unit *u);
|
||||
+void unit_start_on_failure(Unit *u);
|
||||
+void unit_trigger_notify(Unit *u);
|
||||
|
||||
bool unit_condition_test(Unit *u);
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
From 9f5510ae6e4da4418430a35cf8940cc80fb62536 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 23 Apr 2013 17:42:31 -0300
|
||||
Subject: [PATCH] timer: make sure we restart timers even if units are still
|
||||
running or if one of their conditions fails (cherry picked from commit
|
||||
e41e194340f9a8dbd982b5030449281c3c8bf0dd)
|
||||
|
||||
Conflicts:
|
||||
TODO
|
||||
---
|
||||
src/core/timer.c | 30 ++++++++++++++++++------------
|
||||
src/core/timer.h | 2 ++
|
||||
2 files changed, 20 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/core/timer.c b/src/core/timer.c
|
||||
index b5d895f..b8039d8 100644
|
||||
--- a/src/core/timer.c
|
||||
+++ b/src/core/timer.c
|
||||
@@ -251,11 +251,6 @@ static void timer_enter_waiting(Timer *t, bool initial) {
|
||||
if (r < 0)
|
||||
continue;
|
||||
|
||||
- if (!initial && v->next_elapse < ts.realtime) {
|
||||
- v->disabled = true;
|
||||
- continue;
|
||||
- }
|
||||
-
|
||||
if (!found_realtime)
|
||||
t->next_elapse_realtime = v->next_elapse;
|
||||
else
|
||||
@@ -284,18 +279,26 @@ static void timer_enter_waiting(Timer *t, bool initial) {
|
||||
|
||||
case TIMER_UNIT_ACTIVE:
|
||||
|
||||
- if (UNIT_TRIGGER(UNIT(t))->inactive_exit_timestamp.monotonic <= 0)
|
||||
+ base = UNIT_TRIGGER(UNIT(t))->inactive_exit_timestamp.monotonic;
|
||||
+
|
||||
+ if (base <= 0)
|
||||
+ base = t->last_trigger_monotonic;
|
||||
+
|
||||
+ if (base <= 0)
|
||||
continue;
|
||||
|
||||
- base = UNIT_TRIGGER(UNIT(t))->inactive_exit_timestamp.monotonic;
|
||||
break;
|
||||
|
||||
case TIMER_UNIT_INACTIVE:
|
||||
|
||||
- if (UNIT_TRIGGER(UNIT(t))->inactive_enter_timestamp.monotonic <= 0)
|
||||
+ base = UNIT_TRIGGER(UNIT(t))->inactive_enter_timestamp.monotonic;
|
||||
+
|
||||
+ if (base <= 0)
|
||||
+ base = t->last_trigger_monotonic;
|
||||
+
|
||||
+ if (base <= 0)
|
||||
continue;
|
||||
|
||||
- base = UNIT_TRIGGER(UNIT(t))->inactive_enter_timestamp.monotonic;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -304,7 +307,10 @@ static void timer_enter_waiting(Timer *t, bool initial) {
|
||||
|
||||
v->next_elapse = base + v->value;
|
||||
|
||||
- if (!initial && v->next_elapse < ts.monotonic) {
|
||||
+ if (!initial &&
|
||||
+ v->next_elapse < ts.monotonic &&
|
||||
+ (v->base == TIMER_ACTIVE || v->base == TIMER_BOOT || v->base == TIMER_STARTUP)) {
|
||||
+ /* This is a one time trigger, disable it now */
|
||||
v->disabled = true;
|
||||
continue;
|
||||
}
|
||||
@@ -376,6 +382,8 @@ static void timer_enter_running(Timer *t) {
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
+ t->last_trigger_monotonic = now(CLOCK_MONOTONIC);
|
||||
+
|
||||
timer_set_state(t, TIMER_RUNNING);
|
||||
return;
|
||||
|
||||
@@ -488,8 +496,6 @@ static void timer_trigger_notify(Unit *u, Unit *other) {
|
||||
assert(u);
|
||||
assert(other);
|
||||
|
||||
- log_error("NOTIFY!");
|
||||
-
|
||||
if (other->load_state != UNIT_LOADED)
|
||||
return;
|
||||
|
||||
diff --git a/src/core/timer.h b/src/core/timer.h
|
||||
index 163bd6c..fed15e9 100644
|
||||
--- a/src/core/timer.h
|
||||
+++ b/src/core/timer.h
|
||||
@@ -79,6 +79,8 @@ struct Timer {
|
||||
Watch realtime_watch;
|
||||
|
||||
TimerResult result;
|
||||
+
|
||||
+ usec_t last_trigger_monotonic;
|
||||
};
|
||||
|
||||
void timer_free_values(Timer *t);
|
|
@ -0,0 +1,106 @@
|
|||
From db97c7f66ef2f75ac6c268339e044590d7a08920 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Wed, 24 Apr 2013 15:23:01 -0300
|
||||
Subject: [PATCH] logind: don't busy loop if a job is still running but the
|
||||
delay timeout expires (cherry picked from commit
|
||||
842865365e598a090045894f8990fd384e801ccb)
|
||||
|
||||
---
|
||||
src/core/dbus-job.c | 17 +++++++----------
|
||||
src/login/logind-dbus.c | 3 +--
|
||||
src/login/logind.c | 2 +-
|
||||
3 files changed, 9 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/core/dbus-job.c b/src/core/dbus-job.c
|
||||
index 096542b..98ccfa6 100644
|
||||
--- a/src/core/dbus-job.c
|
||||
+++ b/src/core/dbus-job.c
|
||||
@@ -218,7 +218,7 @@ const DBusObjectPathVTable bus_job_vtable = {
|
||||
};
|
||||
|
||||
static int job_send_message(Job *j, DBusMessage* (*new_message)(Job *j)) {
|
||||
- DBusMessage *m = NULL;
|
||||
+ _cleanup_dbus_message_unref_ DBusMessage *m = NULL;
|
||||
int r;
|
||||
|
||||
assert(j);
|
||||
@@ -227,9 +227,9 @@ static int job_send_message(Job *j, DBusMessage* (*new_message)(Job *j)) {
|
||||
if (bus_has_subscriber(j->manager) || j->forgot_bus_clients) {
|
||||
m = new_message(j);
|
||||
if (!m)
|
||||
- goto oom;
|
||||
+ return -ENOMEM;
|
||||
+
|
||||
r = bus_broadcast(j->manager, m);
|
||||
- dbus_message_unref(m);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@@ -238,18 +238,19 @@ static int job_send_message(Job *j, DBusMessage* (*new_message)(Job *j)) {
|
||||
* to the client(s) which created the job */
|
||||
JobBusClient *cl;
|
||||
assert(j->bus_client_list);
|
||||
+
|
||||
LIST_FOREACH(client, cl, j->bus_client_list) {
|
||||
assert(cl->bus);
|
||||
|
||||
m = new_message(j);
|
||||
if (!m)
|
||||
- goto oom;
|
||||
+ return -ENOMEM;
|
||||
|
||||
if (!dbus_message_set_destination(m, cl->name))
|
||||
- goto oom;
|
||||
+ return -ENOMEM;
|
||||
|
||||
if (!dbus_connection_send(cl->bus, m, NULL))
|
||||
- goto oom;
|
||||
+ return -ENOMEM;
|
||||
|
||||
dbus_message_unref(m);
|
||||
m = NULL;
|
||||
@@ -257,10 +258,6 @@ static int job_send_message(Job *j, DBusMessage* (*new_message)(Job *j)) {
|
||||
}
|
||||
|
||||
return 0;
|
||||
-oom:
|
||||
- if (m)
|
||||
- dbus_message_unref(m);
|
||||
- return -ENOMEM;
|
||||
}
|
||||
|
||||
static DBusMessage* new_change_signal_message(Job *j) {
|
||||
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
|
||||
index 775a50f..2c7813a 100644
|
||||
--- a/src/login/logind-dbus.c
|
||||
+++ b/src/login/logind-dbus.c
|
||||
@@ -2380,7 +2380,6 @@ DBusHandlerResult bus_message_filter(
|
||||
log_error("Failed to parse JobRemoved message: %s", bus_error_message(&error));
|
||||
|
||||
else if (m->action_job && streq(m->action_job, path)) {
|
||||
-
|
||||
log_info("Operation finished.");
|
||||
|
||||
/* Tell people that they now may take a lock again */
|
||||
@@ -2421,7 +2420,7 @@ int manager_dispatch_delayed(Manager *manager) {
|
||||
|
||||
assert(manager);
|
||||
|
||||
- if (!manager->action_unit || manager->action_job)
|
||||
+ if (manager->action_what == 0 || manager->action_job)
|
||||
return 0;
|
||||
|
||||
/* Continue delay? */
|
||||
diff --git a/src/login/logind.c b/src/login/logind.c
|
||||
index 2bad122..7f87133 100644
|
||||
--- a/src/login/logind.c
|
||||
+++ b/src/login/logind.c
|
||||
@@ -1625,7 +1625,7 @@ int manager_run(Manager *m) {
|
||||
|
||||
manager_gc(m, true);
|
||||
|
||||
- if (m->action_what != 0) {
|
||||
+ if (m->action_what != 0 && !m->action_job) {
|
||||
usec_t x, y;
|
||||
|
||||
x = now(CLOCK_MONOTONIC);
|
|
@ -0,0 +1,25 @@
|
|||
From 9cd67f9df462881fd99afa7ad4e167f7656b5f67 Mon Sep 17 00:00:00 2001
|
||||
From: Mirco Tischler <mt-ml@gmx.de>
|
||||
Date: Thu, 25 Apr 2013 15:14:57 +0200
|
||||
Subject: [PATCH] core: remove duplicate MESSAGE= from log message
|
||||
|
||||
This was needed with log_struct_unit() but log_notice_unit() adds it
|
||||
anyway.
|
||||
(cherry picked from commit fcf8c44041a5138a170f9a442809c032259a26b1)
|
||||
---
|
||||
src/core/unit.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/unit.c b/src/core/unit.c
|
||||
index 4da745b..11c00ca 100644
|
||||
--- a/src/core/unit.c
|
||||
+++ b/src/core/unit.c
|
||||
@@ -1468,7 +1468,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
|
||||
|
||||
if (ns != os && ns == UNIT_FAILED) {
|
||||
log_notice_unit(u->id,
|
||||
- "MESSAGE=Unit %s entered failed state.", u->id);
|
||||
+ "Unit %s entered failed state.", u->id);
|
||||
unit_start_on_failure(u);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
From 775334bc92e0acfd9fdc88973a628358b41cc6c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 29 Apr 2013 19:46:19 -0400
|
||||
Subject: [PATCH] man: clarify what Restart= means
|
||||
|
||||
Related to https://bugzilla.redhat.com/show_bug.cgi?id=957135.
|
||||
(cherry picked from commit a827e37371be78ba7eda63fa6edca1074c431524)
|
||||
---
|
||||
man/systemd.service.xml | 77 ++++++++++++++++++++++++++++++++++---------------
|
||||
src/core/service.c | 3 ++
|
||||
2 files changed, 56 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
|
||||
index b82a5c1..09d1d5f 100644
|
||||
--- a/man/systemd.service.xml
|
||||
+++ b/man/systemd.service.xml
|
||||
@@ -553,8 +553,8 @@
|
||||
<varlistentry>
|
||||
<term><varname>WatchdogSec=</varname></term>
|
||||
<listitem><para>Configures the
|
||||
- watchdog timeout for a service. This
|
||||
- is activated when the start-up is
|
||||
+ watchdog timeout for a service. The
|
||||
+ watchdog is activated when the start-up is
|
||||
completed. The service must call
|
||||
<citerefentry><refentrytitle>sd_notify</refentrytitle><manvolnum>3</manvolnum></citerefentry>
|
||||
regularly with "WATCHDOG=1" (i.e. the
|
||||
@@ -588,37 +588,66 @@
|
||||
<varlistentry>
|
||||
<term><varname>Restart=</varname></term>
|
||||
<listitem><para>Configures whether the
|
||||
- main service process shall be
|
||||
- restarted when it exits. Takes one of
|
||||
+ service shall be restarted when the
|
||||
+ service process exits, is killed,
|
||||
+ or a timeout is reached. The service
|
||||
+ process may be the main service
|
||||
+ process, but also one of the processes
|
||||
+ specified with
|
||||
+ <varname>ExecStartPre=</varname>,
|
||||
+ <varname>ExecStartPost=</varname>,
|
||||
+ <varname>ExecStopPre=</varname>,
|
||||
+ <varname>ExecStopPost=</varname>, or
|
||||
+ <varname>ExecReload=</varname>.
|
||||
+ When the death of the process is a
|
||||
+ result of systemd operation (e.g. service
|
||||
+ stop or restart), the service will not be
|
||||
+ restarted. Timeouts include missing
|
||||
+ the watchdog "keep-alive ping"
|
||||
+ deadline and a service start, reload,
|
||||
+ and stop operation timeouts.</para>
|
||||
+
|
||||
+ <para>Takes one of
|
||||
<option>no</option>,
|
||||
<option>on-success</option>,
|
||||
<option>on-failure</option>,
|
||||
- <option>on-abort</option> or
|
||||
+ <option>on-abort</option>, or
|
||||
<option>always</option>. If set to
|
||||
<option>no</option> (the default) the
|
||||
- service will not be restarted when it
|
||||
- exits. If set to
|
||||
+ service will not be restarted. If set to
|
||||
<option>on-success</option> it will be
|
||||
- restarted only when it exited cleanly,
|
||||
- i.e. terminated with an exit code of
|
||||
- 0. If set to
|
||||
- <option>on-failure</option> it will be
|
||||
- restarted only when it exited with an
|
||||
- exit code not equaling 0, when
|
||||
- terminated by a signal (including on
|
||||
+ restarted only when the service process
|
||||
+ exits cleanly.
|
||||
+ In this context, a clean exit means
|
||||
+ an exit code of 0, or one of the signals
|
||||
+ SIGHUP, SIGINT, SIGTERM, or SIGPIPE, and
|
||||
+ additonally, exit statuses and signals
|
||||
+ specified in <varname>SuccessExitStatus=</varname>.
|
||||
+ If set to <option>on-failure</option>
|
||||
+ the service will be restarted when the
|
||||
+ process exits with an nonzero exit code,
|
||||
+ is terminated by a signal (including on
|
||||
core dump), when an operation (such as
|
||||
- service reload) times out or when the
|
||||
- configured watchdog timeout is
|
||||
- triggered. If set to
|
||||
- <option>on-abort</option> it will be
|
||||
- restarted only if it exits due to
|
||||
- reception of an uncaught signal
|
||||
- (including on core dump). If set to
|
||||
+ service reload) times out, and when the
|
||||
+ configured watchdog timeout is triggered.
|
||||
+ If set to
|
||||
+ <option>on-abort</option> the service
|
||||
+ will be restarted only if the service
|
||||
+ process exits due to an uncaught
|
||||
+ signal not specified as a clean exit
|
||||
+ status.
|
||||
+ If set to
|
||||
<option>always</option> the service
|
||||
will be restarted regardless whether
|
||||
it exited cleanly or not, got
|
||||
terminated abnormally by a signal or
|
||||
- hit a timeout.</para></listitem>
|
||||
+ hit a timeout.</para>
|
||||
+
|
||||
+ <para>In addition to the above settings,
|
||||
+ the service will not be restarted if the
|
||||
+ exit code or signal is specified in
|
||||
+ <varname>RestartPreventExitStatus=</varname>
|
||||
+ (see below).</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
@@ -631,8 +660,8 @@
|
||||
code 0 and the signals SIGHUP, SIGINT,
|
||||
SIGTERM and SIGPIPE. Exit status
|
||||
definitions can either be numeric exit
|
||||
- codes or termination signal names, and
|
||||
- are separated by spaces. Example:
|
||||
+ codes or termination signal names,
|
||||
+ separated by spaces. Example:
|
||||
"<literal>SuccessExitStatus=1 2 8
|
||||
SIGKILL</literal>", ensures that exit
|
||||
codes 1, 2, 8 and the termination
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index 9ceff42..9682fc3 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -1479,6 +1479,9 @@ static int service_search_main_pid(Service *s) {
|
||||
r = unit_watch_pid(UNIT(s), pid);
|
||||
if (r < 0)
|
||||
/* FIXME: we need to do something here */
|
||||
+ log_warning_unit(UNIT(s)->id,
|
||||
+ "Failed to watch PID %lu from service %s",
|
||||
+ (unsigned long) pid, UNIT(s)->id);
|
||||
return r;
|
||||
|
||||
return 0;
|
|
@ -0,0 +1,57 @@
|
|||
From a32aaed144e387ab9464134ee95469174b33d5fd Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 29 Apr 2013 20:55:34 -0300
|
||||
Subject: [PATCH] man: improve documentation for specifiers (cherry picked from
|
||||
commit 0df2d38abfc787f40149072340d79b4f7b682a24)
|
||||
|
||||
---
|
||||
man/systemd.unit.xml | 19 ++++++-------------
|
||||
1 file changed, 6 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
|
||||
index 47c5031..0dccb97 100644
|
||||
--- a/man/systemd.unit.xml
|
||||
+++ b/man/systemd.unit.xml
|
||||
@@ -1233,7 +1233,7 @@
|
||||
<row>
|
||||
<entry><literal>%f</literal></entry>
|
||||
<entry>Unescaped file name</entry>
|
||||
- <entry>This is either the unescaped instance name (if applicable) with / prepended (if applicable), or the prefix name similarly prepended with /.</entry>
|
||||
+ <entry>This is either the unescaped instance name (if applicable) with <filename>/</filename> prepended (if applicable), or the prefix name similarly prepended with <filename>/</filename>.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%c</literal></entry>
|
||||
@@ -1242,13 +1242,13 @@
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%r</literal></entry>
|
||||
- <entry>Root control group path of systemd</entry>
|
||||
- <entry></entry>
|
||||
+ <entry>Root control group path where units are placed.</entry>
|
||||
+ <entry>For system instances this usually resolves to <filename>/system</filename>, except in containers, where the path might be prefixed with the container's root control group.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%R</literal></entry>
|
||||
- <entry>Parent directory of the root control group path of systemd</entry>
|
||||
- <entry></entry>
|
||||
+ <entry>Parent directory of the control group path where units are placed.</entry>
|
||||
+ <entry>For system instances this usually resolves to <filename>/</filename>, except in containers, where this resolves to the container's root directory. This specifier is particularly useful in the <varname>ControlGroup=</varname> setting (see <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>).</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%t</literal></entry>
|
||||
@@ -1273,14 +1273,7 @@
|
||||
<row>
|
||||
<entry><literal>%s</literal></entry>
|
||||
<entry>User shell</entry>
|
||||
- <entry>This is the shell of the configured
|
||||
- user of the unit, or (if none is set) the user
|
||||
- running the systemd instance. If the user is
|
||||
- <literal>root</literal> (UID equal to 0), the
|
||||
- shell configured in account database is
|
||||
- ignored and <filename>/bin/sh</filename> is
|
||||
- always used.
|
||||
- </entry>
|
||||
+ <entry>This is the shell of the configured user of the unit, or (if none is set) the user running the systemd instance. If the user is <literal>root</literal> (UID equal to 0), the shell configured in account database is ignored and <filename>/bin/sh</filename> is always used.</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>%m</literal></entry>
|
|
@ -0,0 +1,39 @@
|
|||
From 13aaa0295c40ae29c014021b022ea0e722bbfbd5 Mon Sep 17 00:00:00 2001
|
||||
From: Ronny Chevalier <rchevalier@aldebaran-robotics.com>
|
||||
Date: Wed, 24 Apr 2013 15:17:19 +0200
|
||||
Subject: [PATCH] dbus-execute: fix introspection
|
||||
|
||||
Add missing property and remove duplicate properties already in
|
||||
src/core/dbus-kill.h
|
||||
(cherry picked from commit 92dd3633b4257ccd82da662a64c24cbc73668c32)
|
||||
---
|
||||
src/core/dbus-execute.h | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/core/dbus-execute.h b/src/core/dbus-execute.h
|
||||
index eaa1b73..91d70e5 100644
|
||||
--- a/src/core/dbus-execute.h
|
||||
+++ b/src/core/dbus-execute.h
|
||||
@@ -37,6 +37,7 @@
|
||||
|
||||
#define BUS_EXEC_CONTEXT_INTERFACE \
|
||||
" <property name=\"Environment\" type=\"as\" access=\"read\"/>\n" \
|
||||
+ " <property name=\"EnvironmentFiles\" type=\"a(sb)\" access=\"read\"/>\n" \
|
||||
" <property name=\"UMask\" type=\"u\" access=\"read\"/>\n" \
|
||||
" <property name=\"LimitCPU\" type=\"t\" access=\"read\"/>\n" \
|
||||
" <property name=\"LimitFSIZE\" type=\"t\" access=\"read\"/>\n" \
|
||||
@@ -88,13 +89,11 @@
|
||||
" <property name=\"InaccessibleDirectories\" type=\"as\" access=\"read\"/>\n" \
|
||||
" <property name=\"MountFlags\" type=\"t\" access=\"read\"/>\n" \
|
||||
" <property name=\"PrivateTmp\" type=\"b\" access=\"read\"/>\n" \
|
||||
+ " <property name=\"PrivateNetwork\" type=\"b\" access=\"read\"/>\n" \
|
||||
" <property name=\"SameProcessGroup\" type=\"b\" access=\"read\"/>\n" \
|
||||
- " <property name=\"KillMode\" type=\"s\" access=\"read\"/>\n" \
|
||||
- " <property name=\"KillSignal\" type=\"i\" access=\"read\"/>\n" \
|
||||
" <property name=\"UtmpIdentifier\" type=\"s\" access=\"read\"/>\n" \
|
||||
" <property name=\"ControlGroupModify\" type=\"b\" access=\"read\"/>\n" \
|
||||
" <property name=\"ControlGroupPersistent\" type=\"b\" access=\"read\"/>\n" \
|
||||
- " <property name=\"PrivateNetwork\" type=\"b\" access=\"read\"/>\n" \
|
||||
" <property name=\"IgnoreSIGPIPE\" type=\"b\" access=\"read\"/>\n" \
|
||||
" <property name=\"NoNewPrivileges\" type=\"b\" access=\"read\"/>\n" \
|
||||
" <property name=\"SystemCallFilter\" type=\"au\" access=\"read\"/>\n"
|
|
@ -0,0 +1,218 @@
|
|||
From 5ecec44b34f269657ff354b6cf4fbb1c481c0f55 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 25 Apr 2013 21:57:41 -0300
|
||||
Subject: [PATCH] unit: rework stop pending logic
|
||||
|
||||
When a trigger unit wants to know if a stop is queued for it, we should
|
||||
just check precisely that and do not check whether it is actually
|
||||
stopped already. This is because we use these checks usually from state
|
||||
change calls where the state variables are not updated yet.
|
||||
|
||||
This change splits unit_pending_inactive() into two calls
|
||||
unit_inactive_or_pending() and unit_stop_pending(). The former checks
|
||||
state and pending jobs, the latter only pending jobs.
|
||||
(cherry picked from commit 31afa0a44c2d7f93d837c840cdbd623982ac165f)
|
||||
---
|
||||
src/core/automount.c | 2 +-
|
||||
src/core/dbus.c | 4 ++--
|
||||
src/core/manager.c | 4 ++--
|
||||
src/core/manager.h | 2 +-
|
||||
src/core/path.c | 2 +-
|
||||
src/core/socket.c | 4 ++--
|
||||
src/core/timer.c | 2 +-
|
||||
src/core/unit.c | 29 +++++++++++++++++++----------
|
||||
src/core/unit.h | 5 +++--
|
||||
9 files changed, 32 insertions(+), 22 deletions(-)
|
||||
|
||||
diff --git a/src/core/automount.c b/src/core/automount.c
|
||||
index e6eedda..a20d534 100644
|
||||
--- a/src/core/automount.c
|
||||
+++ b/src/core/automount.c
|
||||
@@ -593,7 +593,7 @@ static void automount_enter_runnning(Automount *a) {
|
||||
|
||||
/* We don't take mount requests anymore if we are supposed to
|
||||
* shut down anyway */
|
||||
- if (unit_pending_inactive(UNIT(a))) {
|
||||
+ if (unit_stop_pending(UNIT(a))) {
|
||||
log_debug_unit(UNIT(a)->id,
|
||||
"Suppressing automount request on %s since unit stop is scheduled.", UNIT(a)->id);
|
||||
automount_send_ready(a, -EHOSTDOWN);
|
||||
diff --git a/src/core/dbus.c b/src/core/dbus.c
|
||||
index 67ab1ae..5a61a1a 100644
|
||||
--- a/src/core/dbus.c
|
||||
+++ b/src/core/dbus.c
|
||||
@@ -363,8 +363,8 @@ static DBusHandlerResult api_bus_message_filter(DBusConnection *connection, DBus
|
||||
|
||||
log_debug("Got D-Bus activation request for %s", name);
|
||||
|
||||
- if (manager_unit_pending_inactive(m, SPECIAL_DBUS_SERVICE) ||
|
||||
- manager_unit_pending_inactive(m, SPECIAL_DBUS_SOCKET)) {
|
||||
+ if (manager_unit_inactive_or_pending(m, SPECIAL_DBUS_SERVICE) ||
|
||||
+ manager_unit_inactive_or_pending(m, SPECIAL_DBUS_SOCKET)) {
|
||||
r = -EADDRNOTAVAIL;
|
||||
dbus_set_error(&error, BUS_ERROR_SHUTTING_DOWN, "Refusing activation, D-Bus is shutting down.");
|
||||
} else {
|
||||
diff --git a/src/core/manager.c b/src/core/manager.c
|
||||
index f8d097e..d2582c8 100644
|
||||
--- a/src/core/manager.c
|
||||
+++ b/src/core/manager.c
|
||||
@@ -2337,7 +2337,7 @@ void manager_reset_failed(Manager *m) {
|
||||
unit_reset_failed(u);
|
||||
}
|
||||
|
||||
-bool manager_unit_pending_inactive(Manager *m, const char *name) {
|
||||
+bool manager_unit_inactive_or_pending(Manager *m, const char *name) {
|
||||
Unit *u;
|
||||
|
||||
assert(m);
|
||||
@@ -2348,7 +2348,7 @@ bool manager_unit_pending_inactive(Manager *m, const char *name) {
|
||||
if (!u)
|
||||
return true;
|
||||
|
||||
- return unit_pending_inactive(u);
|
||||
+ return unit_inactive_or_pending(u);
|
||||
}
|
||||
|
||||
void manager_check_finished(Manager *m) {
|
||||
diff --git a/src/core/manager.h b/src/core/manager.h
|
||||
index 649a8aa..a0be292 100644
|
||||
--- a/src/core/manager.h
|
||||
+++ b/src/core/manager.h
|
||||
@@ -291,7 +291,7 @@ void manager_reset_failed(Manager *m);
|
||||
void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success);
|
||||
void manager_send_unit_plymouth(Manager *m, Unit *u);
|
||||
|
||||
-bool manager_unit_pending_inactive(Manager *m, const char *name);
|
||||
+bool manager_unit_inactive_or_pending(Manager *m, const char *name);
|
||||
|
||||
void manager_check_finished(Manager *m);
|
||||
|
||||
diff --git a/src/core/path.c b/src/core/path.c
|
||||
index 9d4f4f5..767d654 100644
|
||||
--- a/src/core/path.c
|
||||
+++ b/src/core/path.c
|
||||
@@ -523,7 +523,7 @@ static void path_enter_running(Path *p) {
|
||||
dbus_error_init(&error);
|
||||
|
||||
/* Don't start job if we are supposed to go down */
|
||||
- if (unit_pending_inactive(UNIT(p)))
|
||||
+ if (unit_stop_pending(UNIT(p)))
|
||||
return;
|
||||
|
||||
r = manager_add_job(UNIT(p)->manager, JOB_START, UNIT_TRIGGER(UNIT(p)),
|
||||
diff --git a/src/core/socket.c b/src/core/socket.c
|
||||
index 9f1af1e..c276afe 100644
|
||||
--- a/src/core/socket.c
|
||||
+++ b/src/core/socket.c
|
||||
@@ -1447,7 +1447,7 @@ static void socket_enter_running(Socket *s, int cfd) {
|
||||
|
||||
/* We don't take connections anymore if we are supposed to
|
||||
* shut down anyway */
|
||||
- if (unit_pending_inactive(UNIT(s))) {
|
||||
+ if (unit_stop_pending(UNIT(s))) {
|
||||
log_debug_unit(UNIT(s)->id,
|
||||
"Suppressing connection request on %s since unit stop is scheduled.",
|
||||
UNIT(s)->id);
|
||||
@@ -1478,7 +1478,7 @@ static void socket_enter_running(Socket *s, int cfd) {
|
||||
/* If there's already a start pending don't bother to
|
||||
* do anything */
|
||||
SET_FOREACH(u, UNIT(s)->dependencies[UNIT_TRIGGERS], i)
|
||||
- if (unit_pending_active(u)) {
|
||||
+ if (unit_active_or_pending(u)) {
|
||||
pending = true;
|
||||
break;
|
||||
}
|
||||
diff --git a/src/core/timer.c b/src/core/timer.c
|
||||
index b8039d8..ff8c305 100644
|
||||
--- a/src/core/timer.c
|
||||
+++ b/src/core/timer.c
|
||||
@@ -374,7 +374,7 @@ static void timer_enter_running(Timer *t) {
|
||||
dbus_error_init(&error);
|
||||
|
||||
/* Don't start job if we are supposed to go down */
|
||||
- if (unit_pending_inactive(UNIT(t)))
|
||||
+ if (unit_stop_pending(UNIT(t)))
|
||||
return;
|
||||
|
||||
r = manager_add_job(UNIT(t)->manager, JOB_START, UNIT_TRIGGER(UNIT(t)),
|
||||
diff --git a/src/core/unit.c b/src/core/unit.c
|
||||
index 11c00ca..d5bea83 100644
|
||||
--- a/src/core/unit.c
|
||||
+++ b/src/core/unit.c
|
||||
@@ -1206,19 +1206,19 @@ static void unit_check_unneeded(Unit *u) {
|
||||
return;
|
||||
|
||||
SET_FOREACH(other, u->dependencies[UNIT_REQUIRED_BY], i)
|
||||
- if (unit_pending_active(other))
|
||||
+ if (unit_active_or_pending(other))
|
||||
return;
|
||||
|
||||
SET_FOREACH(other, u->dependencies[UNIT_REQUIRED_BY_OVERRIDABLE], i)
|
||||
- if (unit_pending_active(other))
|
||||
+ if (unit_active_or_pending(other))
|
||||
return;
|
||||
|
||||
SET_FOREACH(other, u->dependencies[UNIT_WANTED_BY], i)
|
||||
- if (unit_pending_active(other))
|
||||
+ if (unit_active_or_pending(other))
|
||||
return;
|
||||
|
||||
SET_FOREACH(other, u->dependencies[UNIT_BOUND_BY], i)
|
||||
- if (unit_pending_active(other))
|
||||
+ if (unit_active_or_pending(other))
|
||||
return;
|
||||
|
||||
log_info_unit(u->id, "Service %s is not needed anymore. Stopping.", u->id);
|
||||
@@ -2635,21 +2635,30 @@ Unit *unit_following(Unit *u) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-bool unit_pending_inactive(Unit *u) {
|
||||
+bool unit_stop_pending(Unit *u) {
|
||||
assert(u);
|
||||
|
||||
- /* Returns true if the unit is inactive or going down */
|
||||
+ /* This call does check the current state of the unit. It's
|
||||
+ * hence useful to be called from state change calls of the
|
||||
+ * unit itself, where the state isn't updated yet. This is
|
||||
+ * different from unit_inactive_or_pending() which checks both
|
||||
+ * the current state and for a queued job. */
|
||||
|
||||
- if (UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u)))
|
||||
- return true;
|
||||
+ return u->job && u->job->type == JOB_STOP;
|
||||
+}
|
||||
+
|
||||
+bool unit_inactive_or_pending(Unit *u) {
|
||||
+ assert(u);
|
||||
+
|
||||
+ /* Returns true if the unit is inactive or going down */
|
||||
|
||||
- if (u->job && u->job->type == JOB_STOP)
|
||||
+ if (unit_stop_pending(u))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
-bool unit_pending_active(Unit *u) {
|
||||
+bool unit_active_or_pending(Unit *u) {
|
||||
assert(u);
|
||||
|
||||
/* Returns true if the unit is active or going up */
|
||||
diff --git a/src/core/unit.h b/src/core/unit.h
|
||||
index 51a8364..12bec03 100644
|
||||
--- a/src/core/unit.h
|
||||
+++ b/src/core/unit.h
|
||||
@@ -537,8 +537,9 @@ void unit_reset_failed(Unit *u);
|
||||
|
||||
Unit *unit_following(Unit *u);
|
||||
|
||||
-bool unit_pending_inactive(Unit *u);
|
||||
-bool unit_pending_active(Unit *u);
|
||||
+bool unit_stop_pending(Unit *u);
|
||||
+bool unit_inactive_or_pending(Unit *u);
|
||||
+bool unit_active_or_pending(Unit *u);
|
||||
|
||||
int unit_add_default_target_dependency(Unit *u, Unit *target);
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
From f44089f615005ec6be8b6c86b37385d8270441c6 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 3 May 2013 16:32:41 +0200
|
||||
Subject: [PATCH] core: bump simultaneous bus connection limit to 512 (cherry
|
||||
picked from commit 417b1a62ed9ca700a180f27ed6ea8e972194b9ad)
|
||||
|
||||
---
|
||||
src/core/dbus.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/dbus.c b/src/core/dbus.c
|
||||
index 5a61a1a..1272c93 100644
|
||||
--- a/src/core/dbus.c
|
||||
+++ b/src/core/dbus.c
|
||||
@@ -48,7 +48,7 @@
|
||||
#include "special.h"
|
||||
#include "dbus-common.h"
|
||||
|
||||
-#define CONNECTIONS_MAX 52
|
||||
+#define CONNECTIONS_MAX 512
|
||||
|
||||
/* Well-known address (http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-types) */
|
||||
#define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
|
|
@ -0,0 +1,489 @@
|
|||
From e56286fb774a0bfd858517ea7cb30b8fe032938b Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
Date: Mon, 6 May 2013 17:39:07 +0200
|
||||
Subject: [PATCH] hwdb: update (cherry picked from commit
|
||||
07125a9240088f7859b18908cc7d07e396947e24)
|
||||
|
||||
---
|
||||
hwdb/20-OUI.hwdb | 90 +++++++++++++++++++++++++++++++++++++++++++
|
||||
hwdb/20-pci-vendor-model.hwdb | 70 +++++++++++++++++++++++----------
|
||||
2 files changed, 140 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/hwdb/20-OUI.hwdb b/hwdb/20-OUI.hwdb
|
||||
index 91d2668..72795c6 100644
|
||||
--- a/hwdb/20-OUI.hwdb
|
||||
+++ b/hwdb/20-OUI.hwdb
|
||||
@@ -12892,6 +12892,30 @@ OUI:40D8550E7*
|
||||
OUI:40D8550E8*
|
||||
ID_OUI_FROM_DATABASE=HEITEC AG
|
||||
|
||||
+OUI:40D8550E9*
|
||||
+ ID_OUI_FROM_DATABASE=HAMEG GmbH
|
||||
+
|
||||
+OUI:40D8550EA*
|
||||
+ ID_OUI_FROM_DATABASE=A-Z-E
|
||||
+
|
||||
+OUI:40D8550EB*
|
||||
+ ID_OUI_FROM_DATABASE=WANTECH Networks
|
||||
+
|
||||
+OUI:40D8550EC*
|
||||
+ ID_OUI_FROM_DATABASE=Sentry 360 Security
|
||||
+
|
||||
+OUI:40D8550ED*
|
||||
+ ID_OUI_FROM_DATABASE=IntelliDesign Pty Ltd
|
||||
+
|
||||
+OUI:40D8550EE*
|
||||
+ ID_OUI_FROM_DATABASE=Siegmar Zander HuSWare
|
||||
+
|
||||
+OUI:40D8550EF*
|
||||
+ ID_OUI_FROM_DATABASE=GeneSys Elektronik GmbH
|
||||
+
|
||||
+OUI:40D8550F0*
|
||||
+ ID_OUI_FROM_DATABASE=Redwood Systems
|
||||
+
|
||||
OUI:000000*
|
||||
ID_OUI_FROM_DATABASE=XEROX CORPORATION
|
||||
|
||||
@@ -51001,6 +51025,9 @@ OUI:048A15*
|
||||
OUI:048B42*
|
||||
ID_OUI_FROM_DATABASE=Skspruce Technology Limited
|
||||
|
||||
+OUI:048C03*
|
||||
+ ID_OUI_FROM_DATABASE=ThinPAD Technology (Shenzhen)CO.,LTD
|
||||
+
|
||||
OUI:048D38*
|
||||
ID_OUI_FROM_DATABASE=Netcore Technology Inc.
|
||||
|
||||
@@ -52069,6 +52096,9 @@ OUI:1000E8*
|
||||
OUI:1000FD*
|
||||
ID_OUI_FROM_DATABASE=LaonPeople
|
||||
|
||||
+OUI:1001CA*
|
||||
+ ID_OUI_FROM_DATABASE=Ashley Butterworth
|
||||
+
|
||||
OUI:10090C*
|
||||
ID_OUI_FROM_DATABASE=Janome Sewing Machine Co., Ltd.
|
||||
|
||||
@@ -53323,6 +53353,9 @@ OUI:24694A*
|
||||
OUI:2469A5*
|
||||
ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
|
||||
|
||||
+OUI:246AAB*
|
||||
+ ID_OUI_FROM_DATABASE=IT-IS International
|
||||
+
|
||||
OUI:24767D*
|
||||
ID_OUI_FROM_DATABASE=Cisco SPVTG
|
||||
|
||||
@@ -53689,6 +53722,9 @@ OUI:28EE2C*
|
||||
OUI:28F358*
|
||||
ID_OUI_FROM_DATABASE=2C - Trifonov & Co
|
||||
|
||||
+OUI:28F532*
|
||||
+ ID_OUI_FROM_DATABASE=ADD-Engineering BV
|
||||
+
|
||||
OUI:28F606*
|
||||
ID_OUI_FROM_DATABASE=Syes srl
|
||||
|
||||
@@ -54307,6 +54343,9 @@ OUI:34C803*
|
||||
OUI:34C99D*
|
||||
ID_OUI_FROM_DATABASE=EIDOLON COMMUNICATIONS TECHNOLOGY CO. LTD.
|
||||
|
||||
+OUI:34CD6D*
|
||||
+ ID_OUI_FROM_DATABASE=CommSky Technologies
|
||||
+
|
||||
OUI:34CDBE*
|
||||
ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
|
||||
|
||||
@@ -54403,6 +54442,9 @@ OUI:3831AC*
|
||||
OUI:383F10*
|
||||
ID_OUI_FROM_DATABASE=DBL Technology Ltd.
|
||||
|
||||
+OUI:384233*
|
||||
+ ID_OUI_FROM_DATABASE=Wildeboer Bauteile GmbH
|
||||
+
|
||||
OUI:384369*
|
||||
ID_OUI_FROM_DATABASE=Patrol Products Consortium LLC
|
||||
|
||||
@@ -54673,6 +54715,9 @@ OUI:3C83B5*
|
||||
OUI:3C86A8*
|
||||
ID_OUI_FROM_DATABASE=Sangshin elecom .co,, LTD
|
||||
|
||||
+OUI:3C8AB0*
|
||||
+ ID_OUI_FROM_DATABASE=Juniper Networks
|
||||
+
|
||||
OUI:3C8AE5*
|
||||
ID_OUI_FROM_DATABASE=Tensun Information Technology(Hangzhou) Co.,LTD
|
||||
|
||||
@@ -54799,6 +54844,9 @@ OUI:4007C0*
|
||||
OUI:400E67*
|
||||
ID_OUI_FROM_DATABASE=Tremol Ltd.
|
||||
|
||||
+OUI:400E85*
|
||||
+ ID_OUI_FROM_DATABASE=Samsung Electro Mechanics co.,LTD.
|
||||
+
|
||||
OUI:4012E4*
|
||||
ID_OUI_FROM_DATABASE=Compass-EOS
|
||||
|
||||
@@ -55816,6 +55864,9 @@ OUI:50934F*
|
||||
OUI:509772*
|
||||
ID_OUI_FROM_DATABASE=Westinghouse Digital
|
||||
|
||||
+OUI:509871*
|
||||
+ ID_OUI_FROM_DATABASE=Inventum Technologies Private Limited
|
||||
+
|
||||
OUI:509F27*
|
||||
ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
|
||||
|
||||
@@ -55921,6 +55972,9 @@ OUI:541FD5*
|
||||
OUI:542018*
|
||||
ID_OUI_FROM_DATABASE=Tely Labs
|
||||
|
||||
+OUI:542160*
|
||||
+ ID_OUI_FROM_DATABASE=Resolution Products
|
||||
+
|
||||
OUI:542696*
|
||||
ID_OUI_FROM_DATABASE=Apple
|
||||
|
||||
@@ -56614,6 +56668,9 @@ OUI:6063FD*
|
||||
OUI:606720*
|
||||
ID_OUI_FROM_DATABASE=Intel Corporate
|
||||
|
||||
+OUI:60699B*
|
||||
+ ID_OUI_FROM_DATABASE=isepos GmbH
|
||||
+
|
||||
OUI:606BBD*
|
||||
ID_OUI_FROM_DATABASE=Samsung Electronics Co., LTD
|
||||
|
||||
@@ -58687,6 +58744,9 @@ OUI:8065E9*
|
||||
OUI:806629*
|
||||
ID_OUI_FROM_DATABASE=Prescope Technologies CO.,LTD.
|
||||
|
||||
+OUI:806C8B*
|
||||
+ ID_OUI_FROM_DATABASE=KAESER KOMPRESSOREN AG
|
||||
+
|
||||
OUI:806CBC*
|
||||
ID_OUI_FROM_DATABASE=NET New Electronic Technology GmbH
|
||||
|
||||
@@ -59011,6 +59071,9 @@ OUI:84DF0C*
|
||||
OUI:84E4D9*
|
||||
ID_OUI_FROM_DATABASE=Shenzhen NEED technology Ltd.
|
||||
|
||||
+OUI:84E629*
|
||||
+ ID_OUI_FROM_DATABASE=Bluwan SA
|
||||
+
|
||||
OUI:84E714*
|
||||
ID_OUI_FROM_DATABASE=Liang Herng Enterprise,Co.Ltd.
|
||||
|
||||
@@ -59083,6 +59146,9 @@ OUI:8841C1*
|
||||
OUI:8843E1*
|
||||
ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
|
||||
|
||||
+OUI:88462A*
|
||||
+ ID_OUI_FROM_DATABASE=Telechips Inc.
|
||||
+
|
||||
OUI:884B39*
|
||||
ID_OUI_FROM_DATABASE=Siemens AG, Healthcare Sector
|
||||
|
||||
@@ -59770,6 +59836,9 @@ OUI:9439E5*
|
||||
OUI:943AF0*
|
||||
ID_OUI_FROM_DATABASE=Nokia Corporation
|
||||
|
||||
+OUI:9440A2*
|
||||
+ ID_OUI_FROM_DATABASE=Anywave Communication Technologies, Inc.
|
||||
+
|
||||
OUI:944444*
|
||||
ID_OUI_FROM_DATABASE=LG Innotek
|
||||
|
||||
@@ -60091,6 +60160,9 @@ OUI:98A7B0*
|
||||
OUI:98AAD7*
|
||||
ID_OUI_FROM_DATABASE=BLUE WAVE NETWORKING CO LTD
|
||||
|
||||
+OUI:98B039*
|
||||
+ ID_OUI_FROM_DATABASE=Alcatel-Lucent
|
||||
+
|
||||
OUI:98B8E3*
|
||||
ID_OUI_FROM_DATABASE=Apple
|
||||
|
||||
@@ -60727,6 +60799,9 @@ OUI:A45A1C*
|
||||
OUI:A45C27*
|
||||
ID_OUI_FROM_DATABASE=Nintendo Co., Ltd.
|
||||
|
||||
+OUI:A45D36*
|
||||
+ ID_OUI_FROM_DATABASE=Hewlett Packard
|
||||
+
|
||||
OUI:A46706*
|
||||
ID_OUI_FROM_DATABASE=Apple, Inc.
|
||||
|
||||
@@ -61609,6 +61684,9 @@ OUI:B40EDC*
|
||||
OUI:B41489*
|
||||
ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
|
||||
|
||||
+OUI:B41513*
|
||||
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
|
||||
+
|
||||
OUI:B41DEF*
|
||||
ID_OUI_FROM_DATABASE=Internet Laboratories, Inc.
|
||||
|
||||
@@ -61660,6 +61738,9 @@ OUI:B451F9*
|
||||
OUI:B45253*
|
||||
ID_OUI_FROM_DATABASE=Seagate Technology
|
||||
|
||||
+OUI:B4527D*
|
||||
+ ID_OUI_FROM_DATABASE=Sony Mobile Communications AB
|
||||
+
|
||||
OUI:B45570*
|
||||
ID_OUI_FROM_DATABASE=Borea
|
||||
|
||||
@@ -61855,6 +61936,9 @@ OUI:B82ADC*
|
||||
OUI:B82CA0*
|
||||
ID_OUI_FROM_DATABASE=Honeywell HomMed
|
||||
|
||||
+OUI:B830A8*
|
||||
+ ID_OUI_FROM_DATABASE=Road-Track Telematics Development
|
||||
+
|
||||
OUI:B836D8*
|
||||
ID_OUI_FROM_DATABASE=Videoswitch
|
||||
|
||||
@@ -62758,6 +62842,9 @@ OUI:C4F57C*
|
||||
OUI:C4FCE4*
|
||||
ID_OUI_FROM_DATABASE=DishTV NZ Ltd
|
||||
|
||||
+OUI:C80258*
|
||||
+ ID_OUI_FROM_DATABASE=ITW GSE ApS
|
||||
+
|
||||
OUI:C802A6*
|
||||
ID_OUI_FROM_DATABASE=Beijing Newmine Technology
|
||||
|
||||
@@ -63721,6 +63808,9 @@ OUI:D4AC4E*
|
||||
OUI:D4AE52*
|
||||
ID_OUI_FROM_DATABASE=Dell Inc
|
||||
|
||||
+OUI:D4B110*
|
||||
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
|
||||
+
|
||||
OUI:D4BED9*
|
||||
ID_OUI_FROM_DATABASE=Dell Inc
|
||||
|
||||
diff --git a/hwdb/20-pci-vendor-model.hwdb b/hwdb/20-pci-vendor-model.hwdb
|
||||
index ea67fee..a8dcc31 100644
|
||||
--- a/hwdb/20-pci-vendor-model.hwdb
|
||||
+++ b/hwdb/20-pci-vendor-model.hwdb
|
||||
@@ -4074,7 +4074,7 @@ pci:v00001002d00006600*
|
||||
ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8670A/8750M]
|
||||
|
||||
pci:v00001002d00006601*
|
||||
- ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8500/8700M Series]
|
||||
+ ID_MODEL_FROM_DATABASE=Mars [Radeon HD 8730M]
|
||||
|
||||
pci:v00001002d00006602*
|
||||
ID_MODEL_FROM_DATABASE=Mars
|
||||
@@ -4217,9 +4217,6 @@ pci:v00001002d00006720sv00001558sd00007201*
|
||||
pci:v00001002d00006720sv0000174Bsd0000E188*
|
||||
ID_MODEL_FROM_DATABASE=Radeon HD 6970M
|
||||
|
||||
-pci:v00001002d00006723*
|
||||
- ID_MODEL_FROM_DATABASE=Barts GL [ATI FirePro V (FireGL V) Graphics Adapter]
|
||||
-
|
||||
pci:v00001002d00006724*
|
||||
ID_MODEL_FROM_DATABASE=Blackcomb [Mobility Radeon HD 6000 series]
|
||||
|
||||
@@ -5534,9 +5531,6 @@ pci:v00001002d000094B3*
|
||||
pci:v00001002d000094B4*
|
||||
ID_MODEL_FROM_DATABASE=RV740 PRO [Radeon HD 4750]
|
||||
|
||||
-pci:v00001002d000094B5*
|
||||
- ID_MODEL_FROM_DATABASE=RV740 [Radeon HD 4770]
|
||||
-
|
||||
pci:v00001002d000094C1*
|
||||
ID_MODEL_FROM_DATABASE=RV610 [Radeon HD 2400 PRO/XT]
|
||||
|
||||
@@ -22952,6 +22946,24 @@ pci:v000010DEd000011C0*
|
||||
pci:v000010DEd000011C2*
|
||||
ID_MODEL_FROM_DATABASE=GK106 [GeForce GTX 650 Ti Boost]
|
||||
|
||||
+pci:v000010DEd000011C2sv00001043sd0000845B*
|
||||
+ ID_MODEL_FROM_DATABASE=GeForce GTX 650 Ti Boost DirectCU II OC
|
||||
+
|
||||
+pci:v000010DEd000011C2sv00001462sd00002874*
|
||||
+ ID_MODEL_FROM_DATABASE=GeForce GTX 650 Ti Boost TwinFrozr II OC
|
||||
+
|
||||
+pci:v000010DEd000011C2sv00001569sd000011C2*
|
||||
+ ID_MODEL_FROM_DATABASE=GeForce GTX 650 Ti Boost OC
|
||||
+
|
||||
+pci:v000010DEd000011C2sv000019DAsd00001281*
|
||||
+ ID_MODEL_FROM_DATABASE=GeForce GTX 650 Ti Boost OC
|
||||
+
|
||||
+pci:v000010DEd000011C2sv00003842sd00003657*
|
||||
+ ID_MODEL_FROM_DATABASE=GeForce GTX 650 Ti Boost
|
||||
+
|
||||
+pci:v000010DEd000011C2sv00003842sd00003658*
|
||||
+ ID_MODEL_FROM_DATABASE=GeForce GTX 650 Ti Boost Superclocked
|
||||
+
|
||||
pci:v000010DEd000011C3*
|
||||
ID_MODEL_FROM_DATABASE=GK106 [GeForce GTX 650 Ti OEM]
|
||||
|
||||
@@ -23861,6 +23873,9 @@ pci:v000010ECd00008177*
|
||||
pci:v000010ECd00008178*
|
||||
ID_MODEL_FROM_DATABASE=RTL8188CE 802.11b/g/n WiFi Adapter
|
||||
|
||||
+pci:v000010ECd00008179*
|
||||
+ ID_MODEL_FROM_DATABASE=RTL8188EE Wireless Network Adapter
|
||||
+
|
||||
pci:v000010ECd00008180*
|
||||
ID_MODEL_FROM_DATABASE=RTL8180L 802.11b MAC
|
||||
|
||||
@@ -34094,6 +34109,9 @@ pci:v000012D8d0000E110*
|
||||
pci:v000012D8d0000E110sv00001775sd000011CC*
|
||||
ID_MODEL_FROM_DATABASE=CC11/CL11 CompactPCI Bridge
|
||||
|
||||
+pci:v000012D8d0000E111*
|
||||
+ ID_MODEL_FROM_DATABASE=PI7C9X111SL PCIe-to-PCI Reversible Bridge
|
||||
+
|
||||
pci:v000012D8d0000E130*
|
||||
ID_MODEL_FROM_DATABASE=PCI Express to PCI-XPI7C9X130 PCI-X Bridge
|
||||
|
||||
@@ -40424,6 +40442,9 @@ pci:v000014E4d00004333*
|
||||
pci:v000014E4d00004344*
|
||||
ID_MODEL_FROM_DATABASE=EDGE/GPRS data and 802.11b/g combo cardbus [GC89]
|
||||
|
||||
+pci:v000014E4d00004350*
|
||||
+ ID_MODEL_FROM_DATABASE=BCM43222 Wireless Network Adapter
|
||||
+
|
||||
pci:v000014E4d00004353*
|
||||
ID_MODEL_FROM_DATABASE=BCM43224 802.11a/b/g/n
|
||||
|
||||
@@ -40466,6 +40487,9 @@ pci:v000014E4d00004365*
|
||||
pci:v000014E4d00004365sv00001028sd00000016*
|
||||
ID_MODEL_FROM_DATABASE=Wireless 1704 802.11n + BT 4.0
|
||||
|
||||
+pci:v000014E4d000043B1*
|
||||
+ ID_MODEL_FROM_DATABASE=BCM4352 802.11ac Wireless Network Adapter
|
||||
+
|
||||
pci:v000014E4d00004401*
|
||||
ID_MODEL_FROM_DATABASE=BCM4401 100Base-T
|
||||
|
||||
@@ -40637,6 +40661,9 @@ pci:v000014E4d00005850*
|
||||
pci:v000014E4d00008602*
|
||||
ID_MODEL_FROM_DATABASE=BCM7400/BCM7405 Serial ATA Controller
|
||||
|
||||
+pci:v000014E4d0000A8D8*
|
||||
+ ID_MODEL_FROM_DATABASE=BCM43224/5 Wireless Network Adapter
|
||||
+
|
||||
pci:v000014E4d0000B302*
|
||||
ID_MODEL_FROM_DATABASE=BCM56302 StrataXGS 24x1GE 2x10GE Switch Controller
|
||||
|
||||
@@ -43290,7 +43317,7 @@ pci:v00001688d00001170*
|
||||
ID_MODEL_FROM_DATABASE=WLAN 802.11b card
|
||||
|
||||
pci:v0000168C*
|
||||
- ID_VENDOR_FROM_DATABASE=Atheros Communications Inc.
|
||||
+ ID_VENDOR_FROM_DATABASE=Qualcomm Atheros
|
||||
|
||||
pci:v0000168Cd00000007*
|
||||
ID_MODEL_FROM_DATABASE=AR5210 Wireless Network Adapter [AR5000 802.11a]
|
||||
@@ -43881,7 +43908,7 @@ pci:v0000168Cd0000002E*
|
||||
ID_MODEL_FROM_DATABASE=AR9287 Wireless Network Adapter (PCI-Express)
|
||||
|
||||
pci:v0000168Cd00000030*
|
||||
- ID_MODEL_FROM_DATABASE=AR9300 Wireless LAN adaptor
|
||||
+ ID_MODEL_FROM_DATABASE=AR93xx Wireless Network Adapter
|
||||
|
||||
pci:v0000168Cd00000030sv0000103Csd00001627*
|
||||
ID_MODEL_FROM_DATABASE=AR9380/HB112 802.11abgn 3×3 Wi-Fi Adapter
|
||||
@@ -43911,7 +43938,10 @@ pci:v0000168Cd00000034*
|
||||
ID_MODEL_FROM_DATABASE=AR9462 Wireless Network Adapter
|
||||
|
||||
pci:v0000168Cd00000036*
|
||||
- ID_MODEL_FROM_DATABASE=AR9565 Wireless Network Adapter
|
||||
+ ID_MODEL_FROM_DATABASE=QCA9565 / AR9565 Wireless Network Adapter
|
||||
+
|
||||
+pci:v0000168Cd0000003C*
|
||||
+ ID_MODEL_FROM_DATABASE=QCA988x 802.11ac Wireless Network Adapter
|
||||
|
||||
pci:v0000168Cd00000207*
|
||||
ID_MODEL_FROM_DATABASE=AR5210 Wireless Network Adapter [AR5000 802.11a]
|
||||
@@ -52356,7 +52386,7 @@ pci:v00008086d000010F6*
|
||||
ID_MODEL_FROM_DATABASE=82574L Gigabit Network Connection
|
||||
|
||||
pci:v00008086d000010F7*
|
||||
- ID_MODEL_FROM_DATABASE=82599EB 10-Gigabit KX4 Network Connection
|
||||
+ ID_MODEL_FROM_DATABASE=10 Gigabit BR KX4 Dual Port Network Connection
|
||||
|
||||
pci:v00008086d000010F7sv0000108Esd00007B12*
|
||||
ID_MODEL_FROM_DATABASE=Sun Dual 10GbE PCIe 2.0 FEM
|
||||
@@ -52365,7 +52395,7 @@ pci:v00008086d000010F7sv00008086sd0000000D*
|
||||
ID_MODEL_FROM_DATABASE=Ethernet Mezzanine Adapter X520-KX4-2
|
||||
|
||||
pci:v00008086d000010F8*
|
||||
- ID_MODEL_FROM_DATABASE=82599EB 10 Gigabit Dual Port Backplane Connection
|
||||
+ ID_MODEL_FROM_DATABASE=82599 10 Gigabit Dual Port Backplane Connection
|
||||
|
||||
pci:v00008086d000010F8sv00001028sd00001F63*
|
||||
ID_MODEL_FROM_DATABASE=10GbE 2P X520k bNDC
|
||||
@@ -52380,7 +52410,7 @@ pci:v00008086d000010F8sv00008086sd0000000C*
|
||||
ID_MODEL_FROM_DATABASE=Ethernet X520 10GbE Dual Port KX4-KR Mezz
|
||||
|
||||
pci:v00008086d000010F9*
|
||||
- ID_MODEL_FROM_DATABASE=82599EB 10 Gigabit CX4 Dual Port Network Connection
|
||||
+ ID_MODEL_FROM_DATABASE=82599 10 Gigabit Dual Port Network Connection
|
||||
|
||||
pci:v00008086d000010FB*
|
||||
ID_MODEL_FROM_DATABASE=82599EB 10-Gigabit SFI/SFP+ Network Connection
|
||||
@@ -52431,7 +52461,7 @@ pci:v00008086d000010FBsv00008086sd00007A12*
|
||||
ID_MODEL_FROM_DATABASE=Ethernet Server Adapter X520-2
|
||||
|
||||
pci:v00008086d000010FC*
|
||||
- ID_MODEL_FROM_DATABASE=82599EB 10-Gigabit XAUI/BX4 Network Connection
|
||||
+ ID_MODEL_FROM_DATABASE=82599 10 Gigabit Dual Port Network Connection
|
||||
|
||||
pci:v00008086d000010FE*
|
||||
ID_MODEL_FROM_DATABASE=82552 10/100 Network Connection
|
||||
@@ -53109,7 +53139,7 @@ pci:v00008086d00001503sv00001043sd0000849C*
|
||||
ID_MODEL_FROM_DATABASE=P8P67 Deluxe Motherboard
|
||||
|
||||
pci:v00008086d00001507*
|
||||
- ID_MODEL_FROM_DATABASE=82599EB 10 Gigabit Network Connection
|
||||
+ ID_MODEL_FROM_DATABASE=Ethernet Express Module X520-P2
|
||||
|
||||
pci:v00008086d00001508*
|
||||
ID_MODEL_FROM_DATABASE=82598EB Gigabit BX Network Connection
|
||||
@@ -53160,7 +53190,7 @@ pci:v00008086d00001511*
|
||||
ID_MODEL_FROM_DATABASE=82580 Gigabit SFP Connection
|
||||
|
||||
pci:v00008086d00001514*
|
||||
- ID_MODEL_FROM_DATABASE=82599EB 10 Gigabit KX4 Network Connection
|
||||
+ ID_MODEL_FROM_DATABASE=Ethernet X520 10GbE Dual Port KX4 Mezz
|
||||
|
||||
pci:v00008086d00001514sv00008086sd0000000B*
|
||||
ID_MODEL_FROM_DATABASE=Ethernet X520 10GbE Dual Port KX4 Mezz
|
||||
@@ -53187,7 +53217,7 @@ pci:v00008086d00001518*
|
||||
ID_MODEL_FROM_DATABASE=82576NS SerDes Gigabit Network Connection
|
||||
|
||||
pci:v00008086d0000151C*
|
||||
- ID_MODEL_FROM_DATABASE=82599EB 10 Gigabit TN Network Connection
|
||||
+ ID_MODEL_FROM_DATABASE=82599 10 Gigabit TN Network Connection
|
||||
|
||||
pci:v00008086d0000151Csv0000108Esd00007B13*
|
||||
ID_MODEL_FROM_DATABASE=Dual 10GBASE-T LP
|
||||
@@ -53346,10 +53376,10 @@ pci:v00008086d00001528sv00008086sd00005003*
|
||||
ID_MODEL_FROM_DATABASE=Ethernet 10G 2P X540-t Adapter
|
||||
|
||||
pci:v00008086d00001529*
|
||||
- ID_MODEL_FROM_DATABASE=82599 10 Gigabit Dual Port Backplane Connection with FCoE
|
||||
+ ID_MODEL_FROM_DATABASE=82599 10 Gigabit Dual Port Network Connection with FCoE
|
||||
|
||||
pci:v00008086d0000152A*
|
||||
- ID_MODEL_FROM_DATABASE=82599 10 Gigabit Dual port Network Connection with FCoE
|
||||
+ ID_MODEL_FROM_DATABASE=82599 10 Gigabit Dual Port Backplane Connection with FCoE
|
||||
|
||||
pci:v00008086d00001533*
|
||||
ID_MODEL_FROM_DATABASE=I210 Gigabit Network Connection
|
||||
@@ -53403,7 +53433,7 @@ pci:v00008086d0000154Asv00008086sd0000011C*
|
||||
ID_MODEL_FROM_DATABASE=Ethernet Converged Network Adapter X520-4
|
||||
|
||||
pci:v00008086d0000154D*
|
||||
- ID_MODEL_FROM_DATABASE=82599EB 10-Gigabit SFP+ Network Connection
|
||||
+ ID_MODEL_FROM_DATABASE=Ethernet 10G 2P X520 Adapter
|
||||
|
||||
pci:v00008086d0000154Dsv00008086sd00007B11*
|
||||
ID_MODEL_FROM_DATABASE=10GbE 2P X520 Adapter
|
|
@ -0,0 +1,24 @@
|
|||
From 4adb14d65c1125dfeff2fe5a44269baba67dfad3 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 6 May 2013 22:28:39 +0200
|
||||
Subject: [PATCH] core: unit_inactive_or_pending() should actually do as it
|
||||
claims (cherry picked from commit d956ac29a1b8120e83922fa8e75cdd8f6e562529)
|
||||
|
||||
---
|
||||
src/core/unit.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/core/unit.c b/src/core/unit.c
|
||||
index d5bea83..502fbf1 100644
|
||||
--- a/src/core/unit.c
|
||||
+++ b/src/core/unit.c
|
||||
@@ -2652,6 +2652,9 @@ bool unit_inactive_or_pending(Unit *u) {
|
||||
|
||||
/* Returns true if the unit is inactive or going down */
|
||||
|
||||
+ if (UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u)))
|
||||
+ return true;
|
||||
+
|
||||
if (unit_stop_pending(u))
|
||||
return true;
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
From a2ce33a3f975e4f879e012960803f13986ac4903 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 6 May 2013 22:39:17 +0200
|
||||
Subject: [PATCH] man: correct SIGUSR1 semantics for journald (cherry picked
|
||||
from commit e943ecc88d87f8747cc6396688c1347b40c15e03)
|
||||
|
||||
---
|
||||
man/systemd-journald.service.xml | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/man/systemd-journald.service.xml b/man/systemd-journald.service.xml
|
||||
index bc32c8e..822f3c2 100644
|
||||
--- a/man/systemd-journald.service.xml
|
||||
+++ b/man/systemd-journald.service.xml
|
||||
@@ -111,13 +111,13 @@
|
||||
is flushed to
|
||||
<filename>/var/</filename> in order to
|
||||
make it persistent (if this is
|
||||
- enabled). This may be used after
|
||||
+ enabled). This must be used after
|
||||
<filename>/var/</filename> is mounted,
|
||||
- but is generally not required since
|
||||
- the first journal write when
|
||||
- <filename>/var/</filename> becomes
|
||||
- writable triggers the flushing
|
||||
- anyway.</para></listitem>
|
||||
+ as otherwise log data from
|
||||
+ <filename>/run</filename> is never
|
||||
+ flushed to <filename>/var</filename>
|
||||
+ regardless of the
|
||||
+ configuration.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
|
@ -0,0 +1,35 @@
|
|||
From c97fe4e56a3f0eda219532dac342ad280087823e Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 6 May 2013 22:47:41 +0200
|
||||
Subject: [PATCH] man: clarify behaviour of Also= in unit files (cherry picked
|
||||
from commit a7be37a5014f5d7f8aa372915943611fe1112834)
|
||||
|
||||
---
|
||||
man/systemd.unit.xml | 13 +++++++------
|
||||
1 file changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
|
||||
index 0dccb97..eb50b85 100644
|
||||
--- a/man/systemd.unit.xml
|
||||
+++ b/man/systemd.unit.xml
|
||||
@@ -1160,13 +1160,14 @@
|
||||
<term><varname>Also=</varname></term>
|
||||
|
||||
<listitem><para>Additional units to
|
||||
- install when this unit is
|
||||
- installed. If the user requests
|
||||
- installation of a unit with this
|
||||
- option configured,
|
||||
+ install/deinstall when this unit is
|
||||
+ installed/deinstalled. If the user
|
||||
+ requests installation/deinstallation
|
||||
+ of a unit with this option configured,
|
||||
<command>systemctl enable</command>
|
||||
- will automatically install units
|
||||
- listed in this option as
|
||||
+ and <command>systemctl
|
||||
+ disable</command> will automatically
|
||||
+ install/uninstall units listed in this option as
|
||||
well.</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
|
@ -0,0 +1,32 @@
|
|||
From 0e03dea09846b0c174824e57b427f16edd3ff071 Mon Sep 17 00:00:00 2001
|
||||
From: Ross Lagerwall <rosslagerwall@gmail.com>
|
||||
Date: Mon, 6 May 2013 15:32:23 +0100
|
||||
Subject: [PATCH] man: fix typos in systemd.special (cherry picked from commit
|
||||
ab75ca91dcc6504c88931bed4e025b8b53b11c2d)
|
||||
|
||||
---
|
||||
man/systemd.special.xml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/man/systemd.special.xml b/man/systemd.special.xml
|
||||
index 08adbf4..a386a30 100644
|
||||
--- a/man/systemd.special.xml
|
||||
+++ b/man/systemd.special.xml
|
||||
@@ -813,7 +813,7 @@
|
||||
available at boot.</para>
|
||||
|
||||
<para>This may be used to pull
|
||||
- in printer management
|
||||
+ in smartcard management
|
||||
daemons dynamically when
|
||||
smartcard hardware is
|
||||
found.</para>
|
||||
@@ -830,7 +830,7 @@
|
||||
|
||||
<para>This may be used to pull
|
||||
in audio management daemons
|
||||
- dynamically when printer
|
||||
+ dynamically when audio
|
||||
hardware is found.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
|
@ -0,0 +1,62 @@
|
|||
From 577aa8fce8b20cb906e05c576345feccab354f96 Mon Sep 17 00:00:00 2001
|
||||
From: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
|
||||
Date: Tue, 23 Apr 2013 13:34:38 -0400
|
||||
Subject: [PATCH] core: escape unit name from udev
|
||||
|
||||
This patch escapes a unit name which was derived from udev.
|
||||
|
||||
Please imagine following udev rule.
|
||||
|
||||
ACTION=="online|offline", TAG+="systemd", ENV{SYSTEMD_WANTS}="muneda@%p.service"
|
||||
ACTION=="online|offline", TAG+="systemd", ENV{SYSTEMD_WANTS}="muneda@%r.service"
|
||||
ACTION=="online|offline", TAG+="systemd", ENV{SYSTEMD_WANTS}="muneda@%S.service"
|
||||
|
||||
When unit name is derived from udev via
|
||||
udev_device_get_property_value(), the name may contains '/' if
|
||||
ENV{SYSTEMD_WANTS} has the udev options $devpath(%p), $root(%r), or
|
||||
$sys(%S). However, '/' is a invalid char for unit name so processing
|
||||
of this rule fails as Invalid argument with following message.
|
||||
|
||||
Apr 22 13:21:37 localhost systemd[1]: Failed to load device unit: Invalid argument
|
||||
Apr 22 13:21:37 localhost systemd[1]: Failed to process udev device event: Invalid argument
|
||||
|
||||
This patch escapes those invalid chars in a unit name.
|
||||
Tested with 202, and confirmed to apply cleanly on top of commit 195f8e36.
|
||||
|
||||
Thanks,
|
||||
Takahiro
|
||||
(cherry picked from commit d9abd1493d6adca4038121f2c969fdcaf89b9b7a)
|
||||
---
|
||||
src/core/device.c | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/core/device.c b/src/core/device.c
|
||||
index 734d3f3..7b28aba 100644
|
||||
--- a/src/core/device.c
|
||||
+++ b/src/core/device.c
|
||||
@@ -281,16 +281,22 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
|
||||
size_t l;
|
||||
|
||||
FOREACH_WORD_QUOTED(w, l, wants, state) {
|
||||
- char *e;
|
||||
+ char *e, *n;
|
||||
|
||||
e = strndup(w, l);
|
||||
if (!e) {
|
||||
r = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
-
|
||||
- r = unit_add_dependency_by_name(u, UNIT_WANTS, e, NULL, true);
|
||||
+ n = unit_name_mangle(e);
|
||||
+ if (!n) {
|
||||
+ r = -ENOMEM;
|
||||
+ goto fail;
|
||||
+ }
|
||||
free(e);
|
||||
+
|
||||
+ r = unit_add_dependency_by_name(u, UNIT_WANTS, n, NULL, true);
|
||||
+ free(n);
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
From f3893bd709a17bfeeb5fae8b10432a9476d7b1d2 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 7 May 2013 01:09:33 +0200
|
||||
Subject: [PATCH] journald: be more careful when we try to flush the runtime
|
||||
journal to disk and the disk is close to being full
|
||||
|
||||
Bump the minimal size of the journal so that we can be sure creating the
|
||||
journal file will always succeed. Previously the minimum size was
|
||||
smaller than a empty jounral file...
|
||||
(cherry picked from commit 253f59dff9c93ee1d2c33444b5715e42bc1c6889)
|
||||
---
|
||||
src/journal/journal-file.c | 2 +-
|
||||
src/journal/journald-server.c | 6 ++++++
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
|
||||
index a44e126..e14821f 100644
|
||||
--- a/src/journal/journal-file.c
|
||||
+++ b/src/journal/journal-file.c
|
||||
@@ -44,7 +44,7 @@
|
||||
#define COMPRESSION_SIZE_THRESHOLD (512ULL)
|
||||
|
||||
/* This is the minimum journal file size */
|
||||
-#define JOURNAL_FILE_SIZE_MIN (64ULL*1024ULL) /* 64 KiB */
|
||||
+#define JOURNAL_FILE_SIZE_MIN (4ULL*1024ULL*1024ULL) /* 4 MiB */
|
||||
|
||||
/* These are the lower and upper bounds if we deduce the max_use value
|
||||
* from the file system size */
|
||||
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
||||
index 5e8647c..96fefa4 100644
|
||||
--- a/src/journal/journald-server.c
|
||||
+++ b/src/journal/journald-server.c
|
||||
@@ -990,6 +990,12 @@ int server_flush_to_var(Server *s) {
|
||||
server_rotate(s);
|
||||
server_vacuum(s);
|
||||
|
||||
+ if (!s->system_journal) {
|
||||
+ log_notice("Didn't flush runtime journal since rotation of system journal wasn't successful.");
|
||||
+ r = -EIO;
|
||||
+ goto finish;
|
||||
+ }
|
||||
+
|
||||
log_debug("Retrying write.");
|
||||
r = journal_file_copy_entry(f, s->system_journal, o, f->current_offset, NULL, NULL, NULL);
|
||||
if (r < 0) {
|
|
@ -0,0 +1,29 @@
|
|||
From 457fd0ab5ea0f3c6a1c9cb1bb12633a9d9d4f48c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Mantas=20Mikul=C4=97nas?= <grawity@gmail.com>
|
||||
Date: Sun, 14 Apr 2013 14:54:09 +0300
|
||||
Subject: [PATCH] fileio: also escape $ and ` when writing out env vars
|
||||
|
||||
These are also considered special by sh and bash.
|
||||
(cherry picked from commit ced2d10a28cff3bab6fb613652db5abde8ed940e)
|
||||
---
|
||||
src/shared/fileio.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
|
||||
index 400a416..617afea 100644
|
||||
--- a/src/shared/fileio.c
|
||||
+++ b/src/shared/fileio.c
|
||||
@@ -529,11 +529,11 @@ static void write_env_var(FILE *f, const char *v) {
|
||||
p++;
|
||||
fwrite(v, 1, p-v, f);
|
||||
|
||||
- if (string_has_cc(p) || chars_intersect(p, WHITESPACE "\'\"\\")) {
|
||||
+ if (string_has_cc(p) || chars_intersect(p, WHITESPACE "\'\"\\`$")) {
|
||||
fputc('\"', f);
|
||||
|
||||
for (; *p; p++) {
|
||||
- if (strchr("\'\"\\", *p))
|
||||
+ if (strchr("\'\"\\`$", *p))
|
||||
fputc('\\', f);
|
||||
|
||||
fputc(*p, f);
|
|
@ -0,0 +1,105 @@
|
|||
From 780297602e73da8e372f50c51859f8fa1aef9ce0 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 17 Apr 2013 11:02:56 +0200
|
||||
Subject: [PATCH] fileio:parse_env_file_internal() fix environment file parsing
|
||||
|
||||
parse_env_file_internal() could not parse the following lines correctly:
|
||||
|
||||
export key="val"
|
||||
key="val"#comment
|
||||
(cherry picked from commit db5372091664c977a937f6bc0fe4484363be0669)
|
||||
---
|
||||
src/shared/fileio.c | 6 ++++--
|
||||
src/test/test-fileio.c | 20 +++++++++++++++-----
|
||||
2 files changed, 19 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
|
||||
index 617afea..3f242ed 100644
|
||||
--- a/src/shared/fileio.c
|
||||
+++ b/src/shared/fileio.c
|
||||
@@ -209,7 +209,9 @@ static int parse_env_file_internal(
|
||||
switch (state) {
|
||||
|
||||
case PRE_KEY:
|
||||
- if (strchr(COMMENTS, c))
|
||||
+ if (startswith(p, "export "))
|
||||
+ p+=6;
|
||||
+ else if (strchr(COMMENTS, c))
|
||||
state = COMMENT;
|
||||
else if (!strchr(WHITESPACE, c)) {
|
||||
state = KEY;
|
||||
@@ -255,7 +257,7 @@ static int parse_env_file_internal(
|
||||
break;
|
||||
|
||||
case PRE_VALUE:
|
||||
- if (strchr(newline, c)) {
|
||||
+ if (strchr(newline, c) || strchr(COMMENTS, c)) {
|
||||
state = PRE_KEY;
|
||||
key[n_key] = 0;
|
||||
|
||||
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
|
||||
index 7adf2ef..994b89b 100644
|
||||
--- a/src/test/test-fileio.c
|
||||
+++ b/src/test/test-fileio.c
|
||||
@@ -31,7 +31,7 @@ static void test_parse_env_file(void) {
|
||||
char t[] = "/tmp/test-parse-env-file-XXXXXX";
|
||||
int fd, r;
|
||||
FILE *f;
|
||||
- _cleanup_free_ char *one = NULL, *two = NULL, *three = NULL, *four = NULL, *five = NULL, *six = NULL, *seven = NULL;
|
||||
+ _cleanup_free_ char *one = NULL, *two = NULL, *three = NULL, *four = NULL, *five = NULL, *six = NULL, *seven = NULL, *eight = NULL, *nine = NULL;
|
||||
_cleanup_strv_free_ char **a = NULL, **b = NULL;
|
||||
char **i;
|
||||
unsigned k;
|
||||
@@ -53,7 +53,9 @@ static void test_parse_env_file(void) {
|
||||
"five = \'55\\\'55\' \"FIVE\" cinco \n"
|
||||
"six = seis sechs\\\n"
|
||||
" sis\n"
|
||||
- "seven=", f);
|
||||
+ "export seven=\"sevenval\"#comment\n"
|
||||
+ "eight=#comment\n"
|
||||
+ "nine=", f);
|
||||
|
||||
fflush(f);
|
||||
fclose(f);
|
||||
@@ -67,6 +69,8 @@ static void test_parse_env_file(void) {
|
||||
"five", &five,
|
||||
"six", &six,
|
||||
"seven", &seven,
|
||||
+ "eight", &eight,
|
||||
+ "nine", &nine,
|
||||
NULL);
|
||||
|
||||
assert_se(r >= 0);
|
||||
@@ -78,6 +82,8 @@ static void test_parse_env_file(void) {
|
||||
log_info("five=[%s]", strna(five));
|
||||
log_info("six=[%s]", strna(six));
|
||||
log_info("seven=[%s]", strna(seven));
|
||||
+ log_info("eight=[%s]", strna(eight));
|
||||
+ log_info("nine=[%s]", strna(nine));
|
||||
|
||||
assert_se(streq(one, "BAR"));
|
||||
assert_se(streq(two, "bar"));
|
||||
@@ -85,7 +91,9 @@ static void test_parse_env_file(void) {
|
||||
assert_se(streq(four, "44\"44"));
|
||||
assert_se(streq(five, "55\'55FIVEcinco"));
|
||||
assert_se(streq(six, "seis sechs sis"));
|
||||
- assert_se(seven == NULL);
|
||||
+ assert_se(streq(seven, "sevenval"));
|
||||
+ assert_se(eight == NULL);
|
||||
+ assert_se(nine == NULL);
|
||||
|
||||
r = load_env_file(t, NULL, &a);
|
||||
assert_se(r >= 0);
|
||||
@@ -99,8 +107,10 @@ static void test_parse_env_file(void) {
|
||||
assert_se(streq(a[3], "four=44\"44"));
|
||||
assert_se(streq(a[4], "five=55\'55FIVEcinco"));
|
||||
assert_se(streq(a[5], "six=seis sechs sis"));
|
||||
- assert_se(streq(a[6], "seven="));
|
||||
- assert_se(a[7] == NULL);
|
||||
+ assert_se(streq(a[6], "seven=sevenval"));
|
||||
+ assert_se(streq(a[7], "eight="));
|
||||
+ assert_se(streq(a[8], "nine="));
|
||||
+ assert_se(a[9] == NULL);
|
||||
|
||||
r = write_env_file("/tmp/test-fileio", a);
|
||||
assert_se(r >= 0);
|
|
@ -0,0 +1,292 @@
|
|||
From be2cf34fef59b3c7dc675cf4703f5bd3f5648bcc Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Wed, 17 Apr 2013 15:25:02 +0200
|
||||
Subject: [PATCH] core/execute: report invalid environment variables from files
|
||||
|
||||
Because "export key=val" is not supported by systemd, an error is logged
|
||||
where the invalid assignment is coming from.
|
||||
|
||||
Introduce strv_env_clean_log() to log invalid environment assignments,
|
||||
where logging is possible and allowed.
|
||||
|
||||
parse_env_file_internal() is modified to allow WHITESPACE in keys, to
|
||||
report the issues later on.
|
||||
(cherry picked from commit ebc05a09ad6d1672cf4f426ee4252cf495daa139)
|
||||
---
|
||||
src/core/execute.c | 2 ++
|
||||
src/shared/env-util.c | 8 ++++-
|
||||
src/shared/env-util.h | 1 +
|
||||
src/shared/fileio.c | 34 +++++++++-------------
|
||||
src/test/test-fileio.c | 79 ++++++++++++++++++++++++++++----------------------
|
||||
5 files changed, 68 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/src/core/execute.c b/src/core/execute.c
|
||||
index 5083af9..4b29d8e 100644
|
||||
--- a/src/core/execute.c
|
||||
+++ b/src/core/execute.c
|
||||
@@ -1756,6 +1756,8 @@ int exec_context_load_environment(const ExecContext *c, char ***l) {
|
||||
strv_free(r);
|
||||
return k;
|
||||
}
|
||||
+ /* Log invalid environment variables with filename */
|
||||
+ p = strv_env_clean_log(p, pglob.gl_pathv[n]);
|
||||
|
||||
if (r == NULL)
|
||||
r = p;
|
||||
diff --git a/src/shared/env-util.c b/src/shared/env-util.c
|
||||
index 54988e6..d3d4c59 100644
|
||||
--- a/src/shared/env-util.c
|
||||
+++ b/src/shared/env-util.c
|
||||
@@ -376,7 +376,7 @@ char *strv_env_get(char **l, const char *name) {
|
||||
return strv_env_get_n(l, name, strlen(name));
|
||||
}
|
||||
|
||||
-char **strv_env_clean(char **e) {
|
||||
+char **strv_env_clean_log(char **e, const char *message) {
|
||||
char **p, **q;
|
||||
int k = 0;
|
||||
|
||||
@@ -385,6 +385,8 @@ char **strv_env_clean(char **e) {
|
||||
bool duplicate = false;
|
||||
|
||||
if (!env_assignment_is_valid(*p)) {
|
||||
+ if (message)
|
||||
+ log_error("Ignoring invalid environment '%s': %s", *p, message);
|
||||
free(*p);
|
||||
continue;
|
||||
}
|
||||
@@ -407,3 +409,7 @@ char **strv_env_clean(char **e) {
|
||||
e[k] = NULL;
|
||||
return e;
|
||||
}
|
||||
+
|
||||
+char **strv_env_clean(char **e) {
|
||||
+ return strv_env_clean_log(e, NULL);
|
||||
+}
|
||||
diff --git a/src/shared/env-util.h b/src/shared/env-util.h
|
||||
index 9449576..b2e520c 100644
|
||||
--- a/src/shared/env-util.h
|
||||
+++ b/src/shared/env-util.h
|
||||
@@ -30,6 +30,7 @@ bool env_assignment_is_valid(const char *e);
|
||||
|
||||
bool strv_env_is_valid(char **e);
|
||||
char **strv_env_clean(char **l);
|
||||
+char **strv_env_clean_log(char **e, const char *message);
|
||||
|
||||
bool strv_env_name_or_assignment_is_valid(char **l);
|
||||
|
||||
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
|
||||
index 3f242ed..4390726 100644
|
||||
--- a/src/shared/fileio.c
|
||||
+++ b/src/shared/fileio.c
|
||||
@@ -184,7 +184,6 @@ static int parse_env_file_internal(
|
||||
enum {
|
||||
PRE_KEY,
|
||||
KEY,
|
||||
- PRE_EQUAL,
|
||||
PRE_VALUE,
|
||||
VALUE,
|
||||
VALUE_ESCAPE,
|
||||
@@ -209,9 +208,7 @@ static int parse_env_file_internal(
|
||||
switch (state) {
|
||||
|
||||
case PRE_KEY:
|
||||
- if (startswith(p, "export "))
|
||||
- p+=6;
|
||||
- else if (strchr(COMMENTS, c))
|
||||
+ if (strchr(COMMENTS, c))
|
||||
state = COMMENT;
|
||||
else if (!strchr(WHITESPACE, c)) {
|
||||
state = KEY;
|
||||
@@ -228,9 +225,7 @@ static int parse_env_file_internal(
|
||||
if (strchr(newline, c)) {
|
||||
state = PRE_KEY;
|
||||
n_key = 0;
|
||||
- } else if (strchr(WHITESPACE, c))
|
||||
- state = PRE_EQUAL;
|
||||
- else if (c == '=')
|
||||
+ } else if (c == '=')
|
||||
state = PRE_VALUE;
|
||||
else {
|
||||
if (!greedy_realloc((void**) &key, &key_alloc, n_key+2)) {
|
||||
@@ -243,19 +238,6 @@ static int parse_env_file_internal(
|
||||
|
||||
break;
|
||||
|
||||
- case PRE_EQUAL:
|
||||
- if (strchr(newline, c)) {
|
||||
- state = PRE_KEY;
|
||||
- n_key = 0;
|
||||
- } else if (c == '=')
|
||||
- state = PRE_VALUE;
|
||||
- else if (!strchr(WHITESPACE, c)) {
|
||||
- n_key = 0;
|
||||
- state = COMMENT;
|
||||
- }
|
||||
-
|
||||
- break;
|
||||
-
|
||||
case PRE_VALUE:
|
||||
if (strchr(newline, c) || strchr(COMMENTS, c)) {
|
||||
state = PRE_KEY;
|
||||
@@ -264,6 +246,10 @@ static int parse_env_file_internal(
|
||||
if (value)
|
||||
value[n_value] = 0;
|
||||
|
||||
+ /* strip trailing whitespace from key */
|
||||
+ while(strchr(WHITESPACE, key[--n_key]))
|
||||
+ key[n_key]=0;
|
||||
+
|
||||
r = push(key, value, userdata);
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
@@ -302,6 +288,10 @@ static int parse_env_file_internal(
|
||||
if (last_whitespace != (size_t) -1)
|
||||
value[last_whitespace] = 0;
|
||||
|
||||
+ /* strip trailing whitespace from key */
|
||||
+ while(strchr(WHITESPACE, key[--n_key]))
|
||||
+ key[n_key]=0;
|
||||
+
|
||||
r = push(key, value, userdata);
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
@@ -426,6 +416,10 @@ static int parse_env_file_internal(
|
||||
if (value)
|
||||
value[n_value] = 0;
|
||||
|
||||
+ /* strip trailing whitespace from key */
|
||||
+ while(strchr(WHITESPACE, key[--n_key]))
|
||||
+ key[n_key]=0;
|
||||
+
|
||||
r = push(key, value, userdata);
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
|
||||
index 994b89b..2a74104 100644
|
||||
--- a/src/test/test-fileio.c
|
||||
+++ b/src/test/test-fileio.c
|
||||
@@ -26,12 +26,14 @@
|
||||
#include "util.h"
|
||||
#include "fileio.h"
|
||||
#include "strv.h"
|
||||
+#include "env-util.h"
|
||||
|
||||
static void test_parse_env_file(void) {
|
||||
char t[] = "/tmp/test-parse-env-file-XXXXXX";
|
||||
int fd, r;
|
||||
FILE *f;
|
||||
- _cleanup_free_ char *one = NULL, *two = NULL, *three = NULL, *four = NULL, *five = NULL, *six = NULL, *seven = NULL, *eight = NULL, *nine = NULL;
|
||||
+ _cleanup_free_ char *one = NULL, *two = NULL, *three = NULL, *four = NULL, *five = NULL,
|
||||
+ *six = NULL, *seven = NULL, *eight = NULL, *nine = NULL, *ten = NULL;
|
||||
_cleanup_strv_free_ char **a = NULL, **b = NULL;
|
||||
char **i;
|
||||
unsigned k;
|
||||
@@ -53,13 +55,46 @@ static void test_parse_env_file(void) {
|
||||
"five = \'55\\\'55\' \"FIVE\" cinco \n"
|
||||
"six = seis sechs\\\n"
|
||||
" sis\n"
|
||||
- "export seven=\"sevenval\"#comment\n"
|
||||
+ "seven=\"sevenval\"#comment\n"
|
||||
"eight=#comment\n"
|
||||
- "nine=", f);
|
||||
+ "export nine=nineval\n"
|
||||
+ "ten=", f);
|
||||
|
||||
fflush(f);
|
||||
fclose(f);
|
||||
|
||||
+ r = load_env_file(t, NULL, &a);
|
||||
+ assert_se(r >= 0);
|
||||
+
|
||||
+ STRV_FOREACH(i, a)
|
||||
+ log_info("Got: <%s>", *i);
|
||||
+
|
||||
+ assert_se(streq(a[0], "one=BAR"));
|
||||
+ assert_se(streq(a[1], "two=bar"));
|
||||
+ assert_se(streq(a[2], "three=333\nxxxx"));
|
||||
+ assert_se(streq(a[3], "four=44\"44"));
|
||||
+ assert_se(streq(a[4], "five=55\'55FIVEcinco"));
|
||||
+ assert_se(streq(a[5], "six=seis sechs sis"));
|
||||
+ assert_se(streq(a[6], "seven=sevenval"));
|
||||
+ assert_se(streq(a[7], "eight="));
|
||||
+ assert_se(streq(a[8], "export nine=nineval"));
|
||||
+ assert_se(streq(a[9], "ten="));
|
||||
+ assert_se(a[10] == NULL);
|
||||
+
|
||||
+ strv_env_clean_log(a, "/tmp/test-fileio");
|
||||
+
|
||||
+ r = write_env_file("/tmp/test-fileio", a);
|
||||
+ assert_se(r >= 0);
|
||||
+
|
||||
+ r = load_env_file("/tmp/test-fileio", NULL, &b);
|
||||
+ assert_se(r >= 0);
|
||||
+
|
||||
+ k = 0;
|
||||
+ STRV_FOREACH(i, b) {
|
||||
+ log_info("Got2: <%s>", *i);
|
||||
+ assert_se(streq(*i, a[k++]));
|
||||
+ }
|
||||
+
|
||||
r = parse_env_file(
|
||||
t, NULL,
|
||||
"one", &one,
|
||||
@@ -70,7 +105,8 @@ static void test_parse_env_file(void) {
|
||||
"six", &six,
|
||||
"seven", &seven,
|
||||
"eight", &eight,
|
||||
- "nine", &nine,
|
||||
+ "export nine", &nine,
|
||||
+ "ten", &ten,
|
||||
NULL);
|
||||
|
||||
assert_se(r >= 0);
|
||||
@@ -83,7 +119,8 @@ static void test_parse_env_file(void) {
|
||||
log_info("six=[%s]", strna(six));
|
||||
log_info("seven=[%s]", strna(seven));
|
||||
log_info("eight=[%s]", strna(eight));
|
||||
- log_info("nine=[%s]", strna(nine));
|
||||
+ log_info("export nine=[%s]", strna(nine));
|
||||
+ log_info("ten=[%s]", strna(nine));
|
||||
|
||||
assert_se(streq(one, "BAR"));
|
||||
assert_se(streq(two, "bar"));
|
||||
@@ -93,36 +130,8 @@ static void test_parse_env_file(void) {
|
||||
assert_se(streq(six, "seis sechs sis"));
|
||||
assert_se(streq(seven, "sevenval"));
|
||||
assert_se(eight == NULL);
|
||||
- assert_se(nine == NULL);
|
||||
-
|
||||
- r = load_env_file(t, NULL, &a);
|
||||
- assert_se(r >= 0);
|
||||
-
|
||||
- STRV_FOREACH(i, a)
|
||||
- log_info("Got: <%s>", *i);
|
||||
-
|
||||
- assert_se(streq(a[0], "one=BAR"));
|
||||
- assert_se(streq(a[1], "two=bar"));
|
||||
- assert_se(streq(a[2], "three=333\nxxxx"));
|
||||
- assert_se(streq(a[3], "four=44\"44"));
|
||||
- assert_se(streq(a[4], "five=55\'55FIVEcinco"));
|
||||
- assert_se(streq(a[5], "six=seis sechs sis"));
|
||||
- assert_se(streq(a[6], "seven=sevenval"));
|
||||
- assert_se(streq(a[7], "eight="));
|
||||
- assert_se(streq(a[8], "nine="));
|
||||
- assert_se(a[9] == NULL);
|
||||
-
|
||||
- r = write_env_file("/tmp/test-fileio", a);
|
||||
- assert_se(r >= 0);
|
||||
-
|
||||
- r = load_env_file("/tmp/test-fileio", NULL, &b);
|
||||
- assert_se(r >= 0);
|
||||
-
|
||||
- k = 0;
|
||||
- STRV_FOREACH(i, b) {
|
||||
- log_info("Got2: <%s>", *i);
|
||||
- assert_se(streq(*i, a[k++]));
|
||||
- }
|
||||
+ assert_se(streq(nine, "nineval"));
|
||||
+ assert_se(ten == NULL);
|
||||
|
||||
unlink(t);
|
||||
unlink("/tmp/test-fileio");
|
|
@ -0,0 +1,134 @@
|
|||
From fe5db02576a5ee267910679c8e330addcc77bea9 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 18 Apr 2013 10:15:25 +0200
|
||||
Subject: [PATCH] fileio.c: do not parse comments after non-whitespace chars
|
||||
|
||||
systemd does not want to understand comments after the first
|
||||
non-whitespace char occured.
|
||||
|
||||
key=foo #comment will result into key == "foo #comment"
|
||||
key="foo" #comment will result into key == "foo#comment"
|
||||
"key= #comment" will result into key == "#comment"
|
||||
"key #comment" is an invalid line
|
||||
(cherry picked from commit 98f59e59e0c31ffcb953d3a7dba0da5e6f2f55f7)
|
||||
---
|
||||
src/shared/fileio.c | 9 +++++----
|
||||
src/test/test-fileio.c | 26 ++++++++++++++------------
|
||||
2 files changed, 19 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
|
||||
index 4390726..f654af7 100644
|
||||
--- a/src/shared/fileio.c
|
||||
+++ b/src/shared/fileio.c
|
||||
@@ -239,7 +239,7 @@ static int parse_env_file_internal(
|
||||
break;
|
||||
|
||||
case PRE_VALUE:
|
||||
- if (strchr(newline, c) || strchr(COMMENTS, c)) {
|
||||
+ if (strchr(newline, c)) {
|
||||
state = PRE_KEY;
|
||||
key[n_key] = 0;
|
||||
|
||||
@@ -247,7 +247,7 @@ static int parse_env_file_internal(
|
||||
value[n_value] = 0;
|
||||
|
||||
/* strip trailing whitespace from key */
|
||||
- while(strchr(WHITESPACE, key[--n_key]))
|
||||
+ while(n_key && strchr(WHITESPACE, key[--n_key]))
|
||||
key[n_key]=0;
|
||||
|
||||
r = push(key, value, userdata);
|
||||
@@ -279,6 +279,7 @@ static int parse_env_file_internal(
|
||||
case VALUE:
|
||||
if (strchr(newline, c)) {
|
||||
state = PRE_KEY;
|
||||
+
|
||||
key[n_key] = 0;
|
||||
|
||||
if (value)
|
||||
@@ -289,7 +290,7 @@ static int parse_env_file_internal(
|
||||
value[last_whitespace] = 0;
|
||||
|
||||
/* strip trailing whitespace from key */
|
||||
- while(strchr(WHITESPACE, key[--n_key]))
|
||||
+ while(n_key && strchr(WHITESPACE, key[--n_key]))
|
||||
key[n_key]=0;
|
||||
|
||||
r = push(key, value, userdata);
|
||||
@@ -417,7 +418,7 @@ static int parse_env_file_internal(
|
||||
value[n_value] = 0;
|
||||
|
||||
/* strip trailing whitespace from key */
|
||||
- while(strchr(WHITESPACE, key[--n_key]))
|
||||
+ while(n_key && strchr(WHITESPACE, key[--n_key]))
|
||||
key[n_key]=0;
|
||||
|
||||
r = push(key, value, userdata);
|
||||
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
|
||||
index 2a74104..d56f7cc 100644
|
||||
--- a/src/test/test-fileio.c
|
||||
+++ b/src/test/test-fileio.c
|
||||
@@ -47,16 +47,18 @@ static void test_parse_env_file(void) {
|
||||
fputs("one=BAR \n"
|
||||
"# comment\n"
|
||||
" # comment \n"
|
||||
+ " ; comment \n"
|
||||
" two = bar \n"
|
||||
"invalid line\n"
|
||||
+ "invalid line #comment\n"
|
||||
"three = \"333\n"
|
||||
"xxxx\"\n"
|
||||
"four = \'44\\\"44\'\n"
|
||||
"five = \'55\\\'55\' \"FIVE\" cinco \n"
|
||||
"six = seis sechs\\\n"
|
||||
" sis\n"
|
||||
- "seven=\"sevenval\"#comment\n"
|
||||
- "eight=#comment\n"
|
||||
+ "seven=\"sevenval\" #nocomment\n"
|
||||
+ "eight=eightval #nocomment\n"
|
||||
"export nine=nineval\n"
|
||||
"ten=", f);
|
||||
|
||||
@@ -75,20 +77,14 @@ static void test_parse_env_file(void) {
|
||||
assert_se(streq(a[3], "four=44\"44"));
|
||||
assert_se(streq(a[4], "five=55\'55FIVEcinco"));
|
||||
assert_se(streq(a[5], "six=seis sechs sis"));
|
||||
- assert_se(streq(a[6], "seven=sevenval"));
|
||||
- assert_se(streq(a[7], "eight="));
|
||||
+ assert_se(streq(a[6], "seven=sevenval#nocomment"));
|
||||
+ assert_se(streq(a[7], "eight=eightval #nocomment"));
|
||||
assert_se(streq(a[8], "export nine=nineval"));
|
||||
assert_se(streq(a[9], "ten="));
|
||||
assert_se(a[10] == NULL);
|
||||
|
||||
strv_env_clean_log(a, "/tmp/test-fileio");
|
||||
|
||||
- r = write_env_file("/tmp/test-fileio", a);
|
||||
- assert_se(r >= 0);
|
||||
-
|
||||
- r = load_env_file("/tmp/test-fileio", NULL, &b);
|
||||
- assert_se(r >= 0);
|
||||
-
|
||||
k = 0;
|
||||
STRV_FOREACH(i, b) {
|
||||
log_info("Got2: <%s>", *i);
|
||||
@@ -128,11 +124,17 @@ static void test_parse_env_file(void) {
|
||||
assert_se(streq(four, "44\"44"));
|
||||
assert_se(streq(five, "55\'55FIVEcinco"));
|
||||
assert_se(streq(six, "seis sechs sis"));
|
||||
- assert_se(streq(seven, "sevenval"));
|
||||
- assert_se(eight == NULL);
|
||||
+ assert_se(streq(seven, "sevenval#nocomment"));
|
||||
+ assert_se(streq(eight, "eightval #nocomment"));
|
||||
assert_se(streq(nine, "nineval"));
|
||||
assert_se(ten == NULL);
|
||||
|
||||
+ r = write_env_file("/tmp/test-fileio", a);
|
||||
+ assert_se(r >= 0);
|
||||
+
|
||||
+ r = load_env_file("/tmp/test-fileio", NULL, &b);
|
||||
+ assert_se(r >= 0);
|
||||
+
|
||||
unlink(t);
|
||||
unlink("/tmp/test-fileio");
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
From 356482f8f8369f4e9ba09fe07cea0a00cfb5f45f Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Wed, 24 Apr 2013 15:44:28 -0300
|
||||
Subject: [PATCH] fileio: unify how we chop off whitespace from key and value
|
||||
in parse_env_file_internal() (cherry picked from commit
|
||||
2b77f67e78827cc7e85fb43b05d3e1623b31a1bf)
|
||||
|
||||
Conflicts:
|
||||
TODO
|
||||
---
|
||||
src/shared/fileio.c | 46 ++++++++++++++++++++++++++++++----------------
|
||||
1 file changed, 30 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/shared/fileio.c b/src/shared/fileio.c
|
||||
index f654af7..18a3645 100644
|
||||
--- a/src/shared/fileio.c
|
||||
+++ b/src/shared/fileio.c
|
||||
@@ -177,7 +177,7 @@ static int parse_env_file_internal(
|
||||
void *userdata) {
|
||||
|
||||
_cleanup_free_ char *contents = NULL, *key = NULL;
|
||||
- size_t key_alloc = 0, n_key = 0, value_alloc = 0, n_value = 0, last_whitespace = (size_t) -1;
|
||||
+ size_t key_alloc = 0, n_key = 0, value_alloc = 0, n_value = 0, last_value_whitespace = (size_t) -1, last_key_whitespace = (size_t) -1;
|
||||
char *p, *value = NULL;
|
||||
int r;
|
||||
|
||||
@@ -212,6 +212,8 @@ static int parse_env_file_internal(
|
||||
state = COMMENT;
|
||||
else if (!strchr(WHITESPACE, c)) {
|
||||
state = KEY;
|
||||
+ last_key_whitespace = (size_t) -1;
|
||||
+
|
||||
if (!greedy_realloc((void**) &key, &key_alloc, n_key+2)) {
|
||||
r = -ENOMEM;
|
||||
goto fail;
|
||||
@@ -225,9 +227,15 @@ static int parse_env_file_internal(
|
||||
if (strchr(newline, c)) {
|
||||
state = PRE_KEY;
|
||||
n_key = 0;
|
||||
- } else if (c == '=')
|
||||
+ } else if (c == '=') {
|
||||
state = PRE_VALUE;
|
||||
- else {
|
||||
+ last_value_whitespace = (size_t) -1;
|
||||
+ } else {
|
||||
+ if (!strchr(WHITESPACE, c))
|
||||
+ last_key_whitespace = (size_t) -1;
|
||||
+ else if (last_key_whitespace == (size_t) -1)
|
||||
+ last_key_whitespace = n_key;
|
||||
+
|
||||
if (!greedy_realloc((void**) &key, &key_alloc, n_key+2)) {
|
||||
r = -ENOMEM;
|
||||
goto fail;
|
||||
@@ -247,8 +255,8 @@ static int parse_env_file_internal(
|
||||
value[n_value] = 0;
|
||||
|
||||
/* strip trailing whitespace from key */
|
||||
- while(n_key && strchr(WHITESPACE, key[--n_key]))
|
||||
- key[n_key]=0;
|
||||
+ if (last_key_whitespace != (size_t) -1)
|
||||
+ key[last_key_whitespace] = 0;
|
||||
|
||||
r = push(key, value, userdata);
|
||||
if (r < 0)
|
||||
@@ -257,6 +265,7 @@ static int parse_env_file_internal(
|
||||
n_key = 0;
|
||||
value = NULL;
|
||||
value_alloc = n_value = 0;
|
||||
+
|
||||
} else if (c == '\'')
|
||||
state = SINGLE_QUOTE_VALUE;
|
||||
else if (c == '\"')
|
||||
@@ -285,13 +294,13 @@ static int parse_env_file_internal(
|
||||
if (value)
|
||||
value[n_value] = 0;
|
||||
|
||||
- /* Chomp off trailing whitespace */
|
||||
- if (last_whitespace != (size_t) -1)
|
||||
- value[last_whitespace] = 0;
|
||||
+ /* Chomp off trailing whitespace from value */
|
||||
+ if (last_value_whitespace != (size_t) -1)
|
||||
+ value[last_value_whitespace] = 0;
|
||||
|
||||
/* strip trailing whitespace from key */
|
||||
- while(n_key && strchr(WHITESPACE, key[--n_key]))
|
||||
- key[n_key]=0;
|
||||
+ if (last_key_whitespace != (size_t) -1)
|
||||
+ key[last_key_whitespace] = 0;
|
||||
|
||||
r = push(key, value, userdata);
|
||||
if (r < 0)
|
||||
@@ -300,14 +309,15 @@ static int parse_env_file_internal(
|
||||
n_key = 0;
|
||||
value = NULL;
|
||||
value_alloc = n_value = 0;
|
||||
+
|
||||
} else if (c == '\\') {
|
||||
state = VALUE_ESCAPE;
|
||||
- last_whitespace = (size_t) -1;
|
||||
+ last_value_whitespace = (size_t) -1;
|
||||
} else {
|
||||
if (!strchr(WHITESPACE, c))
|
||||
- last_whitespace = (size_t) -1;
|
||||
- else if (last_whitespace == (size_t) -1)
|
||||
- last_whitespace = n_value;
|
||||
+ last_value_whitespace = (size_t) -1;
|
||||
+ else if (last_value_whitespace == (size_t) -1)
|
||||
+ last_value_whitespace = n_value;
|
||||
|
||||
if (!greedy_realloc((void**) &value, &value_alloc, n_value+2)) {
|
||||
r = -ENOMEM;
|
||||
@@ -417,9 +427,13 @@ static int parse_env_file_internal(
|
||||
if (value)
|
||||
value[n_value] = 0;
|
||||
|
||||
+ if (state == VALUE)
|
||||
+ if (last_value_whitespace != (size_t) -1)
|
||||
+ value[last_value_whitespace] = 0;
|
||||
+
|
||||
/* strip trailing whitespace from key */
|
||||
- while(n_key && strchr(WHITESPACE, key[--n_key]))
|
||||
- key[n_key]=0;
|
||||
+ if (last_key_whitespace != (size_t) -1)
|
||||
+ key[last_key_whitespace] = 0;
|
||||
|
||||
r = push(key, value, userdata);
|
||||
if (r < 0)
|
|
@ -0,0 +1,24 @@
|
|||
From 652bba47f77d7ba9583f91d2322221ef2e7c4d07 Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 18 Apr 2013 07:15:03 +0200
|
||||
Subject: [PATCH] core/execute: only clean the environment, if we have one
|
||||
(cherry picked from commit 5521d6985648669a65d0529bb01c7a32edc99294)
|
||||
|
||||
---
|
||||
src/core/execute.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/execute.c b/src/core/execute.c
|
||||
index 4b29d8e..11993df 100644
|
||||
--- a/src/core/execute.c
|
||||
+++ b/src/core/execute.c
|
||||
@@ -1757,7 +1757,8 @@ int exec_context_load_environment(const ExecContext *c, char ***l) {
|
||||
return k;
|
||||
}
|
||||
/* Log invalid environment variables with filename */
|
||||
- p = strv_env_clean_log(p, pglob.gl_pathv[n]);
|
||||
+ if (p)
|
||||
+ p = strv_env_clean_log(p, pglob.gl_pathv[n]);
|
||||
|
||||
if (r == NULL)
|
||||
r = p;
|
|
@ -0,0 +1,72 @@
|
|||
From 3c08015f7e0bd1837926f5a44494c2e562abce0a Mon Sep 17 00:00:00 2001
|
||||
From: Colin Walters <walters@verbum.org>
|
||||
Date: Thu, 22 Aug 2013 13:55:21 -0400
|
||||
Subject: [PATCH] polkit: Avoid race condition in scraping /proc
|
||||
|
||||
If a calling process execve()s a setuid program, it can appear to be
|
||||
uid 0. Since we're receiving requests over DBus, avoid this by simply
|
||||
passing system-bus-name as a subject.
|
||||
---
|
||||
src/shared/polkit.c | 31 +++++--------------------------
|
||||
1 file changed, 5 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/src/shared/polkit.c b/src/shared/polkit.c
|
||||
index cea7074..1c5e9e3 100644
|
||||
--- a/src/shared/polkit.c
|
||||
+++ b/src/shared/polkit.c
|
||||
@@ -38,12 +38,8 @@ int verify_polkit(
|
||||
|
||||
#ifdef ENABLE_POLKIT
|
||||
DBusMessage *m = NULL, *reply = NULL;
|
||||
- const char *unix_process = "unix-process", *pid = "pid", *starttime = "start-time", *cancel_id = "";
|
||||
+ const char *system_bus_name = "system-bus-name", *name = "name", *cancel_id = "";
|
||||
uint32_t flags = interactive ? 1 : 0;
|
||||
- pid_t pid_raw;
|
||||
- uint32_t pid_u32;
|
||||
- unsigned long long starttime_raw;
|
||||
- uint64_t starttime_u64;
|
||||
DBusMessageIter iter_msg, iter_struct, iter_array, iter_dict, iter_variant;
|
||||
int r;
|
||||
dbus_bool_t authorized = FALSE, challenge = FALSE;
|
||||
@@ -68,14 +64,6 @@ int verify_polkit(
|
||||
|
||||
#ifdef ENABLE_POLKIT
|
||||
|
||||
- pid_raw = bus_get_unix_process_id(c, sender, error);
|
||||
- if (pid_raw == 0)
|
||||
- return -EINVAL;
|
||||
-
|
||||
- r = get_starttime_of_pid(pid_raw, &starttime_raw);
|
||||
- if (r < 0)
|
||||
- return r;
|
||||
-
|
||||
m = dbus_message_new_method_call(
|
||||
"org.freedesktop.PolicyKit1",
|
||||
"/org/freedesktop/PolicyKit1/Authority",
|
||||
@@ -86,22 +74,13 @@ int verify_polkit(
|
||||
|
||||
dbus_message_iter_init_append(m, &iter_msg);
|
||||
|
||||
- pid_u32 = (uint32_t) pid_raw;
|
||||
- starttime_u64 = (uint64_t) starttime_raw;
|
||||
-
|
||||
if (!dbus_message_iter_open_container(&iter_msg, DBUS_TYPE_STRUCT, NULL, &iter_struct) ||
|
||||
- !dbus_message_iter_append_basic(&iter_struct, DBUS_TYPE_STRING, &unix_process) ||
|
||||
+ !dbus_message_iter_append_basic(&iter_struct, DBUS_TYPE_STRING, &system_bus_name) ||
|
||||
!dbus_message_iter_open_container(&iter_struct, DBUS_TYPE_ARRAY, "{sv}", &iter_array) ||
|
||||
!dbus_message_iter_open_container(&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict) ||
|
||||
- !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &pid) ||
|
||||
- !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "u", &iter_variant) ||
|
||||
- !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_UINT32, &pid_u32) ||
|
||||
- !dbus_message_iter_close_container(&iter_dict, &iter_variant) ||
|
||||
- !dbus_message_iter_close_container(&iter_array, &iter_dict) ||
|
||||
- !dbus_message_iter_open_container(&iter_array, DBUS_TYPE_DICT_ENTRY, NULL, &iter_dict) ||
|
||||
- !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &starttime) ||
|
||||
- !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "t", &iter_variant) ||
|
||||
- !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_UINT64, &starttime_u64) ||
|
||||
+ !dbus_message_iter_append_basic(&iter_dict, DBUS_TYPE_STRING, &name) ||
|
||||
+ !dbus_message_iter_open_container(&iter_dict, DBUS_TYPE_VARIANT, "s", &iter_variant) ||
|
||||
+ !dbus_message_iter_append_basic(&iter_variant, DBUS_TYPE_STRING, &sender) ||
|
||||
!dbus_message_iter_close_container(&iter_dict, &iter_variant) ||
|
||||
!dbus_message_iter_close_container(&iter_array, &iter_dict) ||
|
||||
!dbus_message_iter_close_container(&iter_struct, &iter_array) ||
|
|
@ -0,0 +1,28 @@
|
|||
From 7082b70cd047b61bb22150689fb85608b4c026a2 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20Bartoszkiewicz?= <mbartoszkiewicz@gmail.com>
|
||||
Date: Wed, 15 May 2013 11:28:58 +0200
|
||||
Subject: [PATCH] journal: correctly convert usec_t to timespec.
|
||||
|
||||
Use timespec_store instead of (incorrectly) doing it inline.
|
||||
---
|
||||
src/journal/journald-server.c | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
||||
index 96fefa4..a44d359 100644
|
||||
--- a/src/journal/journald-server.c
|
||||
+++ b/src/journal/journald-server.c
|
||||
@@ -1384,10 +1384,9 @@ int server_schedule_sync(Server *s) {
|
||||
return 0;
|
||||
|
||||
if (s->sync_interval_usec) {
|
||||
- struct itimerspec sync_timer_enable = {
|
||||
- .it_value.tv_sec = s->sync_interval_usec / USEC_PER_SEC,
|
||||
- .it_value.tv_nsec = s->sync_interval_usec % MSEC_PER_SEC,
|
||||
- };
|
||||
+ struct itimerspec sync_timer_enable = {};
|
||||
+
|
||||
+ timespec_store(&sync_timer_enable.it_value, s->sync_interval_usec);
|
||||
|
||||
r = timerfd_settime(s->sync_timer_fd, 0, &sync_timer_enable, NULL);
|
||||
if (r < 0)
|
|
@ -0,0 +1,47 @@
|
|||
From 05e3a4c68cf81d8feaedaec233183a6438942dfb Mon Sep 17 00:00:00 2001
|
||||
From: Michael Olbrich <m.olbrich@pengutronix.de>
|
||||
Date: Sun, 19 May 2013 12:10:55 +0200
|
||||
Subject: [PATCH] service: kill processes with SIGKILL on watchdog failure
|
||||
|
||||
Just calling service_enter_dead() does not kill any processes.
|
||||
As a result, the old process may still be running when the new one is
|
||||
started.
|
||||
|
||||
After a watchdog failure the service is in an undefined state.
|
||||
Using the normal shutdown mechanism makes no sense. Instead all processes
|
||||
are just killed and the service can try to restart.
|
||||
---
|
||||
src/core/service.c | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index 9682fc3..0297eb5 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -235,7 +235,7 @@ static void service_stop_watchdog(Service *s) {
|
||||
s->watchdog_timestamp.monotonic = 0;
|
||||
}
|
||||
|
||||
-static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart);
|
||||
+static void service_enter_signal(Service *s, ServiceState state, ServiceResult f);
|
||||
|
||||
static void service_handle_watchdog(Service *s) {
|
||||
usec_t offset;
|
||||
@@ -249,7 +249,7 @@ static void service_handle_watchdog(Service *s) {
|
||||
offset = now(CLOCK_MONOTONIC) - s->watchdog_timestamp.monotonic;
|
||||
if (offset >= s->watchdog_usec) {
|
||||
log_error_unit(UNIT(s)->id, "%s watchdog timeout!", UNIT(s)->id);
|
||||
- service_enter_dead(s, SERVICE_FAILURE_WATCHDOG, true);
|
||||
+ service_enter_signal(s, SERVICE_FINAL_SIGKILL, SERVICE_FAILURE_WATCHDOG);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1952,8 +1952,6 @@ fail:
|
||||
service_enter_dead(s, SERVICE_FAILURE_RESOURCES, false);
|
||||
}
|
||||
|
||||
-static void service_enter_signal(Service *s, ServiceState state, ServiceResult f);
|
||||
-
|
||||
static void service_enter_stop_post(Service *s, ServiceResult f) {
|
||||
int r;
|
||||
assert(s);
|
|
@ -0,0 +1,24 @@
|
|||
From b6f25a95f84ade3843428a92de84deff0f1bf31a Mon Sep 17 00:00:00 2001
|
||||
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
||||
Date: Fri, 24 May 2013 13:34:53 -0400
|
||||
Subject: [PATCH] Fix CPUShares configuration option
|
||||
|
||||
This fixes the error message "Unknown or unsupported cgroup attribute
|
||||
CPUShares".
|
||||
---
|
||||
src/core/cgroup-semantics.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/cgroup-semantics.c b/src/core/cgroup-semantics.c
|
||||
index 82b02bb..7df9d01 100644
|
||||
--- a/src/core/cgroup-semantics.c
|
||||
+++ b/src/core/cgroup-semantics.c
|
||||
@@ -255,7 +255,7 @@ static int map_blkio(const CGroupSemantics *s, const char *value, char **ret) {
|
||||
}
|
||||
|
||||
static const CGroupSemantics semantics[] = {
|
||||
- { "cpu", "cpu.shares", "CPUShare", false, parse_cpu_shares, NULL, NULL },
|
||||
+ { "cpu", "cpu.shares", "CPUShares", false, parse_cpu_shares, NULL, NULL },
|
||||
{ "memory", "memory.soft_limit_in_bytes", "MemorySoftLimit", false, parse_memory_limit, NULL, NULL },
|
||||
{ "memory", "memory.limit_in_bytes", "MemoryLimit", false, parse_memory_limit, NULL, NULL },
|
||||
{ "devices", "devices.allow", "DeviceAllow", true, parse_device, map_device, NULL },
|
|
@ -0,0 +1,29 @@
|
|||
From c3926429efb09c2264f25b0fa60e1e9f0738f067 Mon Sep 17 00:00:00 2001
|
||||
From: Ross Lagerwall <rosslagerwall@gmail.com>
|
||||
Date: Sun, 9 Jun 2013 17:28:44 +0100
|
||||
Subject: [PATCH] service: don't report alien child as alive when it's not
|
||||
|
||||
When a sigchld is received from an alien child, main_pid is set to
|
||||
0 then service_enter_running calls main_pid_good to check if the
|
||||
child is running. This incorrectly returned true because
|
||||
kill(main_pid, 0) would return >= 0.
|
||||
|
||||
This fixes an error where a service would die and the cgroup would
|
||||
become empty but the service would still report as active (running).
|
||||
---
|
||||
src/core/service.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index 0297eb5..2be8623 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -1878,7 +1878,7 @@ static int main_pid_good(Service *s) {
|
||||
|
||||
/* If it's an alien child let's check if it is still
|
||||
* alive ... */
|
||||
- if (s->main_pid_alien)
|
||||
+ if (s->main_pid_alien && s->main_pid > 0)
|
||||
return kill(s->main_pid, 0) >= 0 || errno != ESRCH;
|
||||
|
||||
/* .. otherwise assume we'll get a SIGCHLD for it,
|
|
@ -0,0 +1,101 @@
|
|||
From 93dcf370240827f847077941e24a165e3882d012 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Thu, 6 Jun 2013 22:28:05 -0400
|
||||
Subject: [PATCH] journal: remember last direction of search and keep offset
|
||||
cache
|
||||
|
||||
The fields in JournalFile are moved around to avoid wasting
|
||||
7 bytes because of alignment.
|
||||
|
||||
Conflicts:
|
||||
TODO
|
||||
---
|
||||
src/journal/journal-file.h | 18 +++++++++++-------
|
||||
src/journal/sd-journal.c | 8 +++++---
|
||||
2 files changed, 16 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h
|
||||
index 0eab501..aeaaa90 100644
|
||||
--- a/src/journal/journal-file.h
|
||||
+++ b/src/journal/journal-file.h
|
||||
@@ -42,10 +42,14 @@ typedef struct JournalMetrics {
|
||||
uint64_t keep_free;
|
||||
} JournalMetrics;
|
||||
|
||||
+typedef enum direction {
|
||||
+ DIRECTION_UP,
|
||||
+ DIRECTION_DOWN
|
||||
+} direction_t;
|
||||
+
|
||||
typedef struct JournalFile {
|
||||
int fd;
|
||||
- char *path;
|
||||
- struct stat last_stat;
|
||||
+
|
||||
mode_t mode;
|
||||
|
||||
int flags;
|
||||
@@ -56,6 +60,11 @@ typedef struct JournalFile {
|
||||
|
||||
bool tail_entry_monotonic_valid;
|
||||
|
||||
+ direction_t last_direction;
|
||||
+
|
||||
+ char *path;
|
||||
+ struct stat last_stat;
|
||||
+
|
||||
Header *header;
|
||||
HashItem *data_hash_table;
|
||||
HashItem *field_hash_table;
|
||||
@@ -90,11 +99,6 @@ typedef struct JournalFile {
|
||||
#endif
|
||||
} JournalFile;
|
||||
|
||||
-typedef enum direction {
|
||||
- DIRECTION_UP,
|
||||
- DIRECTION_DOWN
|
||||
-} direction_t;
|
||||
-
|
||||
int journal_file_open(
|
||||
const char *fname,
|
||||
int flags,
|
||||
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
|
||||
index 7e06a70..30042e4 100644
|
||||
--- a/src/journal/sd-journal.c
|
||||
+++ b/src/journal/sd-journal.c
|
||||
@@ -101,7 +101,8 @@ static void init_location(Location *l, LocationType type, JournalFile *f, Object
|
||||
l->seqnum_set = l->realtime_set = l->monotonic_set = l->xor_hash_set = true;
|
||||
}
|
||||
|
||||
-static void set_location(sd_journal *j, LocationType type, JournalFile *f, Object *o, uint64_t offset) {
|
||||
+static void set_location(sd_journal *j, LocationType type, JournalFile *f, Object *o,
|
||||
+ direction_t direction, uint64_t offset) {
|
||||
assert(j);
|
||||
assert(type == LOCATION_DISCRETE || type == LOCATION_SEEK);
|
||||
assert(f);
|
||||
@@ -112,6 +113,7 @@ static void set_location(sd_journal *j, LocationType type, JournalFile *f, Objec
|
||||
j->current_file = f;
|
||||
j->current_field = 0;
|
||||
|
||||
+ f->last_direction = direction;
|
||||
f->current_offset = offset;
|
||||
}
|
||||
|
||||
@@ -797,7 +799,7 @@ static int next_beyond_location(sd_journal *j, JournalFile *f, direction_t direc
|
||||
assert(j);
|
||||
assert(f);
|
||||
|
||||
- if (f->current_offset > 0) {
|
||||
+ if (f->last_direction == direction && f->current_offset > 0) {
|
||||
cp = f->current_offset;
|
||||
|
||||
r = journal_file_move_to_object(f, OBJECT_ENTRY, cp, &c);
|
||||
@@ -894,7 +896,7 @@ static int real_journal_next(sd_journal *j, direction_t direction) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
- set_location(j, LOCATION_DISCRETE, new_file, o, new_offset);
|
||||
+ set_location(j, LOCATION_DISCRETE, new_file, o, direction, new_offset);
|
||||
|
||||
return 1;
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
From 85f06598d73770d2aa5bb8ba9fbefafb2b002c60 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Fri, 7 Jun 2013 22:01:03 -0400
|
||||
Subject: [PATCH] journal: letting (interleaved) seqnums go
|
||||
|
||||
In the following scenario:
|
||||
server creates system.journal
|
||||
server creates user-1000.journal
|
||||
both journals share the same seqnum_id.
|
||||
Then
|
||||
server writes to user-1000.journal first,
|
||||
and server writes to system.journal a bit later,
|
||||
and everything is fine.
|
||||
The server then terminates (crash, reboot, rsyslog testing,
|
||||
whatever), and user-1000.journal has entries which end with
|
||||
a lower seqnum than system.journal. Now
|
||||
server is restarted
|
||||
server opens user-1000.journal and writes entries to it...
|
||||
BAM! duplicate seqnums for the same seqnum_id.
|
||||
|
||||
Now, we usually don't see that happen, because system.journal
|
||||
is closed last, and opened first. Since usually at least one
|
||||
message is written during boot and lands in the system.journal,
|
||||
the seqnum is initialized from it, and is set to a number higher
|
||||
than than anything found in user journals. Nevertheless, if
|
||||
system.journal is corrupted and is rotated, it can happen that
|
||||
an entry is written to the user journal with a seqnum that is
|
||||
a duplicate with an entry found in the corrupted system.journal~.
|
||||
When browsing the journal, journalctl can fall into a loop
|
||||
where it tries to follow the seqnums, and tries to go the
|
||||
next location by seqnum, and is transported back in time to
|
||||
to the older duplicate seqnum. There is not way to find
|
||||
out the maximum seqnum used in a multiple files, without
|
||||
actually looking at all of them. But we don't want to do
|
||||
that because it would be slow, and actually it isn't really
|
||||
possible, because a file might e.g. be temporarily unaccessible.
|
||||
|
||||
Fix the problem by using different seqnum series for user
|
||||
journals. Using the same seqnum series for rotated journals
|
||||
is still fine, because we know that nothing will write
|
||||
to the rotated journal anymore.
|
||||
|
||||
Likely related:
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=64566
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=59856
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=64296
|
||||
https://bugs.archlinux.org/task/35581
|
||||
https://bugzilla.novell.com/show_bug.cgi?id=817778
|
||||
|
||||
Possibly related:
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=64293
|
||||
---
|
||||
src/journal/journald-server.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
||||
index a44d359..d1e0e76 100644
|
||||
--- a/src/journal/journald-server.c
|
||||
+++ b/src/journal/journald-server.c
|
||||
@@ -284,7 +284,7 @@ static JournalFile* find_journal(Server *s, uid_t uid) {
|
||||
journal_file_close(f);
|
||||
}
|
||||
|
||||
- r = journal_file_open_reliably(p, O_RDWR|O_CREAT, 0640, s->compress, s->seal, &s->system_metrics, s->mmap, s->system_journal, &f);
|
||||
+ r = journal_file_open_reliably(p, O_RDWR|O_CREAT, 0640, s->compress, s->seal, &s->system_metrics, s->mmap, NULL, &f);
|
||||
free(p);
|
||||
|
||||
if (r < 0)
|
|
@ -0,0 +1,39 @@
|
|||
From 5d7c6f8db1dba1a928701b72213f6f09fe9e19df Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
Date: Sat, 20 Jul 2013 14:29:12 +0200
|
||||
Subject: [PATCH] rules: drivers - always call kmod, even when a driver is
|
||||
bound to the device
|
||||
|
||||
On Sat, Jul 20, 2013 at 12:56 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
|
||||
> After a recent change present in 3.11-rc1 there is a driver, called processor,
|
||||
> that can be bound to the CPU devices whose sysfs directories are located under
|
||||
> /sys/devices/system/cpu/. A side effect of this is that, after the driver has
|
||||
> been bound to those devices, the kernel adds DRIVER=processor to ENV for CPU
|
||||
> uevents and they don't match the default rule for autoloading modules matching
|
||||
> MODALIAS:
|
||||
>
|
||||
> DRIVER!="?*", ENV{MODALIAS}=="?*", IMPORT{builtin}="kmod load $env{MODALIAS}"
|
||||
>
|
||||
> any more. However, there are some modules whose module aliases match specific
|
||||
> CPU features through the modalias string and those modules should be loaded
|
||||
> automatically if a compatible CPU is present. Yet, with the processor driver
|
||||
> bound to the CPU devices the above rule is not sufficient for that, so we need
|
||||
> a new default udev rule allowing those modules to be autoloaded even if the
|
||||
> CPU devices have drivers.
|
||||
---
|
||||
rules/80-drivers.rules | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rules/80-drivers.rules b/rules/80-drivers.rules
|
||||
index 50523e4..0b22d73 100644
|
||||
--- a/rules/80-drivers.rules
|
||||
+++ b/rules/80-drivers.rules
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
ACTION=="remove", GOTO="drivers_end"
|
||||
|
||||
-DRIVER!="?*", ENV{MODALIAS}=="?*", RUN{builtin}="kmod load $env{MODALIAS}"
|
||||
+ENV{MODALIAS}=="?*", RUN{builtin}="kmod load $env{MODALIAS}"
|
||||
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN{builtin}="kmod load tifm_sd"
|
||||
SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN{builtin}="kmod load tifm_ms"
|
||||
SUBSYSTEM=="memstick", RUN{builtin}="kmod load ms_block mspro_block"
|
|
@ -0,0 +1,39 @@
|
|||
From 85abe611e7220811e0db7c606f0c46137f6f1d7e Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
Date: Thu, 1 Aug 2013 12:31:38 +0200
|
||||
Subject: [PATCH] 80-net-name-slot.rules: only rename network interfaces on
|
||||
ACTION=="add"
|
||||
|
||||
Otherwise systemd-udevd will rename on "change" and "move" events,
|
||||
resulting in weird renames in combination with biosdevname
|
||||
|
||||
systemd-udevd[355]: renamed network interface eth0 to em1
|
||||
systemd-udevd[355]: renamed network interface eth1 to p3p2
|
||||
systemd-udevd[357]: renamed network interface eth0 to p3p1
|
||||
systemd-udevd[429]: renamed network interface p3p2 to ens3f1
|
||||
systemd-udevd[428]: renamed network interface p3p1 to ens3f0
|
||||
systemd-udevd[426]: renamed network interface em1 to enp63s0
|
||||
|
||||
or
|
||||
|
||||
systemd-udevd[356]: renamed network interface eth0 to em1
|
||||
systemd-udevd[356]: renamed network interface eth0 to p3p1
|
||||
systemd-udevd[420]: renamed network interface p3p1 to ens3f0
|
||||
systemd-udevd[418]: renamed network interface em1 to enp63s0
|
||||
systemd-udevd[421]: renamed network interface eth1 to p3p1
|
||||
---
|
||||
rules/80-net-name-slot.rules | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rules/80-net-name-slot.rules b/rules/80-net-name-slot.rules
|
||||
index c0f66d1..4738e53 100644
|
||||
--- a/rules/80-net-name-slot.rules
|
||||
+++ b/rules/80-net-name-slot.rules
|
||||
@@ -1,6 +1,6 @@
|
||||
# do not edit this file, it will be overwritten on update
|
||||
|
||||
-ACTION=="remove", GOTO="net_name_slot_end"
|
||||
+ACTION!="add", GOTO="net_name_slot_end"
|
||||
SUBSYSTEM!="net", GOTO="net_name_slot_end"
|
||||
NAME!="", GOTO="net_name_slot_end"
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
From 81be5f2e0346d3cb52ed5f49414604b071ce38cb Mon Sep 17 00:00:00 2001
|
||||
From: George McCollister <george.mccollister@gmail.com>
|
||||
Date: Thu, 1 Aug 2013 12:40:01 -0500
|
||||
Subject: [PATCH] journal: fix hashmap leak in mmap-cache
|
||||
|
||||
hashmap_free() wasn't being called on m->contexts and m->fds resulting
|
||||
in a leak.
|
||||
|
||||
To reproduce do:
|
||||
while(1) {
|
||||
sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
|
||||
sd_journal_close(j);
|
||||
}
|
||||
|
||||
Memory usage will increase until OOM.
|
||||
---
|
||||
src/journal/mmap-cache.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/journal/mmap-cache.c b/src/journal/mmap-cache.c
|
||||
index 251aefe..566abd9 100644
|
||||
--- a/src/journal/mmap-cache.c
|
||||
+++ b/src/journal/mmap-cache.c
|
||||
@@ -308,9 +308,13 @@ static void mmap_cache_free(MMapCache *m) {
|
||||
while ((c = hashmap_first(m->contexts)))
|
||||
context_free(c);
|
||||
|
||||
+ hashmap_free(m->contexts);
|
||||
+
|
||||
while ((f = hashmap_first(m->fds)))
|
||||
fd_free(f);
|
||||
|
||||
+ hashmap_free(m->fds);
|
||||
+
|
||||
while (m->unused)
|
||||
window_free(m->unused);
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
From ffc196d5b143edce5bdfabbcb74a91a5613f55aa Mon Sep 17 00:00:00 2001
|
||||
From: WANG Chao <chaowang@redhat.com>
|
||||
Date: Fri, 9 Aug 2013 17:01:50 +0800
|
||||
Subject: [PATCH] fstab-generator: read rd.fstab=on/off switch correctly
|
||||
|
||||
---
|
||||
src/fstab-generator/fstab-generator.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
|
||||
index 2790fc6..682acae 100644
|
||||
--- a/src/fstab-generator/fstab-generator.c
|
||||
+++ b/src/fstab-generator/fstab-generator.c
|
||||
@@ -596,9 +596,9 @@ static int parse_proc_cmdline(void) {
|
||||
} else if (startswith(word, "rd.fstab=")) {
|
||||
|
||||
if (in_initrd()) {
|
||||
- r = parse_boolean(word + 6);
|
||||
+ r = parse_boolean(word + 9);
|
||||
if (r < 0)
|
||||
- log_warning("Failed to parse fstab switch %s. Ignoring.", word + 6);
|
||||
+ log_warning("Failed to parse fstab switch %s. Ignoring.", word + 9);
|
||||
else
|
||||
arg_enabled = r;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
From 3e95626052ae3f354c25377a33879c297fd3a982 Mon Sep 17 00:00:00 2001
|
||||
From: WANG Chao <chaowang@redhat.com>
|
||||
Date: Tue, 13 Aug 2013 16:38:19 +0800
|
||||
Subject: [PATCH] fstab-generator: log_oom() if automount_name is null
|
||||
|
||||
---
|
||||
src/fstab-generator/fstab-generator.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
|
||||
index 682acae..97ec8d7 100644
|
||||
--- a/src/fstab-generator/fstab-generator.c
|
||||
+++ b/src/fstab-generator/fstab-generator.c
|
||||
@@ -351,7 +351,7 @@ static int add_mount(
|
||||
|
||||
if (automount && !path_equal(where, "/")) {
|
||||
automount_name = unit_name_from_path(where, ".automount");
|
||||
- if (!name)
|
||||
+ if (!automount_name)
|
||||
return log_oom();
|
||||
|
||||
automount_unit = strjoin(arg_dest, "/", automount_name, NULL);
|
|
@ -0,0 +1,24 @@
|
|||
From de2ebe8ea8274696474fac8da1b93c3180b5c3d1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 10 Jun 2013 18:10:12 -0400
|
||||
Subject: [PATCH] journald: do not overwrite syslog facility when parsing
|
||||
priority
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=65610
|
||||
---
|
||||
src/journal/journald-syslog.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
|
||||
index 000f5ac..4aeb9a3 100644
|
||||
--- a/src/journal/journald-syslog.c
|
||||
+++ b/src/journal/journald-syslog.c
|
||||
@@ -268,7 +268,7 @@ void syslog_parse_priority(char **p, int *priority) {
|
||||
if (a < 0 || b < 0 || c < 0)
|
||||
return;
|
||||
|
||||
- *priority = a*100+b*10+c;
|
||||
+ *priority = (*priority & LOG_FACMASK) | (a*100 + b*10 + c);
|
||||
*p += k;
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
From b4987c2ae0632cfcaf616c0f5d6ca719f37449f3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Fri, 26 Jul 2013 12:57:33 -0400
|
||||
Subject: [PATCH] journal: fix parsing of facility in syslog messages
|
||||
|
||||
In 49998b383 (journald: do not overwrite syslog facility when
|
||||
parsing priority) journald started ignoring facility part when
|
||||
reading service stderr to convert to syslog messages. In this
|
||||
case it is fine, because only the priority is allowed.
|
||||
|
||||
But the same codepath is used for syslog messages, where the
|
||||
facility should be used. Split the two codepaths by explicitly
|
||||
specyfing whether the facility should be ignored or not.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=988814
|
||||
---
|
||||
src/journal/journald-stream.c | 2 +-
|
||||
src/journal/journald-syslog.c | 12 ++++++++----
|
||||
src/journal/journald-syslog.h | 2 +-
|
||||
3 files changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
|
||||
index 6d51c29..ad5df4c 100644
|
||||
--- a/src/journal/journald-stream.c
|
||||
+++ b/src/journal/journald-stream.c
|
||||
@@ -90,7 +90,7 @@ static int stdout_stream_log(StdoutStream *s, const char *p) {
|
||||
priority = s->priority;
|
||||
|
||||
if (s->level_prefix)
|
||||
- syslog_parse_priority((char**) &p, &priority);
|
||||
+ syslog_parse_priority((char**) &p, &priority, false);
|
||||
|
||||
if (s->forward_to_syslog || s->server->forward_to_syslog)
|
||||
server_forward_syslog(s->server, syslog_fixup_facility(priority), s->identifier, p, &s->ucred, NULL);
|
||||
diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c
|
||||
index 4aeb9a3..88d2a87 100644
|
||||
--- a/src/journal/journald-syslog.c
|
||||
+++ b/src/journal/journald-syslog.c
|
||||
@@ -236,7 +236,7 @@ size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid)
|
||||
return e;
|
||||
}
|
||||
|
||||
-void syslog_parse_priority(char **p, int *priority) {
|
||||
+void syslog_parse_priority(char **p, int *priority, bool with_facility) {
|
||||
int a = 0, b = 0, c = 0;
|
||||
int k;
|
||||
|
||||
@@ -265,10 +265,14 @@ void syslog_parse_priority(char **p, int *priority) {
|
||||
} else
|
||||
return;
|
||||
|
||||
- if (a < 0 || b < 0 || c < 0)
|
||||
+ if (a < 0 || b < 0 || c < 0 ||
|
||||
+ (!with_facility && (a || b || c > 7)))
|
||||
return;
|
||||
|
||||
- *priority = (*priority & LOG_FACMASK) | (a*100 + b*10 + c);
|
||||
+ if (with_facility)
|
||||
+ *priority = a*100 + b*10 + c;
|
||||
+ else
|
||||
+ *priority = (*priority & LOG_FACMASK) | c;
|
||||
*p += k;
|
||||
}
|
||||
|
||||
@@ -361,7 +365,7 @@ void server_process_syslog_message(
|
||||
assert(buf);
|
||||
|
||||
orig = buf;
|
||||
- syslog_parse_priority((char**) &buf, &priority);
|
||||
+ syslog_parse_priority((char**) &buf, &priority, true);
|
||||
|
||||
if (s->forward_to_syslog)
|
||||
forward_syslog_raw(s, priority, orig, ucred, tv);
|
||||
diff --git a/src/journal/journald-syslog.h b/src/journal/journald-syslog.h
|
||||
index 7ff215b..b35062c 100644
|
||||
--- a/src/journal/journald-syslog.h
|
||||
+++ b/src/journal/journald-syslog.h
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
int syslog_fixup_facility(int priority);
|
||||
|
||||
-void syslog_parse_priority(char **p, int *priority);
|
||||
+void syslog_parse_priority(char **p, int *priority, bool with_facility);
|
||||
size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid);
|
||||
|
||||
void server_forward_syslog(Server *s, int priority, const char *identifier, const char *message, struct ucred *ucred, struct timeval *tv);
|
|
@ -0,0 +1,49 @@
|
|||
From d6a64294417e6bf3ffa251a4d2d934a3cbb06206 Mon Sep 17 00:00:00 2001
|
||||
From: David Herrmann <dh.herrmann@gmail.com>
|
||||
Date: Wed, 4 Sep 2013 12:36:19 +0200
|
||||
Subject: [PATCH] libudev: fix memleak when enumerating childs
|
||||
|
||||
We need to free udev-devices again if they don't match. Funny that no-one
|
||||
noticed it yet since valgrind is quite verbose about it.
|
||||
Fix it and free non-matching devices.
|
||||
---
|
||||
src/libudev/libudev-enumerate.c | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
|
||||
index 5ccaabd..7e63820 100644
|
||||
--- a/src/libudev/libudev-enumerate.c
|
||||
+++ b/src/libudev/libudev-enumerate.c
|
||||
@@ -826,23 +826,27 @@ nomatch:
|
||||
static int parent_add_child(struct udev_enumerate *enumerate, const char *path)
|
||||
{
|
||||
struct udev_device *dev;
|
||||
+ int r = 0;
|
||||
|
||||
dev = udev_device_new_from_syspath(enumerate->udev, path);
|
||||
if (dev == NULL)
|
||||
return -ENODEV;
|
||||
|
||||
if (!match_subsystem(enumerate, udev_device_get_subsystem(dev)))
|
||||
- return 0;
|
||||
+ goto nomatch;
|
||||
if (!match_sysname(enumerate, udev_device_get_sysname(dev)))
|
||||
- return 0;
|
||||
+ goto nomatch;
|
||||
if (!match_property(enumerate, dev))
|
||||
- return 0;
|
||||
+ goto nomatch;
|
||||
if (!match_sysattr(enumerate, dev))
|
||||
- return 0;
|
||||
+ goto nomatch;
|
||||
|
||||
syspath_add(enumerate, udev_device_get_syspath(dev));
|
||||
+ r = 1;
|
||||
+
|
||||
+nomatch:
|
||||
udev_device_unref(dev);
|
||||
- return 1;
|
||||
+ return r;
|
||||
}
|
||||
|
||||
static int parent_crawl_children(struct udev_enumerate *enumerate, const char *path, int maxdepth)
|
|
@ -0,0 +1,44 @@
|
|||
From c12b91d4581984e5a7cca174d84966056cdfb512 Mon Sep 17 00:00:00 2001
|
||||
From: David Herrmann <dh.herrmann@gmail.com>
|
||||
Date: Fri, 30 Aug 2013 15:50:41 +0200
|
||||
Subject: [PATCH] libudev: enumerate: fix NULL-deref for subsystem-matches
|
||||
|
||||
udev_device_get_subsystem() may return NULL if no subsystem could be
|
||||
figured out by libudev. This might be due to OOM or if the device
|
||||
disconnected between the udev_device_new() call and
|
||||
udev_device_get_subsystem(). Therefore, we need to handle subsystem==NULL
|
||||
safely.
|
||||
|
||||
Instead of testing for it in each helper, we treat subsystem==NULL as
|
||||
empty subsystem in match_subsystem().
|
||||
|
||||
Backtrace of udev_enumerate with an input-device disconnecting in exactly
|
||||
this time-frame:
|
||||
(gdb) bt
|
||||
#0 0x00007ffff569dc24 in strnlen () from /usr/lib/libc.so.6
|
||||
#1 0x00007ffff56d9e04 in fnmatch@@GLIBC_2.2.5 () from /usr/lib/libc.so.6
|
||||
#2 0x00007ffff5beb83d in match_subsystem (udev_enumerate=0x7a05f0, subsystem=0x0) at src/libudev/libudev-enumerate.c:727
|
||||
#3 0x00007ffff5bebb30 in parent_add_child (enumerate=enumerate@entry=0x7a05f0, path=<optimized out>) at src/libudev/libudev-enumerate.c:834
|
||||
#4 0x00007ffff5bebc3f in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x7a56b0 "/sys/devices/<shortened>/input/input97", maxdepth=maxdepth@entry=254) at src/libudev/libudev-enumerate.c:866
|
||||
#5 0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x79e8c0 "/sys/devices/<shortened>/input", maxdepth=maxdepth@entry=255) at src/libudev/libudev-enumerate.c:868
|
||||
#6 0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=path@entry=0x753190 "/sys/devices/<shortened>", maxdepth=maxdepth@entry=256) at src/libudev/libudev-enumerate.c:868
|
||||
#7 0x00007ffff5bec7df in scan_devices_children (enumerate=0x7a05f0) at src/libudev/libudev-enumerate.c:882
|
||||
#8 udev_enumerate_scan_devices (udev_enumerate=udev_enumerate@entry=0x7a05f0) at src/libudev/libudev-enumerate.c:919
|
||||
#9 0x00007ffff5df8777 in <random_caller> () at some/file.c:181
|
||||
---
|
||||
src/libudev/libudev-enumerate.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
|
||||
index 7e63820..77f75bf 100644
|
||||
--- a/src/libudev/libudev-enumerate.c
|
||||
+++ b/src/libudev/libudev-enumerate.c
|
||||
@@ -718,6 +718,8 @@ static bool match_subsystem(struct udev_enumerate *udev_enumerate, const char *s
|
||||
{
|
||||
struct udev_list_entry *list_entry;
|
||||
|
||||
+ subsystem = subsystem ? : "";
|
||||
+
|
||||
udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_enumerate->subsystem_nomatch_list)) {
|
||||
if (fnmatch(udev_list_entry_get_name(list_entry), subsystem, 0) == 0)
|
||||
return false;
|
|
@ -0,0 +1,51 @@
|
|||
From 7802260b72f064fedf744f1071cd80123c3499d4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 11 Sep 2013 21:50:16 -0400
|
||||
Subject: [PATCH] Allow tabs in environment files
|
||||
|
||||
bash allows them, and so should we.
|
||||
|
||||
string_has_cc is changed to allow tabs, and if they are not wanted,
|
||||
they must be now checked for explicitly. There are two other callers,
|
||||
apart from the env file loaders, and one already checked anyway, and
|
||||
the other is changed to check.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=68592
|
||||
https://bugs.gentoo.org/show_bug.cgi?id=481554
|
||||
|
||||
Conflicts:
|
||||
src/test/test-fileio.c
|
||||
---
|
||||
src/hostname/hostnamed.c | 3 ++-
|
||||
src/shared/util.c | 4 ++++
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
|
||||
index 0437e33..6a43aeb 100644
|
||||
--- a/src/hostname/hostnamed.c
|
||||
+++ b/src/hostname/hostnamed.c
|
||||
@@ -553,7 +553,8 @@ static DBusHandlerResult hostname_message_handler(
|
||||
* safe than sorry */
|
||||
if (k == PROP_ICON_NAME && !filename_is_safe(name))
|
||||
return bus_send_error_reply(connection, message, NULL, -EINVAL);
|
||||
- if (k == PROP_PRETTY_HOSTNAME && string_has_cc(name))
|
||||
+ if (k == PROP_PRETTY_HOSTNAME &&
|
||||
+ (string_has_cc(name) || chars_intersect(name, "\t")))
|
||||
return bus_send_error_reply(connection, message, NULL, -EINVAL);
|
||||
if (k == PROP_CHASSIS && !valid_chassis(name))
|
||||
return bus_send_error_reply(connection, message, NULL, -EINVAL);
|
||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
||||
index 7f633a3..acf4ca2 100644
|
||||
--- a/src/shared/util.c
|
||||
+++ b/src/shared/util.c
|
||||
@@ -5328,6 +5328,10 @@ bool string_is_safe(const char *p) {
|
||||
return true;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * Check if a string contains control characters.
|
||||
+ * Spaces and tabs are not considered control characters.
|
||||
+ */
|
||||
bool string_has_cc(const char *p) {
|
||||
const char *t;
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
From 43ac008a93f840dd88930c7450a2829d00ca5af5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Thu, 12 Sep 2013 10:03:16 -0400
|
||||
Subject: [PATCH] Actually allow tabs in environment files
|
||||
|
||||
Fixup for ac4c8d6da8b5e.
|
||||
---
|
||||
src/shared/util.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
||||
index acf4ca2..cbfa342 100644
|
||||
--- a/src/shared/util.c
|
||||
+++ b/src/shared/util.c
|
||||
@@ -5338,7 +5338,7 @@ bool string_has_cc(const char *p) {
|
||||
assert(p);
|
||||
|
||||
for (t = p; *t; t++)
|
||||
- if (*t > 0 && *t < ' ')
|
||||
+ if (*t > 0 && *t < ' ' && *t != '\t')
|
||||
return true;
|
||||
|
||||
return false;
|
|
@ -0,0 +1,51 @@
|
|||
From cd2430aee0fe7fde9d04ce1e9120b5a425237eec Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Thu, 12 Sep 2013 15:42:24 +0200
|
||||
Subject: [PATCH] systemctl: process only signals for jobs we really wait for
|
||||
|
||||
wait_filter() callback shouldn't process JobRemove signals for arbitrary
|
||||
jobs. It should only deal with signals for jobs which are included in
|
||||
set of jobs we wait for.
|
||||
---
|
||||
src/systemctl/systemctl.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index 9a5810d..f3f7a03 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -1125,7 +1125,7 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
|
||||
|
||||
} else if (dbus_message_is_signal(message, "org.freedesktop.systemd1.Manager", "JobRemoved")) {
|
||||
uint32_t id;
|
||||
- const char *path, *result, *unit;
|
||||
+ const char *path, *result, *unit, *r;
|
||||
|
||||
if (dbus_message_get_args(message, &error,
|
||||
DBUS_TYPE_UINT32, &id,
|
||||
@@ -1134,7 +1134,11 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
|
||||
DBUS_TYPE_STRING, &result,
|
||||
DBUS_TYPE_INVALID)) {
|
||||
|
||||
- free(set_remove(d->set, (char*) path));
|
||||
+ r = set_remove(d->set, (char*) path);
|
||||
+ if (!r)
|
||||
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
+
|
||||
+ free(r);
|
||||
|
||||
if (!isempty(result))
|
||||
d->result = strdup(result);
|
||||
@@ -1154,7 +1158,11 @@ static DBusHandlerResult wait_filter(DBusConnection *connection, DBusMessage *me
|
||||
/* Compatibility with older systemd versions <
|
||||
* 183 during upgrades. This should be dropped
|
||||
* one day. */
|
||||
- free(set_remove(d->set, (char*) path));
|
||||
+ r = set_remove(d->set, (char*) path);
|
||||
+ if (!r)
|
||||
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
+
|
||||
+ free(r);
|
||||
|
||||
if (*result)
|
||||
d->result = strdup(result);
|
|
@ -0,0 +1,27 @@
|
|||
From 14fd27f679ed401e619cbc41bf687a06248a7fb0 Mon Sep 17 00:00:00 2001
|
||||
From: Brandon Philips <brandon@ifup.co>
|
||||
Date: Tue, 3 Sep 2013 21:34:02 -0700
|
||||
Subject: [PATCH] cgtop: fixup the online help
|
||||
|
||||
The online help shows the keys as uppercase but the code and manpage say
|
||||
lower case. Make the online help follow reality.
|
||||
---
|
||||
src/cgtop/cgtop.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
|
||||
index 1e21b00..f7d84da 100644
|
||||
--- a/src/cgtop/cgtop.c
|
||||
+++ b/src/cgtop/cgtop.c
|
||||
@@ -824,9 +824,9 @@ int main(int argc, char *argv[]) {
|
||||
case '?':
|
||||
case 'h':
|
||||
fprintf(stdout,
|
||||
- "\t<" ON "P" OFF "> By path; <" ON "T" OFF "> By tasks; <" ON "C" OFF "> By CPU; <" ON "M" OFF "> By memory; <" ON "I" OFF "> By I/O\n"
|
||||
+ "\t<" ON "p" OFF "> By path; <" ON "t" OFF "> By tasks; <" ON "c" OFF "> By CPU; <" ON "m" OFF "> By memory; <" ON "i" OFF "> By I/O\n"
|
||||
"\t<" ON "+" OFF "> Increase delay; <" ON "-" OFF "> Decrease delay; <" ON "%%" OFF "> Toggle time\n"
|
||||
- "\t<" ON "Q" OFF "> Quit; <" ON "SPACE" OFF "> Refresh");
|
||||
+ "\t<" ON "q" OFF "> Quit; <" ON "SPACE" OFF "> Refresh");
|
||||
fflush(stdout);
|
||||
sleep(3);
|
||||
break;
|
|
@ -0,0 +1,24 @@
|
|||
From ac27feb833122fd683edfd6a351d876814e34e5f Mon Sep 17 00:00:00 2001
|
||||
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
||||
Date: Thu, 19 Sep 2013 15:52:31 +0400
|
||||
Subject: [PATCH] clarify $ escaping in Exec* lines
|
||||
|
||||
Explain that literal $ can be passed by doubling it.
|
||||
---
|
||||
man/systemd.service.xml | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
|
||||
index 09d1d5f..0153bc0 100644
|
||||
--- a/man/systemd.service.xml
|
||||
+++ b/man/systemd.service.xml
|
||||
@@ -362,7 +362,8 @@
|
||||
case it will be replaced by the value
|
||||
of the environment variable split up
|
||||
at whitespace, resulting in zero or
|
||||
- more arguments. Note that the first
|
||||
+ more arguments. To pass literal dollar sign
|
||||
+ use <literal>$$</literal>. Note that the first
|
||||
argument (i.e. the program to execute)
|
||||
may not be a variable, since it must
|
||||
be a literal and absolute path
|
|
@ -0,0 +1,23 @@
|
|||
From 908d0910ba5b49682fd80edc3afd7cf192e53cca Mon Sep 17 00:00:00 2001
|
||||
From: Dave Reisner <dreisner@archlinux.org>
|
||||
Date: Thu, 19 Sep 2013 11:36:40 -0400
|
||||
Subject: [PATCH] udev-builtin-blkid: export ID_PART_TABLE_UUID
|
||||
|
||||
---
|
||||
src/udev/udev-builtin-blkid.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c
|
||||
index bae4293..b48dccc 100644
|
||||
--- a/src/udev/udev-builtin-blkid.c
|
||||
+++ b/src/udev/udev-builtin-blkid.c
|
||||
@@ -67,6 +67,9 @@ static void print_property(struct udev_device *dev, bool test, const char *name,
|
||||
} else if (streq(name, "PTTYPE")) {
|
||||
udev_builtin_add_property(dev, test, "ID_PART_TABLE_TYPE", value);
|
||||
|
||||
+ } else if (streq(name, "PTUUID")) {
|
||||
+ udev_builtin_add_property(dev, test, "ID_PART_TABLE_UUID", value);
|
||||
+
|
||||
} else if (streq(name, "PART_ENTRY_NAME")) {
|
||||
blkid_encode_string(value, s, sizeof(s));
|
||||
udev_builtin_add_property(dev, test, "ID_PART_ENTRY_NAME", s);
|
|
@ -0,0 +1,62 @@
|
|||
From 78d87cec496fb120e6eaaca5d79be36a266f6eb0 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Reisner <dreisner@archlinux.org>
|
||||
Date: Thu, 19 Sep 2013 14:30:07 -0400
|
||||
Subject: [PATCH] nspawn: be less liberal about creating bind mount
|
||||
destinations
|
||||
|
||||
Previously, if a file's bind mount destination didn't exist, nspawn
|
||||
would blindly create a directory, and the subsequent bind mount would
|
||||
fail. Examine the filetype of the source and ensure that, if the
|
||||
destination does not exist, that it is created appropriately.
|
||||
|
||||
Also go one step further and ensure that the filetypes of the source
|
||||
and destination match.
|
||||
---
|
||||
src/nspawn/nspawn.c | 29 ++++++++++++++++++++++++++++-
|
||||
1 file changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
|
||||
index b90ccc5..fbbe52c 100644
|
||||
--- a/src/nspawn/nspawn.c
|
||||
+++ b/src/nspawn/nspawn.c
|
||||
@@ -397,12 +397,39 @@ static int mount_binds(const char *dest, char **l, unsigned long flags) {
|
||||
|
||||
STRV_FOREACH_PAIR(x, y, l) {
|
||||
_cleanup_free_ char *where = NULL;
|
||||
+ struct stat source_st, dest_st;
|
||||
+
|
||||
+ if (stat(*x, &source_st) < 0) {
|
||||
+ log_error("failed to stat %s: %m", *x);
|
||||
+ return -errno;
|
||||
+ }
|
||||
|
||||
where = strjoin(dest, "/", *y, NULL);
|
||||
if (!where)
|
||||
return log_oom();
|
||||
|
||||
- mkdir_p_label(where, 0755);
|
||||
+ if (stat(where, &dest_st) == 0) {
|
||||
+ if ((source_st.st_mode & S_IFMT) != (dest_st.st_mode & S_IFMT)) {
|
||||
+ log_error("The file types of %s and %s do not matching. Refusing bind mount",
|
||||
+ *x, where);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ } else {
|
||||
+ /* Create the mount point, but be conservative -- refuse to create block
|
||||
+ * and char devices. */
|
||||
+ if (S_ISDIR(source_st.st_mode))
|
||||
+ mkdir_p_label(where, 0755);
|
||||
+ else if (S_ISFIFO(source_st.st_mode))
|
||||
+ mkfifo(where, 0644);
|
||||
+ else if (S_ISSOCK(source_st.st_mode))
|
||||
+ mknod(where, 0644 | S_IFSOCK, 0);
|
||||
+ else if (S_ISREG(source_st.st_mode))
|
||||
+ touch(where);
|
||||
+ else {
|
||||
+ log_error("Refusing to create mountpoint for file: %s", *x);
|
||||
+ return -ENOTSUP;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if (mount(*x, where, "bind", MS_BIND, NULL) < 0) {
|
||||
log_error("mount(%s) failed: %m", where);
|
|
@ -0,0 +1,22 @@
|
|||
From d03880f0c35228ca1b4d816b28c606a4e41d1698 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Reisner <dreisner@archlinux.org>
|
||||
Date: Thu, 19 Sep 2013 14:55:35 -0400
|
||||
Subject: [PATCH] fix grammatical error
|
||||
|
||||
---
|
||||
src/nspawn/nspawn.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
|
||||
index fbbe52c..839c253 100644
|
||||
--- a/src/nspawn/nspawn.c
|
||||
+++ b/src/nspawn/nspawn.c
|
||||
@@ -410,7 +410,7 @@ static int mount_binds(const char *dest, char **l, unsigned long flags) {
|
||||
|
||||
if (stat(where, &dest_st) == 0) {
|
||||
if ((source_st.st_mode & S_IFMT) != (dest_st.st_mode & S_IFMT)) {
|
||||
- log_error("The file types of %s and %s do not matching. Refusing bind mount",
|
||||
+ log_error("The file types of %s and %s do not match. Refusing bind mount",
|
||||
*x, where);
|
||||
return -EINVAL;
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
From aeca88f2ff7703c224f47aa2f15c611f7991e055 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Reisner <dreisner@archlinux.org>
|
||||
Date: Thu, 19 Sep 2013 18:00:36 -0400
|
||||
Subject: [PATCH] completion/systemctl: add missing list-sockets verb
|
||||
|
||||
Conflicts:
|
||||
shell-completion/bash/systemctl
|
||||
shell-completion/zsh/_systemctl
|
||||
---
|
||||
shell-completion/bash/systemctl | 2 +-
|
||||
shell-completion/systemd-zsh-completion.zsh | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/shell-completion/bash/systemctl b/shell-completion/bash/systemctl
|
||||
index ce46d50..bafaa18 100644
|
||||
--- a/shell-completion/bash/systemctl
|
||||
+++ b/shell-completion/bash/systemctl
|
||||
@@ -123,7 +123,7 @@ _systemctl () {
|
||||
[ENVS]='set-environment unset-environment'
|
||||
[STANDALONE]='daemon-reexec daemon-reload default dump
|
||||
emergency exit halt hibernate hybrid-sleep kexec list-jobs
|
||||
- list-units list-unit-files poweroff reboot rescue
|
||||
+ list-sockets list-units list-unit-files poweroff reboot rescue
|
||||
show-environment suspend'
|
||||
[NAME]='snapshot load'
|
||||
[FILE]='link'
|
||||
diff --git a/shell-completion/systemd-zsh-completion.zsh b/shell-completion/systemd-zsh-completion.zsh
|
||||
index 46a6a19..0205d8b 100644
|
||||
--- a/shell-completion/systemd-zsh-completion.zsh
|
||||
+++ b/shell-completion/systemd-zsh-completion.zsh
|
||||
@@ -323,6 +323,7 @@ _outputmodes() {
|
||||
{
|
||||
local -a _systemctl_cmds
|
||||
_systemctl_cmds=(
|
||||
+ "list-sockets:List sockets"
|
||||
"list-units:List units"
|
||||
"start:Start (activate) one or more units"
|
||||
"stop:Stop (deactivate) one or more units"
|
|
@ -0,0 +1,26 @@
|
|||
From b775ab334213ddda216242dda7123e0c19a1ff17 Mon Sep 17 00:00:00 2001
|
||||
From: Dave Reisner <dreisner@archlinux.org>
|
||||
Date: Tue, 24 Sep 2013 14:39:40 -0400
|
||||
Subject: [PATCH] journalctl(1): s/adm/systemd-journal/
|
||||
|
||||
Conflicts:
|
||||
man/journalctl.xml
|
||||
---
|
||||
man/journalctl.xml | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/man/journalctl.xml b/man/journalctl.xml
|
||||
index 144b54f..3999846 100644
|
||||
--- a/man/journalctl.xml
|
||||
+++ b/man/journalctl.xml
|
||||
@@ -103,8 +103,8 @@
|
||||
system itself or are accessible user journals.</para>
|
||||
|
||||
<para>All users are granted access to their private
|
||||
- per-user journals. However, by default only root and
|
||||
- users who are members of the <literal>adm</literal>
|
||||
+ per-user journals. However, by default, only root and
|
||||
+ users who are members of the <literal>systemd-journal</literal>
|
||||
group get access to the system journal and the
|
||||
journals of other users.</para>
|
||||
</refsect1>
|
|
@ -0,0 +1,69 @@
|
|||
From f4941209447a338f6306c2bef4b0c844e346f916 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Thu, 19 Sep 2013 16:57:57 -0500
|
||||
Subject: [PATCH] journald: accept EPOLLERR from /dev/kmsg
|
||||
|
||||
Also print out unexpected epoll events explictly.
|
||||
---
|
||||
src/journal/journald-server.c | 20 +++++++++++++++-----
|
||||
1 file changed, 15 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
||||
index d1e0e76..69ee853 100644
|
||||
--- a/src/journal/journald-server.c
|
||||
+++ b/src/journal/journald-server.c
|
||||
@@ -1027,7 +1027,8 @@ int process_event(Server *s, struct epoll_event *ev) {
|
||||
ssize_t n;
|
||||
|
||||
if (ev->events != EPOLLIN) {
|
||||
- log_error("Got invalid event from epoll.");
|
||||
+ log_error("Got invalid event from epoll for %s: %"PRIx32,
|
||||
+ "signal fd", ev->events);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@@ -1076,8 +1077,12 @@ int process_event(Server *s, struct epoll_event *ev) {
|
||||
} else if (ev->data.fd == s->dev_kmsg_fd) {
|
||||
int r;
|
||||
|
||||
- if (ev->events != EPOLLIN) {
|
||||
- log_error("Got invalid event from epoll.");
|
||||
+ if (ev->events & EPOLLERR)
|
||||
+ log_warning("/dev/kmsg buffer overrun, some messages lost.");
|
||||
+
|
||||
+ if (!(ev->events & EPOLLIN)) {
|
||||
+ log_error("Got invalid event from epoll for %s: %"PRIx32,
|
||||
+ "/dev/kmsg", ev->events);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@@ -1091,7 +1096,9 @@ int process_event(Server *s, struct epoll_event *ev) {
|
||||
ev->data.fd == s->syslog_fd) {
|
||||
|
||||
if (ev->events != EPOLLIN) {
|
||||
- log_error("Got invalid event from epoll.");
|
||||
+ log_error("Got invalid event from epoll for %s: %"PRIx32,
|
||||
+ ev->data.fd == s->native_fd ? "native fd" : "syslog fd",
|
||||
+ ev->events);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@@ -1219,7 +1226,8 @@ int process_event(Server *s, struct epoll_event *ev) {
|
||||
} else if (ev->data.fd == s->stdout_fd) {
|
||||
|
||||
if (ev->events != EPOLLIN) {
|
||||
- log_error("Got invalid event from epoll.");
|
||||
+ log_error("Got invalid event from epoll for %s: %"PRIx32,
|
||||
+ "stdout fd", ev->events);
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
@@ -1230,6 +1238,8 @@ int process_event(Server *s, struct epoll_event *ev) {
|
||||
StdoutStream *stream;
|
||||
|
||||
if ((ev->events|EPOLLIN|EPOLLHUP) != (EPOLLIN|EPOLLHUP)) {
|
||||
+ log_error("Got invalid event from epoll for %s: %"PRIx32,
|
||||
+ "stdout stream", ev->events);
|
||||
log_error("Got invalid event from epoll.");
|
||||
return -EIO;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
From 412c2eb9b8b10b374d9de3d2fb7e2f2a59787cf5 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 26 Sep 2013 20:31:37 +0200
|
||||
Subject: [PATCH] logind: if a user is sitting in front of the computer and can
|
||||
shutdown the machine anyway he should also be able to reboot it
|
||||
|
||||
---
|
||||
src/login/org.freedesktop.login1.policy.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/login/org.freedesktop.login1.policy.in b/src/login/org.freedesktop.login1.policy.in
|
||||
index 0c551d4..b96d32d 100644
|
||||
--- a/src/login/org.freedesktop.login1.policy.in
|
||||
+++ b/src/login/org.freedesktop.login1.policy.in
|
||||
@@ -190,7 +190,7 @@
|
||||
<defaults>
|
||||
<allow_any>auth_admin_keep</allow_any>
|
||||
<allow_inactive>auth_admin_keep</allow_inactive>
|
||||
- <allow_active>auth_admin_keep</allow_active>
|
||||
+ <allow_active>yes</allow_active>
|
||||
</defaults>
|
||||
<annotate key="org.freedesktop.policykit.imply">org.freedesktop.login1.reboot</annotate>
|
||||
</action>
|
|
@ -0,0 +1,22 @@
|
|||
From eb3191371200b2825b1f40915d783d258fdcde25 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 27 Sep 2013 00:35:36 +0200
|
||||
Subject: [PATCH] dbus: fix introspection for TimerSlackNSec
|
||||
|
||||
---
|
||||
src/core/dbus-execute.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/dbus-execute.h b/src/core/dbus-execute.h
|
||||
index 91d70e5..698102f 100644
|
||||
--- a/src/core/dbus-execute.h
|
||||
+++ b/src/core/dbus-execute.h
|
||||
@@ -63,7 +63,7 @@
|
||||
" <property name=\"CPUSchedulingPolicy\" type=\"i\" access=\"read\"/>\n" \
|
||||
" <property name=\"CPUSchedulingPriority\" type=\"i\" access=\"read\"/>\n" \
|
||||
" <property name=\"CPUAffinity\" type=\"ay\" access=\"read\"/>\n" \
|
||||
- " <property name=\"TimerSlackNS\" type=\"t\" access=\"read\"/>\n" \
|
||||
+ " <property name=\"TimerSlackNSec\" type=\"t\" access=\"read\"/>\n" \
|
||||
" <property name=\"CPUSchedulingResetOnFork\" type=\"b\" access=\"read\"/>\n" \
|
||||
" <property name=\"NonBlocking\" type=\"b\" access=\"read\"/>\n" \
|
||||
" <property name=\"StandardInput\" type=\"s\" access=\"read\"/>\n" \
|
|
@ -0,0 +1,21 @@
|
|||
From ab093f2760bf4d5a4248ed2a5cb5a28a911b77cb Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 27 Sep 2013 02:02:21 +0200
|
||||
Subject: [PATCH] swap: properly expose timeout property on the bus
|
||||
|
||||
---
|
||||
src/core/dbus-swap.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/core/dbus-swap.c b/src/core/dbus-swap.c
|
||||
index 2e99fba..e72749a 100644
|
||||
--- a/src/core/dbus-swap.c
|
||||
+++ b/src/core/dbus-swap.c
|
||||
@@ -93,6 +93,7 @@ static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_swap_append_swap_result, swap_result,
|
||||
static const BusProperty bus_swap_properties[] = {
|
||||
{ "What", bus_property_append_string, "s", offsetof(Swap, what), true },
|
||||
{ "Priority", bus_swap_append_priority, "i", 0 },
|
||||
+ { "TimeoutUSec",bus_property_append_usec, "t", offsetof(Swap, timeout_usec)},
|
||||
BUS_EXEC_COMMAND_PROPERTY("ExecActivate", offsetof(Swap, exec_command[SWAP_EXEC_ACTIVATE]), false),
|
||||
BUS_EXEC_COMMAND_PROPERTY("ExecDeactivate", offsetof(Swap, exec_command[SWAP_EXEC_DEACTIVATE]), false),
|
||||
{ "ControlPID", bus_property_append_pid, "u", offsetof(Swap, control_pid) },
|
|
@ -0,0 +1,23 @@
|
|||
From 85d23bd3d5f54facdc2fea6db057e84a519f98f1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Fri, 27 Sep 2013 07:58:57 +0200
|
||||
Subject: [PATCH] Remove duplicated line
|
||||
|
||||
Conflicts:
|
||||
src/core/load-fragment.c
|
||||
---
|
||||
src/journal/journald-server.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
||||
index 69ee853..eb3d4df 100644
|
||||
--- a/src/journal/journald-server.c
|
||||
+++ b/src/journal/journald-server.c
|
||||
@@ -1240,7 +1240,6 @@ int process_event(Server *s, struct epoll_event *ev) {
|
||||
if ((ev->events|EPOLLIN|EPOLLHUP) != (EPOLLIN|EPOLLHUP)) {
|
||||
log_error("Got invalid event from epoll for %s: %"PRIx32,
|
||||
"stdout stream", ev->events);
|
||||
- log_error("Got invalid event from epoll.");
|
||||
return -EIO;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
From 649bbc2c12b1af4a90ad630f9de89f7216a3f942 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Scherer <misc@zarb.org>
|
||||
Date: Fri, 27 Sep 2013 11:43:28 +0200
|
||||
Subject: [PATCH] Add a bit more explicit message, to help confused users
|
||||
|
||||
Seeing http://www.happyassassin.net/2013/09/27/further-sysadmin-adventures-wheres-my-freeipa-badge/
|
||||
it seems that the default message is a bit confusing for people
|
||||
who never encountered it before, so adding a link to the manpage could
|
||||
help them.
|
||||
|
||||
Conflicts:
|
||||
tmpfiles.d/systemd.conf
|
||||
---
|
||||
tmpfiles.d/systemd.conf | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tmpfiles.d/systemd.conf b/tmpfiles.d/systemd.conf
|
||||
index ee86f2e..fcda00f 100644
|
||||
--- a/tmpfiles.d/systemd.conf
|
||||
+++ b/tmpfiles.d/systemd.conf
|
||||
@@ -21,4 +21,4 @@ d /run/systemd/sessions 0755 root root -
|
||||
d /run/systemd/users 0755 root root -
|
||||
d /run/systemd/shutdown 0755 root root -
|
||||
|
||||
-F /run/nologin 0644 - - - "System is booting up."
|
||||
+F /run/nologin 0644 - - - "System is booting up. See pam_nologin(8)"
|
|
@ -0,0 +1,154 @@
|
|||
From bbe5efee5e5f9d9af0d1aa097186c99c8f10245e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 29 Sep 2013 14:40:58 +0200
|
||||
Subject: [PATCH] Fix buffer overrun when enumerating files
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=69887
|
||||
|
||||
Based-on-a-patch-by: Hans Petter Jansson <hpj@copyleft.no>
|
||||
|
||||
Conflicts:
|
||||
src/test/test-util.c
|
||||
---
|
||||
src/shared/util.c | 79 ++++++++++++++++++-------------------------------------
|
||||
src/shared/util.h | 2 ++
|
||||
2 files changed, 28 insertions(+), 53 deletions(-)
|
||||
|
||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
||||
index cbfa342..7492b16 100644
|
||||
--- a/src/shared/util.c
|
||||
+++ b/src/shared/util.c
|
||||
@@ -4375,38 +4375,31 @@ int dirent_ensure_type(DIR *d, struct dirent *de) {
|
||||
}
|
||||
|
||||
int in_search_path(const char *path, char **search) {
|
||||
- char **i, *parent;
|
||||
+ char **i;
|
||||
+ _cleanup_free_ char *parent = NULL;
|
||||
int r;
|
||||
|
||||
r = path_get_parent(path, &parent);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
- r = 0;
|
||||
-
|
||||
- STRV_FOREACH(i, search) {
|
||||
- if (path_equal(parent, *i)) {
|
||||
- r = 1;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- free(parent);
|
||||
+ STRV_FOREACH(i, search)
|
||||
+ if (path_equal(parent, *i))
|
||||
+ return 1;
|
||||
|
||||
- return r;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int get_files_in_directory(const char *path, char ***list) {
|
||||
- DIR *d;
|
||||
- int r = 0;
|
||||
- unsigned n = 0;
|
||||
- char **l = NULL;
|
||||
+ _cleanup_closedir_ DIR *d = NULL;
|
||||
+ size_t bufsize = 0, n = 0;
|
||||
+ _cleanup_strv_free_ char **l = NULL;
|
||||
|
||||
assert(path);
|
||||
|
||||
/* Returns all files in a directory in *list, and the number
|
||||
* of files as return value. If list is NULL returns only the
|
||||
- * number */
|
||||
+ * number. */
|
||||
|
||||
d = opendir(path);
|
||||
if (!d)
|
||||
@@ -4418,11 +4411,9 @@ int get_files_in_directory(const char *path, char ***list) {
|
||||
int k;
|
||||
|
||||
k = readdir_r(d, &buf.de, &de);
|
||||
- if (k != 0) {
|
||||
- r = -k;
|
||||
- goto finish;
|
||||
- }
|
||||
-
|
||||
+ assert(k >= 0);
|
||||
+ if (k > 0)
|
||||
+ return -k;
|
||||
if (!de)
|
||||
break;
|
||||
|
||||
@@ -4432,43 +4423,25 @@ int get_files_in_directory(const char *path, char ***list) {
|
||||
continue;
|
||||
|
||||
if (list) {
|
||||
- if ((unsigned) r >= n) {
|
||||
- char **t;
|
||||
-
|
||||
- n = MAX(16, 2*r);
|
||||
- t = realloc(l, sizeof(char*) * n);
|
||||
- if (!t) {
|
||||
- r = -ENOMEM;
|
||||
- goto finish;
|
||||
- }
|
||||
-
|
||||
- l = t;
|
||||
- }
|
||||
-
|
||||
- assert((unsigned) r < n);
|
||||
+ /* one extra slot is needed for the terminating NULL */
|
||||
+ if (!GREEDY_REALLOC(l, bufsize, n + 2))
|
||||
+ return -ENOMEM;
|
||||
|
||||
- l[r] = strdup(de->d_name);
|
||||
- if (!l[r]) {
|
||||
- r = -ENOMEM;
|
||||
- goto finish;
|
||||
- }
|
||||
+ l[n] = strdup(de->d_name);
|
||||
+ if (!l[n])
|
||||
+ return -ENOMEM;
|
||||
|
||||
- l[++r] = NULL;
|
||||
+ l[++n] = NULL;
|
||||
} else
|
||||
- r++;
|
||||
+ n++;
|
||||
}
|
||||
|
||||
-finish:
|
||||
- if (d)
|
||||
- closedir(d);
|
||||
-
|
||||
- if (r >= 0) {
|
||||
- if (list)
|
||||
- *list = l;
|
||||
- } else
|
||||
- strv_free(l);
|
||||
+ if (list) {
|
||||
+ *list = l;
|
||||
+ l = NULL; /* avoid freeing */
|
||||
+ }
|
||||
|
||||
- return r;
|
||||
+ return n;
|
||||
}
|
||||
|
||||
char *strjoin(const char *x, ...) {
|
||||
diff --git a/src/shared/util.h b/src/shared/util.h
|
||||
index d3838e1..7c8b7f6 100644
|
||||
--- a/src/shared/util.h
|
||||
+++ b/src/shared/util.h
|
||||
@@ -618,6 +618,8 @@ char *strextend(char **x, ...);
|
||||
char *strrep(const char *s, unsigned n);
|
||||
|
||||
void* greedy_realloc(void **p, size_t *allocated, size_t need);
|
||||
+#define GREEDY_REALLOC(array, allocated, need) \
|
||||
+ greedy_realloc((void**) &(array), &(allocated), sizeof((array)[0]) * (need))
|
||||
|
||||
static inline void _reset_errno_(int *saved_errno) {
|
||||
errno = *saved_errno;
|
|
@ -0,0 +1,27 @@
|
|||
From 8d0879b9704cb20721fd07b7fbf92c039173cb6d Mon Sep 17 00:00:00 2001
|
||||
From: Andrey Borzenkov <arvidjaar@gmail.com>
|
||||
Date: Sun, 29 Sep 2013 15:37:30 +0400
|
||||
Subject: [PATCH] set IgnoreOnIsolate=true for systemd-cryptsetup@.service
|
||||
|
||||
When crypttab contains noauto, cryptsetup service does not have any
|
||||
explicit dependencies. If service is started later manually (directly or via
|
||||
mount dependency) it will be stopped on isolate.
|
||||
|
||||
mount units already have IgnoreOnIsolate set by default. Set it by
|
||||
default for cryptsetup units as well.
|
||||
---
|
||||
src/cryptsetup/cryptsetup-generator.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
|
||||
index 18f4641..ad3387f 100644
|
||||
--- a/src/cryptsetup/cryptsetup-generator.c
|
||||
+++ b/src/cryptsetup/cryptsetup-generator.c
|
||||
@@ -111,6 +111,7 @@ static int create_disk(
|
||||
"Conflicts=umount.target\n"
|
||||
"DefaultDependencies=no\n"
|
||||
"BindsTo=dev-mapper-%i.device\n"
|
||||
+ "IgnoreOnIsolate=true\n"
|
||||
"After=systemd-readahead-collect.service systemd-readahead-replay.service\n",
|
||||
f);
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
From a0855f4947114cbf4182a75cb8bc2fa8d14e4e10 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 30 Sep 2013 18:56:34 +0200
|
||||
Subject: [PATCH] man: mention the systemd homepage from systemd(1)
|
||||
|
||||
---
|
||||
man/systemd.xml | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/man/systemd.xml b/man/systemd.xml
|
||||
index cd38c16..39bccff 100644
|
||||
--- a/man/systemd.xml
|
||||
+++ b/man/systemd.xml
|
||||
@@ -1258,6 +1258,7 @@
|
||||
<refsect1>
|
||||
<title>See Also</title>
|
||||
<para>
|
||||
+ The <ulink url="http://www.freedesktop.org/wiki/Software/systemd/">systemd Homepage</ulink>,
|
||||
<citerefentry><refentrytitle>systemd-system.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>locale.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
|
@ -0,0 +1,21 @@
|
|||
From 8e3aceb513fb34a29ffa4ef8a3ee626d8f2bee39 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 1 Oct 2013 00:06:48 +0200
|
||||
Subject: [PATCH] main: don't free fds array twice
|
||||
|
||||
---
|
||||
src/core/main.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/core/main.c b/src/core/main.c
|
||||
index f647865..6f99536 100644
|
||||
--- a/src/core/main.c
|
||||
+++ b/src/core/main.c
|
||||
@@ -1639,6 +1639,7 @@ int main(int argc, char *argv[]) {
|
||||
/* This will close all file descriptors that were opened, but
|
||||
* not claimed by any unit. */
|
||||
fdset_free(fds);
|
||||
+ fds = NULL;
|
||||
|
||||
if (serialization) {
|
||||
fclose(serialization);
|
|
@ -0,0 +1,40 @@
|
|||
From de5542896870a5ecf57982e664d4c26315d3634d Mon Sep 17 00:00:00 2001
|
||||
From: Chen Jie <chenj@lemote.com>
|
||||
Date: Thu, 12 Sep 2013 09:21:41 +0800
|
||||
Subject: [PATCH] util.c: ignore pollfd.revent for loop_read/loop_write
|
||||
|
||||
Let read()/write() report any error/EOF.
|
||||
---
|
||||
src/shared/util.c | 12 ++++++++----
|
||||
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
||||
index 7492b16..049d125 100644
|
||||
--- a/src/shared/util.c
|
||||
+++ b/src/shared/util.c
|
||||
@@ -2193,8 +2193,10 @@ ssize_t loop_read(int fd, void *buf, size_t nbytes, bool do_poll) {
|
||||
return n > 0 ? n : -errno;
|
||||
}
|
||||
|
||||
- if (pollfd.revents != POLLIN)
|
||||
- return n > 0 ? n : -EIO;
|
||||
+ /* We knowingly ignore the revents value here,
|
||||
+ * and expect that any error/EOF is reported
|
||||
+ * via read()/write()
|
||||
+ */
|
||||
|
||||
continue;
|
||||
}
|
||||
@@ -2241,8 +2243,10 @@ ssize_t loop_write(int fd, const void *buf, size_t nbytes, bool do_poll) {
|
||||
return n > 0 ? n : -errno;
|
||||
}
|
||||
|
||||
- if (pollfd.revents != POLLOUT)
|
||||
- return n > 0 ? n : -EIO;
|
||||
+ /* We knowingly ignore the revents value here,
|
||||
+ * and expect that any error/EOF is reported
|
||||
+ * via read()/write()
|
||||
+ */
|
||||
|
||||
continue;
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
From b76652a28eeb13ea88ef85daaa27d5d0f7ff4adb Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Wed, 2 Oct 2013 19:36:28 +0200
|
||||
Subject: [PATCH] cryptsetup: fix OOM handling when parsing mount options
|
||||
|
||||
Conflicts:
|
||||
src/cryptsetup/cryptsetup.c
|
||||
---
|
||||
src/cryptsetup/cryptsetup.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c
|
||||
index 376f748..439782a 100644
|
||||
--- a/src/cryptsetup/cryptsetup.c
|
||||
+++ b/src/cryptsetup/cryptsetup.c
|
||||
@@ -70,7 +70,7 @@ static int parse_one_option(const char *option) {
|
||||
|
||||
t = strdup(option+7);
|
||||
if (!t)
|
||||
- return -ENOMEM;
|
||||
+ return log_oom();
|
||||
|
||||
free(opt_cipher);
|
||||
opt_cipher = t;
|
||||
@@ -101,7 +101,7 @@ static int parse_one_option(const char *option) {
|
||||
|
||||
t = strdup(option+5);
|
||||
if (!t)
|
||||
- return -ENOMEM;
|
||||
+ return log_oom();
|
||||
|
||||
free(opt_hash);
|
||||
opt_hash = t;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue