Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 188156 Details for
Bug 265907
sys-apps/sandbox does not quote arguments before passing them to bash
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
sandbox-args.patch
sandbox-args.patch (text/plain), 1006 bytes, created by
Harald van Dijk (RETIRED)
on 2009-04-12 22:05:54 UTC
(
hide
)
Description:
sandbox-args.patch
Filename:
MIME Type:
Creator:
Harald van Dijk (RETIRED)
Created:
2009-04-12 22:05:54 UTC
Size:
1006 bytes
patch
obsolete
>--- sandbox-1.9/src/sandbox.c >+++ sandbox-1.9/src/sandbox.c >@@ -205,8 +205,6 @@ > char **sandbox_environ; > char **argv_bash = NULL; > >- char *run_str = "-c"; >- > rc_log_domain(log_domain); > > /* Only print info if called with no arguments .... */ >@@ -293,20 +291,11 @@ > if (argc >= 2) { > int i; > >- str_list_add_item_copy(argv_bash, run_str, oom_error); >- str_list_add_item_copy(argv_bash, argv[1], oom_error); >- for (i = 2; i < argc; i++) { >- char *tmp_ptr; >- >- tmp_ptr = xrealloc(argv_bash[4], >- (strlen(argv_bash[4]) + >- strlen(argv[i]) + 2) * >- sizeof(char)); >- argv_bash[4] = tmp_ptr; >- >- snprintf(argv_bash[4] + strlen(argv_bash[4]), >- strlen(argv[i]) + 2, " %s", >- argv[i]); >+ str_list_add_item_copy(argv_bash, "-c", oom_error); >+ str_list_add_item_copy(argv_bash, "\"$@\"", oom_error); >+ str_list_add_item_copy(argv_bash, "/bin/bash", oom_error); >+ for (i = 1; i < argc; i++) { >+ str_list_add_item_copy(argv_bash, argv[i], oom_error); > } > } >
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 265907
: 188156 |
188159