]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: lib: Add new clistr_smb2_extract_snapshot_token() function.
authorJeremy Allison <jra@samba.org>
Thu, 15 Dec 2022 21:26:49 +0000 (13:26 -0800)
committerVolker Lendecke <vl@samba.org>
Fri, 16 Dec 2022 07:42:38 +0000 (07:42 +0000)
Strips @GMT from client pathnames for SMB2 (uses '\\' separator).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/lib/util_path.c
source3/lib/util_path.h

index 319f500368b62ed503fd81afaa1f803338907982..fc76f6fb0bbd2b55113e611b6c60605fe475ae18 100644 (file)
@@ -310,6 +310,11 @@ bool extract_snapshot_token(char *fname, NTTIME *twrp)
        return extract_snapshot_token_internal(fname, twrp, '/');
 }
 
+bool clistr_smb2_extract_snapshot_token(char *fname, NTTIME *twrp)
+{
+       return extract_snapshot_token_internal(fname, twrp, '\\');
+}
+
 /*
  * Take two absolute paths, figure out if "subdir" is a proper
  * subdirectory of "parent". Return the component relative to the
index 5b0a1f13e380ffb2690e3bec67d92c52701b7674..7dd307f44dc5d8fed7e7ea157b1687d9f9f6c6a3 100644 (file)
@@ -45,6 +45,7 @@ char *state_path(TALLOC_CTX *mem_ctx, const char *name);
 char *cache_path(TALLOC_CTX *mem_ctx, const char *name);
 char *canonicalize_absolute_path(TALLOC_CTX *ctx, const char *abs_path);
 bool extract_snapshot_token(char *fname, NTTIME *twrp);
+bool clistr_smb2_extract_snapshot_token(char *fname, NTTIME *twrp);
 bool clistr_is_previous_version_path(const char *path,
                                     const char **startp,
                                     const char **endp,