From: Volker Lendecke Date: Sun, 24 Oct 2021 10:45:23 +0000 (+0200) Subject: libsmb: Give reparse_symlink.c its own header X-Git-Tag: ldb-2.5.0~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58c8289b2ff8bf3a413e82f1d4dc05ab10a6e2d6;p=thirdparty%2Fsamba.git libsmb: Give reparse_symlink.c its own header While there, avoid an "includes.h" Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/clisymlink.c b/source3/libsmb/clisymlink.c index 1330752358d..ac8d2e74c9b 100644 --- a/source3/libsmb/clisymlink.c +++ b/source3/libsmb/clisymlink.c @@ -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; diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index bd67e56b60f..8a32d4b7c2d 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -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, diff --git a/source3/libsmb/reparse_symlink.c b/source3/libsmb/reparse_symlink.c index 3e0de7111bb..d7a4d542552 100644 --- a/source3/libsmb/reparse_symlink.c +++ b/source3/libsmb/reparse_symlink.c @@ -20,10 +20,14 @@ * along with this program. If not, see . */ -#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 index 00000000000..6492578ebeb --- /dev/null +++ b/source3/libsmb/reparse_symlink.h @@ -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 . + */ + +#ifndef __REPARSE_SYMLINK_H__ +#define __REPARSE_SYMLINK_H__ + +#include "replace.h" +#include + +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