From: Stefan Metzmacher Date: Tue, 23 Jul 2024 09:46:57 +0000 (+0200) Subject: s3:tests: let modprinter.pl use $TMPDIR X-Git-Tag: tdb-1.4.11~79 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34c586680eaa324421a9375033fb2d1786b2df75;p=thirdparty%2Fsamba.git s3:tests: let modprinter.pl use $TMPDIR We should avoid using /tmp in selftest Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Stefan Metzmacher Autobuild-Date(master): Tue Jul 23 13:53:13 UTC 2024 on atb-devel-224 --- diff --git a/source3/script/tests/printing/modprinter.pl b/source3/script/tests/printing/modprinter.pl index 28817dbd284..bfe395a8509 100755 --- a/source3/script/tests/printing/modprinter.pl +++ b/source3/script/tests/printing/modprinter.pl @@ -122,7 +122,11 @@ while () { } } if ($opt_add) { - print CONFIGFILE_NEW "[$share_name]\n\tprintable = yes\n\tpath = /tmp\n"; + my $tmpdir = "/tmp"; + if (defined($ENV{TMPDIR})) { + $tmpdir = $ENV{TMPDIR}; + } + print CONFIGFILE_NEW "[$share_name]\n\tprintable = yes\n\tpath = $tmpdir\n"; } close (CONFIGFILE); close (CONFIGFILE_NEW);