Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 281179 Details for
Bug 350910
sys-apps/openrc: symlinked init scripts must be in the same directory as their symlink
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
0001-do-not-treat-symbolic-links-specially-in-init.d.patch
0001-do-not-treat-symbolic-links-specially-in-init.d.patch (text/plain), 2.11 KB, created by
William Hubbs
on 2011-07-27 17:01:09 UTC
(
hide
)
Description:
0001-do-not-treat-symbolic-links-specially-in-init.d.patch
Filename:
MIME Type:
Creator:
William Hubbs
Created:
2011-07-27 17:01:09 UTC
Size:
2.11 KB
patch
obsolete
>From 28d9ca42574efab83d8adb9b6ab9e368d0eb255b Mon Sep 17 00:00:00 2001 >From: William Hubbs <williamh@gentoo.org> >Date: Wed, 27 Jul 2011 11:02:23 -0500 >Subject: [PATCH] do not treat symbolic links specially in init.d > >symbolic links should not be followed in an attempt to work out the name >of the service we are running. > >X-Gentoo-Bug: 350910 >X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=350910 >--- > src/rc/runscript.c | 38 ++------------------------------------ > 1 files changed, 2 insertions(+), 36 deletions(-) > >diff --git a/src/rc/runscript.c b/src/rc/runscript.c >index 02d9e7e..8278f5b 100644 >--- a/src/rc/runscript.c >+++ b/src/rc/runscript.c >@@ -1100,8 +1100,7 @@ runscript(int argc, char **argv) > bool doneone = false; > int retval, opt, depoptions = RC_DEP_TRACE; > RC_STRING *svc; >- char path[PATH_MAX], lnk[PATH_MAX]; >- char *dir, *save = NULL, *saveLnk = NULL; >+ char *save = NULL; > char pidstr[10]; > size_t l = 0, ll; > const char *file; >@@ -1121,40 +1120,7 @@ runscript(int argc, char **argv) > > atexit(cleanup); > >- /* We need to work out the real full path to our service. >- * This works fine, provided that we ONLY allow multiplexed services >- * to exist in the same directory as the master link. >- * Also, the master link as to be a real file in the init dir. */ >- if (!realpath(argv[1], path)) { >- fprintf(stderr, "realpath: %s\n", strerror(errno)); >- exit(EXIT_FAILURE); >- } >- memset(lnk, 0, sizeof(lnk)); >- if (readlink(argv[1], lnk, sizeof(lnk)-1)) { >- dir = dirname(path); >- if (strchr(lnk, '/')) { >- save = xstrdup(dir); >- saveLnk = xstrdup(lnk); >- dir = dirname(saveLnk); >- if (strcmp(dir, save) == 0) >- file = basename_c(argv[1]); >- else >- file = basename_c(lnk); >- dir = save; >- } else >- file = basename_c(argv[1]); >- ll = strlen(dir) + strlen(file) + 2; >- service = xmalloc(ll); >- snprintf(service, ll, "%s/%s", dir, file); >- if (stat(service, &stbuf) != 0) { >- free(service); >- service = xstrdup(lnk); >- } >- free(save); >- free(saveLnk); >- } >- if (!service) >- service = xstrdup(path); >+ service = xstrdup(argv[1]); > applet = basename_c(service); > > if (argc < 3) >-- >1.7.3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 350910
:
259462
|
273833
| 281179 |
281201