Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 269049 Details for
Bug 360013
sys-apps/openrc-0.8.0 loops forever when init.d is called as non-root user and rc_parallel=yes
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Don't output a prefix for extra commands.
0002-Don-t-output-a-prefix-for-extra-commands-allowing-no.patch (text/plain), 1.72 KB, created by
James Le Cuirot
on 2011-04-08 17:04:19 UTC
(
hide
)
Description:
Don't output a prefix for extra commands.
Filename:
MIME Type:
Creator:
James Le Cuirot
Created:
2011-04-08 17:04:19 UTC
Size:
1.72 KB
patch
obsolete
>From 18c98716c7203b2ca5310cf6ac0ae7e2efcee966 Mon Sep 17 00:00:00 2001 >From: James Le Cuirot <chewi@aura-online.co.uk> >Date: Fri, 8 Apr 2011 14:44:14 +0100 >Subject: [PATCH 2/2] Don't output a prefix for extra commands, allowing non-root users to execute them. > >X-Gentoo-Bug: 360013 >X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=360013 >--- > src/rc/runscript.c | 13 +++++++++++-- > 1 files changed, 11 insertions(+), 2 deletions(-) > >diff --git a/src/rc/runscript.c b/src/rc/runscript.c >index 0eca487..3d33c1c 100644 >--- a/src/rc/runscript.c >+++ b/src/rc/runscript.c >@@ -1100,7 +1100,8 @@ runscript(int argc, char **argv) > { > bool doneone = false; > int retval, opt, depoptions = RC_DEP_TRACE; >- RC_STRING *svc; >+ RC_STRINGLIST *extra_commands; >+ RC_STRING *svc, *command; > char path[PATH_MAX], lnk[PATH_MAX], *dir, *save = NULL, pidstr[10]; > size_t l = 0, ll; > const char *file; >@@ -1269,6 +1270,9 @@ runscript(int argc, char **argv) > applet_list = rc_stringlist_new(); > rc_stringlist_add(applet_list, applet); > >+ if ((extra_commands = rc_service_extra_commands(service)) == NULL) >+ eerrorx("failed to determine extra commands"); >+ > /* Now run each option */ > retval = EXIT_SUCCESS; > while (optind < argc) { >@@ -1287,7 +1291,11 @@ runscript(int argc, char **argv) > > doneone = true; > >- if (strcmp(optarg, "describe") == 0 || >+ TAILQ_FOREACH(command, extra_commands, entries) >+ if (strcmp(optarg, command->value) == 0) break; >+ >+ if (command != NULL || >+ strcmp(optarg, "describe") == 0 || > strcmp(optarg, "help") == 0 || > strcmp(optarg, "depend") == 0) > { >@@ -1391,5 +1399,6 @@ runscript(int argc, char **argv) > usage(EXIT_FAILURE); > } > >+ rc_stringlist_free(extra_commands); > return retval; > } >-- >1.7.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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 360013
:
266981
|
269017
|
269019
| 269049 |
270575
|
270633
|
279781