smbdotconf: mark "defaultservice" with substitution="1"
authorRalph Boehme <slow@samba.org>
Mon, 4 Nov 2019 16:21:34 +0000 (17:21 +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/misc/defaultservice.xml
source3/param/service.c

index 788506f4de9c5818a304f71883db5a233f581f31..2da968b9c2fa4596735a26142303684e28793f0c 100644 (file)
@@ -2,6 +2,7 @@
                  context="G"
                  type="string"
                  function="defaultservice"
+                 substitution="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <synonym>default</synonym>
 <description>
index 22f46f0889482f58a5130c6ca0d2668a699ae57b..76c12bd591d22ae25cdc11b189e37142376818e2 100644 (file)
@@ -111,6 +111,8 @@ int add_home_service(const char *service, const char *username, const char *home
 
 int find_service(TALLOC_CTX *ctx, const char *service_in, char **p_service_out)
 {
+       const struct loadparm_substitution *lp_sub =
+               loadparm_s3_global_substitution();
        int iService;
 
        if (!service_in) {
@@ -199,7 +201,7 @@ int find_service(TALLOC_CTX *ctx, const char *service_in, char **p_service_out)
 
        /* just possibly it's a default service? */
        if (iService < 0) {
-               char *pdefservice = lp_defaultservice(talloc_tos());
+               char *pdefservice = lp_defaultservice(talloc_tos(), lp_sub);
                if (pdefservice &&
                                *pdefservice &&
                                !strequal(pdefservice, *p_service_out)