From: Stefan Metzmacher Date: Fri, 8 May 2026 21:27:35 +0000 (+0200) Subject: CVE-2026-4480: s3:testparm: warn about 'print command' %J usage X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=c6ecded7002c112ffd239e6082ab37e8eb7a4ff5;p=thirdparty%2Fsamba.git CVE-2026-4480: s3:testparm: warn about 'print command' %J usage BUG: https://bugzilla.samba.org/show_bug.cgi?id=16033 Signed-off-by: Stefan Metzmacher Reviewed-by: Douglas Bagnall --- diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index af3a253fc28..156a78c0f69 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -953,6 +953,14 @@ static void do_per_share_checks(int s) "parameter is ignored when using CUPS libraries.\n\n", lp_servicename(talloc_tos(), lp_sub, s)); } + if (talloc_string_sub_mixed_quoting(lp_print_command(s), 'J')) { + fprintf(stderr, + "WARNING: Service %s defines a 'print command' " + "with mixed quoting and %%J.\n" + "CVE-2026-4480 changed the way %%J substitution works.\n" + "You should use single quotes (directly) around '%%J'.\n\n", + lp_servicename(talloc_tos(), lp_sub, s)); + } vfs_objects = lp_vfs_objects(s); if (vfs_objects && str_list_check(vfs_objects, "fruit")) {