1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
samba-mirror/source3/printing
Ralph Boehme 8846887a55 s3:printing: Fix %J substition
print_run_command() uses lp_print_command() which internally performs basic
substition by calling talloc_sub_basic(). As a result. any of the variables in
the "basic set", including "%J" are already substituted.

To prevent the unwanted subtitution, we declare all affected configuration
options as const, which disabled the basic substition.

As a result print_run_command() can run manual substitution on all characters,
including %J, in the variadic argument list *before* calling lp_string() to run
basic substition which we had disabled before with the const.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13745

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov  7 16:01:21 UTC 2019 on sn-devel-184
2019-11-07 16:01:21 +00:00
..
tests s3:printing: Fix setting the first jobnum 2017-07-25 09:14:19 +02:00
load.c printing: drop pcap_cache_loaded() guard around load_printers() 2019-02-01 16:08:25 +01:00
load.h printing: remove unused arguments from load_printers() 2018-06-14 20:52:20 +02:00
lpq_parse.c
notify.c s3/printing: cppcheck avoid 'nullPointerArithmetic:' error 2019-05-29 10:10:23 +00:00
notify.h Convert all uint32/16/8 to _t in a grab-bag of remaining files. 2015-05-14 22:16:56 +02:00
nt_printing_ads.c s3:libnet: Require sealed LDAP SASL connections for joining 2019-10-09 07:06:35 +00:00
nt_printing_migrate_internal.c lib: Pass mem_ctx to state_path() 2018-08-17 11:30:11 +02:00
nt_printing_migrate_internal.h
nt_printing_migrate.c s3-printing: fix migrate printer code (bug 8618) 2016-10-05 19:19:38 +02:00
nt_printing_migrate.h
nt_printing_os2.c werror: replace WERR_NOMEM with WERR_NOT_ENOUGH_MEMORY in source3/printing/ 2016-09-28 00:04:18 +02:00
nt_printing_os2.h
nt_printing_tdb.c lib: Pass mem_ctx to state_path() 2018-08-17 11:30:11 +02:00
nt_printing_tdb.h
nt_printing.c smbd: rename [un]become_user*() to [un]become_user_without_service*() 2019-09-11 19:59:34 +00:00
pcap.c printing: check lp_load_printers() prior to pcap cache update 2019-02-01 19:25:03 +01:00
pcap.h printing: return last change time with pcap_cache_loaded() 2014-08-08 14:10:39 +02:00
print_aix.c printing: Convert aix_cache_reload to stdio 2016-12-11 11:17:24 +01:00
print_cups.c Correct "successfuly" typos. 2017-02-22 08:26:22 +01:00
print_generic.c s3:printing: Fix %J substition 2019-11-07 16:01:21 +00:00
print_iprint.c s3:printing: fix some const warnings in print_iprint.c 2014-11-25 07:25:44 +01:00
print_standard.c printing: std_pcap_cache_reload xfile->stdio 2016-12-11 11:17:23 +01:00
print_svid.c s3: smbd: Convert print_svid code to use file_lines_ploadv(). 2019-05-24 19:00:05 +00:00
printer_list.c lib: Pass mem_ctx to lock_path() 2018-08-17 11:30:10 +02:00
printer_list.h
printing_db.c lib: Pass mem_ctx to cache_path() 2018-08-17 14:28:51 +02:00
printing.c s3:printing: Fix %J substition 2019-11-07 16:01:21 +00:00
printspoolss.c s3: smbd: printing: Re-implement delete-on-close semantics for print files missing since 3.5.x. 2018-06-01 20:32:03 +02:00
queue_process.c s3:printing: Add spoolssd header file 2019-10-18 16:07:35 +00:00
queue_process.h s3:printing: Add header inclusion guards in queue_process.h 2019-10-18 16:07:35 +00:00
spoolssd.c s3:printing: Add spoolssd header file 2019-10-18 16:07:35 +00:00
spoolssd.h s3:printing: Add spoolssd header file 2019-10-18 16:07:35 +00:00