[Rt-commit] rt branch, 4.2/smime-gnupg-on-fastcgi, repushed
Alex Vandiver
alexmv at bestpractical.com
Fri Oct 4 13:23:49 EDT 2013
The branch 4.2/smime-gnupg-on-fastcgi was deleted and repushed:
was 40f489d7f2f1607df3b4f26b556e04b1b35e0da7
now 4ef0d833a4dbd3dbbc219312875b93e653894ec1
1: c62970b = 1: c62970b Set RejectOnUnencrypted explicitly, for fastcgi tests
2: d89e28c = 2: d89e28c Include the $PATH in the GnuPG/SMIME error message, and suggest a full path
3: 40f489d ! 3: 4ef0d83 Provide a default PATH in cases where it is unset (mod_fastcgi)
@@ -5,18 +5,27 @@
mod_fastcgi, by default, spawns fastcgi children with no environment --
including PATH. In such cases, it is still possible to spawn
subprocesses without absolute paths: namely, if called via a subshell,
- /bin/sh contains a compiled-in default $PATH (generally
- /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ) which is
- used. If the shell is skipped, and there is no PATH set, execvp(3) uses
- a _different_ hardcoded default, equivalent to ".:/bin:/usr/bin".
+ /bin/sh uses a compiled-in default $PATH, which varies per OS and
+ shell:
- As File::Which is unaware of these two defaults, and thus fails to
- locate gnupg or openssl, despite that system() would likely find them in
- /usr/bin. As such, gpg or smime support is improperly disabled in
- configurations where it worked previously.
+ Linux bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ OS X bash: /usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.
+ Linux zsh: /bin:/usr/bin:/usr/ucb:/usr/local/bin
- Hard-code the default PATH from /bin/sh in cases where it is unset 9not
- just empty), to mimic the previous functionality.
+ If the shell is skipped, and there is no PATH set, execvp(3) uses a
+ _different_ hardcoded default:
+
+ Linux: .:/bin:/usr/bin
+ OS X: /usr/bin:/bin
+
+ File::Which is unaware of these two layers of varying defaults, and thus
+ fails to locate gnupg or openssl, despite that system() would likely
+ find them in /usr/bin. As such, gpg or smime support is improperly
+ disabled in configurations where it worked previously.
+
+ To mimic the previous functionality, hard-code a default PATH in cases
+ where it is unset (not just empty), using the default value taken from
+ linux bash.
diff --git a/lib/RT/Crypt/GnuPG.pm b/lib/RT/Crypt/GnuPG.pm
--- a/lib/RT/Crypt/GnuPG.pm
More information about the Rt-commit
mailing list