]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Give reparse_symlink.c its own header
authorVolker Lendecke <vl@samba.org>
Sun, 24 Oct 2021 10:45:23 +0000 (12:45 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 11 Nov 2021 19:08:37 +0000 (19:08 +0000)
While there, avoid an "includes.h"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/clisymlink.c
source3/libsmb/proto.h
source3/libsmb/reparse_symlink.c
source3/libsmb/reparse_symlink.h [new file with mode: 0644]

index 1330752358d0af08c8e038b5568b6afba7001585..ac8d2e74c9b666cd46d8e13377e35bcba675edbe 100644 (file)
@@ -27,6 +27,7 @@
 #include "libcli/security/secdesc.h"
 #include "libcli/security/security.h"
 #include "../libcli/smb/smbXcli_base.h"
+#include "source3/libsmb/reparse_symlink.h"
 
 struct cli_symlink_state {
        struct tevent_context *ev;
index bd67e56b60f3328d0841f7c779e8b0264fff23bf..8a32d4b7c2d28644f7c5a01f9b55382ebad9e077 100644 (file)
@@ -1009,15 +1009,6 @@ NTSTATUS cli_trans(TALLOC_CTX *mem_ctx, struct cli_state *cli,
                   uint8_t **rparam, uint32_t min_rparam, uint32_t *num_rparam,
                   uint8_t **rdata, uint32_t min_rdata, uint32_t *num_rdata);
 
-/* The following definitions come from libsmb/reparse_symlink.c  */
-
-bool symlink_reparse_buffer_marshall(
-       const char *substitute, const char *printname, uint32_t flags,
-       TALLOC_CTX *mem_ctx, uint8_t **pdst, size_t *pdstlen);
-bool symlink_reparse_buffer_parse(
-       const uint8_t *src, size_t srclen, TALLOC_CTX *mem_ctx,
-       char **psubstitute_name, char **pprint_name, uint32_t *pflags);
-
 /* The following definitions come from libsmb/clisymlink.c  */
 
 struct tevent_req *cli_symlink_send(TALLOC_CTX *mem_ctx,
index 3e0de7111bb6ede240a1816ed88f49a47421a965..d7a4d542552dec59a1c5b3ef4fd5b86a52d9a944 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "includes.h"
-#include "include/client.h"
-#include "libsmb/proto.h"
-#include "include/ntioctl.h"
+#include "replace.h"
+#include "reparse_symlink.h"
+#include "lib/util/talloc_stack.h"
+#include "lib/util/charset/charset.h"
+#include "lib/util/byteorder.h"
+#include "libcli/smb/smb_constants.h"
+#include "libcli/smb/smb_util.h"
+#include "lib/util/debug.h"
 
 bool symlink_reparse_buffer_marshall(
        const char *substitute, const char *printname, uint32_t flags,
diff --git a/source3/libsmb/reparse_symlink.h b/source3/libsmb/reparse_symlink.h
new file mode 100644 (file)
index 0000000..6492578
--- /dev/null
@@ -0,0 +1,36 @@
+/*
+ * Unix SMB/CIFS implementation.
+ *
+ * Implementation of
+ * http://msdn.microsoft.com/en-us/library/cc232006%28v=PROT.13%29.aspx
+ *
+ * Copyright (C) Volker Lendecke 2011
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __REPARSE_SYMLINK_H__
+#define __REPARSE_SYMLINK_H__
+
+#include "replace.h"
+#include <talloc.h>
+
+bool symlink_reparse_buffer_marshall(
+       const char *substitute, const char *printname, uint32_t flags,
+       TALLOC_CTX *mem_ctx, uint8_t **pdst, size_t *pdstlen);
+bool symlink_reparse_buffer_parse(
+       const uint8_t *src, size_t srclen, TALLOC_CTX *mem_ctx,
+       char **psubstitute_name, char **pprint_name, uint32_t *pflags);
+
+#endif