summaryrefslogtreecommitdiff
path: root/source4/torture/gentest.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-17 17:59:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:37 -0500
commitd09b70c98b8222eb293bc9d8713ec071188ed01d (patch)
treee24c521a4adaff0bdbe3938ff80dfc4e8a21c428 /source4/torture/gentest.c
parent8437d5b8913d949b844448d84a003896f9694b94 (diff)
downloadsamba-d09b70c98b8222eb293bc9d8713ec071188ed01d.tar.gz
r14527: Fix build problems.
(This used to be commit 863ca4014d9b821706ee90f58ab5d5cf3899a4c7)
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 9bfcbaac641..6a97f24ba56 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
****************************************************************************/