smbdotconf: mark "cups server" with substitution="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 16:19:58 +0000 (17:19 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Nov 2019 10:25:34 +0000 (10:25 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
docs-xml/smbdotconf/printing/cupsserver.xml
source3/printing/print_cups.c

index 19bb769808f838baa2d30f023cdcd0b87217aca5..c18c115723b3c633d911164f0956e4db7c2eaaa6 100644 (file)
@@ -1,6 +1,7 @@
 <samba:parameter name="cups server"
                  context="G"
                  type="string"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
     <para>
index 53e6dd05dfb024f10a468aa960f1f713e16cf633..6ad85498be3a76bcc2160140613339e13fc718d3 100644 (file)
@@ -108,14 +108,16 @@ cups_passwd_cb(const char *prompt)        /* I - Prompt */
 
 static http_t *cups_connect(TALLOC_CTX *frame)
 {
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        http_t *http = NULL;
        char *server = NULL, *p = NULL;
        int port;
        int timeout = lp_cups_connection_timeout();
        size_t size;
 
-       if (lp_cups_server(talloc_tos()) != NULL && strlen(lp_cups_server(talloc_tos())) > 0) {
-               if (!push_utf8_talloc(frame, &server, lp_cups_server(talloc_tos()), &size)) {
+       if (lp_cups_server(talloc_tos(), lp_sub) != NULL && strlen(lp_cups_server(talloc_tos(), lp_sub)) > 0) {
+               if (!push_utf8_talloc(frame, &server, lp_cups_server(talloc_tos(), lp_sub), &size)) {
                        return NULL;
                }
        } else {