s3:script: Fix running cp in modprinter.pl
authorAndreas Schneider <asn@samba.org>
Thu, 21 Mar 2019 15:06:05 +0000 (16:06 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 21 Mar 2019 16:41:33 +0000 (16:41 +0000)
We need to unset BASH_ENV or we get:
    Insecure $ENV{BASH_ENV} while running setgid

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Mar 21 16:41:33 UTC 2019 on sn-devel-144

source3/script/tests/printing/modprinter.pl

index ec1ebcd7ab8345b986b9ef445eb87e0e3e07c7b8..fc71e665451af09b353146ae29df0a27aa235547 100755 (executable)
@@ -131,6 +131,8 @@ if ($opt_delete && ($found_section == 0)) {
        die "share $share_name not found";
 }
 
+delete @ENV{'BASH_ENV'};
+
 $ENV{'PATH'} = '/bin:/usr/bin'; # untaint PATH
 system("cp", "$tmp", "$smb_conf_file");
 unlink $tmp;