s3:tests: Add smbspool test for CUPS-like "sanitized" Device URI in argv[0]
authorBryan Mason <bmason@redhat.com>
Thu, 26 Sep 2019 01:49:56 +0000 (18:49 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 16 Oct 2019 10:55:04 +0000 (10:55 +0000)
commitf0abf62adcf4bda6dd7b36ce74695f8ac8ec79f6
treec9e803811a17c0bc1ba5a58a8ea57e10d4d8b0a0
parent7259197bf716f8b81dea74beefe6ee3b1239f172
s3:tests: Add smbspool test for CUPS-like "sanitized" Device URI in argv[0]

Before calling a backend like smbspool, CUPS will set argv[0] to the
"sanitized" Device URI (the Device URI with username/password
information removed).  These changes are intended to catch problems
with smbspool that may be created by this behavior (like
https://bugzilla.samba.org/show_bug.cgi?id=14128).

source3/script/tests/smbspool_argv_wrapper.c: added to emulate
CUPS-like behavior by setting argv[0] to the device URI before
exec()ing smbspool.

source3/script/tests/test_smbspool.sh: updated to use
smbspool_argv_wrapper to test the CUPS-like behavior described above.

Signed-off-by: Bryan Mason <bmason@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Oct 16 10:55:04 UTC 2019 on sn-devel-184
source3/script/tests/smbspool_argv_wrapper.c [new file with mode: 0644]
source3/script/tests/test_smbspool.sh
source3/wscript_build