From 5eed3f48b6e07c1f6463750922f4bea82e1448ab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 3 Aug 2022 09:50:57 -0700 Subject: [PATCH] s3: smbd: Remove code for unused strip_gmt_from_raw_dfs(). Signed-off-by: Jeremy Allison Reviewed-by: Volker Lendecke --- source3/smbd/filename.c | 50 ----------------------------------------- 1 file changed, 50 deletions(-) diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 6b6f70e1100..dc89dfffa5e 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -2105,56 +2105,6 @@ NTSTATUS filename_convert(TALLOC_CTX *ctx, return status; } -#if 0 -/* - * Strip a @GMT component from an SMB1-DFS path. Could be anywhere - * in the path. - */ - -static char *strip_gmt_from_raw_dfs(TALLOC_CTX *ctx, - const char *name_in, - bool posix_pathnames, - NTTIME *_twrp) -{ - NTSTATUS status; - struct smb_filename *smb_fname = NULL; - char *name_out = NULL; - - smb_fname = synthetic_smb_fname(ctx, - name_in, - NULL, - NULL, - 0, - 0); - if (smb_fname == NULL) { - return NULL; - } - if (!posix_pathnames) { - /* - * Raw DFS names are still '\\' separated. - * canonicalize_snapshot_path() only works - * on '/' separated paths. Convert. - */ - string_replace(smb_fname->base_name, '\\', '/'); - } - status = canonicalize_snapshot_path(smb_fname, - UCF_GMT_PATHNAME, - 0); - if (!NT_STATUS_IS_OK(status)) { - TALLOC_FREE(smb_fname); - return NULL; - } - if (!posix_pathnames) { - /* Replace as raw DFS names. */ - string_replace(smb_fname->base_name, '/', '\\'); - } - name_out = talloc_strdup(ctx, smb_fname->base_name); - *_twrp = smb_fname->twrp; - TALLOC_FREE(smb_fname); - return name_out; -} -#endif - /* * Deal with the SMB1 semantics of sending a pathname with a * wildcard as the terminal component for a SMB1search or -- 2.47.3