1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

libsmb: Give reparse_symlink.c its own header

While there, avoid an "includes.h"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2021-10-24 12:45:23 +02:00 committed by Jeremy Allison
parent fadce102d4
commit 58c8289b2f
4 changed files with 45 additions and 13 deletions

View 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;

View 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,

View File

@ -20,10 +20,14 @@
* 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,

View File

@ -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