]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
selftest:Samba3: add simpleserver globals before include = global_inject.conf
authorStefan Metzmacher <metze@samba.org>
Fri, 12 Jul 2024 16:26:07 +0000 (18:26 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 17 Jul 2024 10:12:36 +0000 (10:12 +0000)
This allows overriding any existing parameter.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
selftest/target/Samba3.pm

index 291e3888fc6196d8d9db2e372843b9e2d705332d..547818a28c644365bcda189ccf5f0b2caaf3a20c 100755 (executable)
@@ -1716,14 +1716,16 @@ sub setup_simpleserver
        remove_tree($external_streams_depot);
        mkdir($external_streams_depot, 0777);
 
-       my $simpleserver_options = "
+       my $simpleserver_options_globals = "
        lanman auth = yes
        ntlm auth = yes
        vfs objects = xattr_tdb streams_depot
        change notify = no
        server smb encrypt = off
         allow trusted domains = no
+";
 
+       my $simpleserver_options = "
 [vfs_aio_pthread]
        path = $prefix_abs/share
        read only = no
@@ -1781,6 +1783,7 @@ sub setup_simpleserver
            domain => "WORKGROUP",
            server => "LOCALSHARE4",
            password => "local4pass",
+           extra_options_before_inject => $simpleserver_options_globals,
            extra_options => $simpleserver_options);
 
        $vars or return undef;
@@ -2554,7 +2557,8 @@ sub provision($$)
        my $realm = $args{realm};
        my $server = $args{server};
        my $password = $args{password};
-       my $extra_options = $args{extra_options};
+       my $extra_options_before_inject = $args{extra_options_before_inject} // "";
+       my $extra_options = $args{extra_options} // "";
        my $resolv_conf = $args{resolv_conf};
        my $no_delete_prefix= $args{no_delete_prefix};
        my $netbios_name = $args{netbios_name} // $server;
@@ -3004,6 +3008,10 @@ sub provision($$)
        #it just means we ALLOW one to be configured.
        allow insecure wide links = yes
 
+       # Begin extra options before global inject
+       $extra_options_before_inject
+       # End extra options befoore global inject
+
        include = $globalinjectconf
 
        # Begin extra options