Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37732508
en ru br
ALT Linux repos
S:5.34.1-alt1
5.0: 5.8.9-alt2
4.1: 5.8.8-alt19.M41.1
4.0: 5.8.8-alt14
+updates:5.8.8-alt14
3.0: 5.8.7-alt2

Group :: Development/Perl
RPM: perl

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: perl-5.22.3-alt-mcpain-trust-mode.patch
Download


diff --git a/perl.c b/perl.c
index 180aa79..aa28d88 100644
--- a/perl.c
+++ b/perl.c
@@ -4388,7 +4388,8 @@ S_init_perllib(pTHX)
 
     if (!TAINTING_get) {
 #ifndef VMS
-	perl5lib = PerlEnv_getenv("PERL5LIB");
+	struct stat buffer;
+	perl5lib = stat("/etc/alt/security/perl-trust", &buffer) ? PerlEnv_getenv("PERL5LIB") : "";
 /*
  * It isn't possible to delete an environment variable with
  * PERL_USE_SAFE_PUTENV set unless unsetenv() is also available, so in that
@@ -4401,7 +4401,8 @@ S_init_perllib(pTHX)
 #endif
 	    incpush_use_sep(perl5lib, 0, INCPUSH_ADD_SUB_DIRS);
 	else {
-	    s = PerlEnv_getenv("PERLLIB");
+	    struct stat buffer;
+	    s = stat("/etc/alt/security/perl-trust", &buffer) ? PerlEnv_getenv("PERLLIB") : "";
 	    if (s)
 		incpush_use_sep(s, 0, 0);
 	}
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin