From 9b499996c4d7bdd963f14242ee727adbe14e3aa7 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 12 Apr 2013 11:07:56 +0200 Subject: lib: Make create_synthetic_smb_fname_split use synthetic_smb_fname_split Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/lib/filename_util.c | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) (limited to 'source3') diff --git a/source3/lib/filename_util.c b/source3/lib/filename_util.c index 2fe611c6d4..51b2d1d930 100644 --- a/source3/lib/filename_util.c +++ b/source3/lib/filename_util.c @@ -91,30 +91,11 @@ NTSTATUS create_synthetic_smb_fname_split(TALLOC_CTX *ctx, const SMB_STRUCT_STAT *psbuf, struct smb_filename **smb_fname_out) { - NTSTATUS status; - const char *stream_name = NULL; - char *base_name = NULL; - - if (!lp_posix_pathnames()) { - stream_name = strchr_m(fname, ':'); - } - - /* Setup the base_name/stream_name. */ - if (stream_name) { - base_name = talloc_strndup(ctx, fname, - PTR_DIFF(stream_name, fname)); - } else { - base_name = talloc_strdup(ctx, fname); - } - - if (!base_name) { + *smb_fname_out = synthetic_smb_fname_split(ctx, fname, psbuf); + if (*smb_fname_out == NULL) { return NT_STATUS_NO_MEMORY; } - - status = create_synthetic_smb_fname(ctx, base_name, stream_name, psbuf, - smb_fname_out); - TALLOC_FREE(base_name); - return status; + return NT_STATUS_OK; } struct smb_filename *synthetic_smb_fname_split(TALLOC_CTX *ctx, -- cgit