summaryrefslogtreecommitdiff
path: root/source4/torture/gentest.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/gentest.c')
-rw-r--r--source4/torture/gentest.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/source4/torture/gentest.c b/source4/torture/gentest.c
index 9bfcbaac64..6a97f24ba5 100644
--- a/source4/torture/gentest.c
+++ b/source4/torture/gentest.c
@@ -26,7 +26,6 @@
#include "libcli/raw/libcliraw.h"
#include "librpc/gen_ndr/security.h"
#include "auth/gensec/gensec.h"
-#include "torture/torture.h"
#define NSERVERS 2
#define NINSTANCES 2
@@ -2136,6 +2135,28 @@ static void usage(void)
");
}
+/**
+ split a UNC name into server and share names
+*/
+static BOOL split_unc_name(const char *unc, char **server, char **share)
+{
+ char *p = strdup(unc);
+ if (!p) return False;
+ all_string_sub(p, "\\", "/", 0);
+ if (strncmp(p, "//", 2) != 0) return False;
+
+ (*server) = p+2;
+ p = strchr(*server, '/');
+ if (!p) return False;
+
+ *p = 0;
+ (*share) = p+1;
+
+ return True;
+}
+
+
+
/****************************************************************************
main program
****************************************************************************/