smbdotconf: mark "cups options" with substitution="1"
authorStefan Metzmacher <metze@samba.org>
Tue, 15 Oct 2019 14:54:45 +0000 (16:54 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:32 +0000 (10:25 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
docs-xml/smbdotconf/printing/cupsoptions.xml
source3/printing/print_cups.c

index 7e6b07db9f5df774c10f4b81de9e5d5e6a3f8ce1..833ba30a0d31c396572d97906610c89ee43ec373 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="cups options"
                  context="S"
                  type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
     <para>
index c4704cc5831baf0adde3387584bbefd8a5f00a32..c0265186fffcd1d5d9db580246c28d5ae4c3c9d5 100644 (file)
@@ -953,6 +953,8 @@ static int cups_job_submit(int snum, struct printjob *pjob,
                           char *lpq_cmd)
 {
        TALLOC_CTX *frame = talloc_stackframe();
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        int             ret = 1;                /* Return value */
        http_t          *http = NULL;           /* HTTP connection to server */
        ipp_t           *request = NULL,        /* IPP Request */
@@ -1060,7 +1062,7 @@ static int cups_job_submit(int snum, struct printjob *pjob,
         */
 
        if (!push_utf8_talloc(frame, &cupsoptions,
-                             lp_cups_options(talloc_tos(), snum), &size)) {
+                             lp_cups_options(talloc_tos(), lp_sub, snum), &size)) {
                goto out;
        }
        num_options = 0;