From: Zbigniew Jędrzejewski-Szmek Date: Mon, 26 Jan 2015 06:34:32 +0000 (+0100) Subject: system-update-generator: accept a dangling symlink X-Git-Tag: v219~289 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=6b321a790142449e0cf3685ffa5294e147d692f7 system-update-generator: accept a dangling symlink The offline update mechanism is explicitly designed to work with a separate /var. systemd-update-generator is supposed to run early, before filesystems are mounted, so it cannot check if the /system-update symlink actually points to anything. The update is run *after* filesystems are mounted, so it should be able to access the target of the symlink without trouble. https://bugzilla.redhat.com/show_bug.cgi?id=1178978 --- diff --git a/src/system-update-generator/system-update-generator.c b/src/system-update-generator/system-update-generator.c index 464ee22b2..455a84109 100644 --- a/src/system-update-generator/system-update-generator.c +++ b/src/system-update-generator/system-update-generator.c @@ -37,7 +37,7 @@ static const char *arg_dest = "/tmp"; static int generate_symlink(void) { const char *p = NULL; - if (access("/system-update", F_OK) < 0) { + if (laccess("/system-update", F_OK) < 0) { if (errno == ENOENT) return 0;