Displaying 3 results from an estimated 3 matches for "b0aaf754".
2020 Apr 15
0
[PATCH nbdkit 9/9] eval, sh: Define $nbdkit_safe_stdio = 0|1 in scripts.
...e stdin/stdout (eg. for reading passwords from the user).
+See also the discussion of C<nbdkit_stdio_safe> in
+L<nbdkit-plugin(3)>.
+
+=back
+
=head2 Handles
Handles are arbitrary strings, but it is best to limit them to short
diff --git a/plugins/sh/call.c b/plugins/sh/call.c
index b0aaf754..ddb7045b 100644
--- a/plugins/sh/call.c
+++ b/plugins/sh/call.c
@@ -107,6 +107,7 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin */
{
const char *argv0 = argv[0]; /* script name, used in error messages */
CLEANUP_FREE_STRING_LIST char **env = NULL;
+ const char *stdio_safe_str...
2020 Apr 15
0
[PATCH nbdkit 8/9] eval, sh: Set $tmpdir before running the command, instead of globally.
...or the script. */
- if (setenv ("tmpdir", tmpdir, 1) == -1) {
- nbdkit_error ("setenv: tmpdir=%s: %m", tmpdir);
- exit (EXIT_FAILURE);
- }
nbdkit_debug ("eval: load: tmpdir: %s", tmpdir);
diff --git a/plugins/sh/call.c b/plugins/sh/call.c
index 2d99a120..b0aaf754 100644
--- a/plugins/sh/call.c
+++ b/plugins/sh/call.c
@@ -106,6 +106,7 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin */
const char **argv) /* script + parameters */
{
const char *argv0 = argv[0]; /* script name, used in error messages */
+ CLEANUP_FREE_ST...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated!
The basic purpose of the patch series is to set $nbdkit_stdio_safe to
"0" or "1" in sh and eval plugin scripts.
To do that, I ended up adding a nicer way to manipulate environ lists,
and to do that, I ended up adding a whole generic vector
implementation which is applicable in a lot of different places.