r22616: allow the unclist file to not specify a share name, and instead
authorAndrew Tridgell <tridge@samba.org>
Mon, 30 Apr 2007 22:38:27 +0000 (22:38 +0000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 30 Apr 2007 22:38:27 +0000 (22:38 +0000)
inherit the share name from the command line if it is not
specified. This allows you to just specify the servers in the unclist,
and connect to the same share on all servers.

source/libcli/cliconnect.c

index 45f44adba13abcf5c357a8ee2444ec603cce7204..27f973637159fcebbd553d4cae912d30d8752305 100644 (file)
@@ -224,6 +224,9 @@ BOOL smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
        if (p && *p) {
                *sharename = talloc_strdup(mem_ctx, p);
                terminate_path_at_separator(*sharename);
+       } else {
+               *sharename = talloc_strdup(mem_ctx, 
+                                          lp_parm_string(-1, "torture", "share"));
        }
 
        if (*hostname && *sharename) {