|
|
17b0f1 |
From 7374770f790080b677f504075ba9659230e11226 Mon Sep 17 00:00:00 2001
|
|
|
17b0f1 |
From: Lukas Nykryn <lnykryn@redhat.com>
|
|
|
17b0f1 |
Date: Fri, 11 Sep 2015 16:23:07 +0200
|
|
|
17b0f1 |
Subject: [PATCH] sysv-generator: follow symlinks in /etc/rc.d/init.d
|
|
|
17b0f1 |
|
|
|
17b0f1 |
Some java packages puts a symlink to init.d and its content is pointing
|
|
|
17b0f1 |
to latest java installation (because you can have multiple javas on you
|
|
|
17b0f1 |
machine).
|
|
|
17b0f1 |
|
|
|
17b0f1 |
On rhel-based distributions you can use alternatives --initscript
|
|
|
17b0f1 |
instread of symlink, but this is not usable for other distributions.
|
|
|
17b0f1 |
|
|
|
17b0f1 |
Cherry-picked from: 7b729f8686a83b24f3d9a891cde1c
|
|
|
17b0f1 |
Resolves: #1285492
|
|
|
17b0f1 |
---
|
|
|
17b0f1 |
src/sysv-generator/sysv-generator.c | 2 +-
|
|
|
17b0f1 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
17b0f1 |
|
|
|
17b0f1 |
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
|
|
|
17b0f1 |
index 3c6cb8f10e..0a8a528bdc 100644
|
|
|
17b0f1 |
--- a/src/sysv-generator/sysv-generator.c
|
|
|
17b0f1 |
+++ b/src/sysv-generator/sysv-generator.c
|
|
|
17b0f1 |
@@ -753,7 +753,7 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
|
|
|
17b0f1 |
if (hidden_file(de->d_name))
|
|
|
17b0f1 |
continue;
|
|
|
17b0f1 |
|
|
|
17b0f1 |
- if (fstatat(dirfd(d), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) {
|
|
|
17b0f1 |
+ if (fstatat(dirfd(d), de->d_name, &st, 0) < 0) {
|
|
|
17b0f1 |
log_warning_errno(errno, "stat() failed on %s/%s: %m", *path, de->d_name);
|
|
|
17b0f1 |
continue;
|
|
|
17b0f1 |
}
|