]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:script: Fix running rsync in fake_snap.pl
authorAndreas Schneider <asn@samba.org>
Thu, 21 Mar 2019 13:37:28 +0000 (14:37 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 21 Mar 2019 15:10:29 +0000 (15:10 +0000)
We need to unset BASH_ENV or we get:
    Insecure $ENV{BASH_ENV} while running setgid

This probably only happens on recent perl versions.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
source3/script/tests/fake_snap.pl

index 18bbcb7142e4ceaa192cb88143dae9986cc5aa57..d88307eaecc0d3248e7b7ec8fa2df7f10fbda966 100755 (executable)
@@ -22,6 +22,8 @@ sub _create_snapshot
        my $snap_path = $base_path . "/.snapshots/\@GMT-" . $time_str;
        my $ret;
 
+       delete @ENV{'BASH_ENV'};
+
        $ENV{'PATH'} = '/bin:/usr/bin'; # untaint PATH
        POSIX::mkdir($base_path . "/.snapshots", 0755);