- utility function for 'init mutex'
- install shared modules
- improve (un)install scripts (rewrite in perl?)
+- proper #include dependencies
#include "smb_macros.h"
#include "smb.h"
#include "byteorder.h"
-#include "lib/tdr/tdr.h"
#include "librpc/ndr/libndr.h"
#include "librpc/gen_ndr/misc.h"
#include "librpc/gen_ndr/dcerpc.h"
#include "librpc/gen_ndr/orpc.h"
#include "librpc/rpc/dcerpc.h"
#include "smb_interfaces.h"
-#include "ntvfs/ntvfs.h"
#include "cli_context.h"
#include "auth/credentials/credentials.h"
/***** automatically generated prototypes *****/
#define _PRINTF_ATTRIBUTE(a1, a2) PRINTF_ATTRIBUTE(a1, a2)
#include "include/proto.h"
+#include "basic.h"
#undef _PRINTF_ATTRIBUTE
#define _PRINTF_ATTRIBUTE(a1, a2)
struct smb2srv_request;
struct smb2_request_buffer;
-struct ntvfs_context;
struct ntvfs_module_context;
struct pvfs_dir;
struct model_ops;
struct stream_server_ops;
-struct nbtd_server;
-struct nbtd_interface;
-struct nbtd_iface_name;
struct wins_server;
struct nbtd_proxy_wins_challenge;
struct nbtd_proxy_wins_release_demand;
-struct nbt_iface_name;
struct nbt_dc_name;
struct wb_sid_object;
struct wb_dom_info;
struct MprVar;
struct registry_context;
+struct nbtd_interface;
+struct nbtd_iface_name;
+struct nbtd_server;
MINOR_VERSION = 0
RELEASE_VERSION = 1
DESCRIPTION = Simple marshall/unmarshall library
+PRIVATE_PROTO_HEADER = tdr/tdr_proto.h
OBJ_FILES = tdr/tdr.o
##############################
##############################
# Start SUBSYSTEM LIBBASIC
[SUBSYSTEM::LIBBASIC]
+PRIVATE_PROTO_HEADER = basic.h
OBJ_FILES = version.o \
xfile.o \
debug.o \
static struct reg_init_function_entry *reg_find_backend_entry(const char *name);
/* Register new backend */
-NTSTATUS registry_register(const void *_hive_ops)
+_PUBLIC_ NTSTATUS registry_register(const void *_hive_ops)
{
const struct hive_operations *hive_ops = _hive_ops;
struct reg_init_function_entry *entry = backends;
return NULL;
}
-NTSTATUS registry_init(void)
+_PUBLIC_ NTSTATUS registry_init(void)
{
init_module_fn static_init[] = STATIC_REGISTRY_MODULES;
init_module_fn *shared_init = load_samba_modules(NULL, "registry");
{ 0, NULL }
};
-int reg_list_predefs(TALLOC_CTX *mem_ctx, char ***predefs, uint32_t **hkeys)
+_PUBLIC_ int reg_list_predefs(TALLOC_CTX *mem_ctx, char ***predefs, uint32_t **hkeys)
{
int i;
*predefs = talloc_array(mem_ctx, char *, ARRAY_SIZE(predef_names));
}
/* Open a registry file/host/etc */
-WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *backend, const char *location, const char *credentials, struct registry_key **root)
+_PUBLIC_ WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *backend, const char *location, const char *credentials, struct registry_key **root)
{
struct registry_hive *rethive;
struct registry_key *retkey = NULL;
* First tries to use the open_key function from the backend
* then falls back to get_subkey_by_name and later get_subkey_by_index
*/
-WERROR reg_open_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, const char *name, struct registry_key **result)
+_PUBLIC_ WERROR reg_open_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, const char *name, struct registry_key **result)
{
WERROR error;
return WERR_OK;
}
-WERROR reg_key_get_value_by_index(TALLOC_CTX *mem_ctx, const struct registry_key *key, int idx, struct registry_value **val)
+_PUBLIC_ WERROR reg_key_get_value_by_index(TALLOC_CTX *mem_ctx, const struct registry_key *key, int idx, struct registry_value **val)
{
if(!key) return WERR_INVALID_PARAM;
return WERR_OK;
}
-WERROR reg_val_set(struct registry_key *key, const char *value, uint32_t type, DATA_BLOB data)
+_PUBLIC_ WERROR reg_val_set(struct registry_key *key, const char *value, uint32_t type, DATA_BLOB data)
{
/* A 'real' set function has preference */
if (key->hive->functions->set_value)
return WERR_NOT_SUPPORTED;
}
-WERROR reg_del_value(const struct registry_key *key, const char *valname)
+_PUBLIC_ WERROR reg_del_value(const struct registry_key *key, const char *valname)
{
WERROR ret = WERR_OK;
if(!key->hive->functions->del_value)
/*
* Generate diff between two registry contexts
*/
-struct reg_diff *reg_generate_diff(TALLOC_CTX *mem_ctx, struct registry_context *ctx1, struct registry_context *ctx2)
+_PUBLIC_ struct reg_diff *reg_generate_diff(TALLOC_CTX *mem_ctx, struct registry_context *ctx1, struct registry_context *ctx2)
{
struct reg_diff *diff = talloc_zero(mem_ctx, struct reg_diff);
int i;
/*
* Save registry diff
*/
-WERROR reg_diff_save(const struct reg_diff *diff, const char *filename)
+_PUBLIC_ WERROR reg_diff_save(const struct reg_diff *diff, const char *filename)
{
int xf, i, j;
/*
* Apply diff to a registry context
*/
-BOOL reg_diff_apply (const struct reg_diff *diff, struct registry_context *ctx)
+_PUBLIC_ BOOL reg_diff_apply (const struct reg_diff *diff, struct registry_context *ctx)
{
TALLOC_CTX *mem_ctx = talloc_init("apply_cmd_file");
struct registry_key *tmp = NULL;
#include "includes.h"
#include "system/network.h"
#include "system/filesys.h"
+#include "tdr/tdr.h"
#define TDR_BASE_MARSHALL_SIZE 1024
typedef NTSTATUS (*tdr_push_fn_t) (struct tdr_push *, const void *);
typedef NTSTATUS (*tdr_pull_fn_t) (struct tdr_pull *, TALLOC_CTX *, void *);
+
+#include "tdr/tdr_proto.h"
basics: include/config.h \
include/proto.h \
+ $(PROTO_HEADERS) \
idl \
- heimdal_basics \
- $(PROTO_HEADERS)
+ heimdal_basics
clean: heimdal_clean
@echo Removing headers
defense.o \
packet.o \
irpc.o
+PRIVATE_PROTO_HEADER = nbt_server_proto.h
REQUIRED_SUBSYSTEMS = \
LIBCLI_NBT NBTD_WINS NBTD_DGRAM
# End SUBSYSTEM NBTD
return; \
} \
} while (0)
+
+#include "nbt_server/nbt_server_proto.h"
#include "smb_server/smb_server.h"
#include "smbd/service_stream.h"
#include "auth/auth.h"
+#include "ntvfs/ntvfs.h"
/* this is stored in ntvfs_private */
struct cvfs_private {
MAJOR_VERSION = 0
MINOR_VERSION = 0
DESCRIPTION = Virtual File System with NTFS semantics
+PRIVATE_PROTO_HEADER = ntvfs_proto.h
RELEASE_VERSION = 1
OBJ_FILES = \
ntvfs_base.o \
#include "system/filesys.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
+#include "ntvfs/ntvfs.h"
#define IPC_BASE_FNUM 0x400
#include "includes.h"
#include "system/filesys.h"
#include "smb_server/smb_server.h"
+#include "ntvfs/ntvfs.h"
/* this is stored in ntvfs_private */
struct nbench_private {
int sizeof_smbsrv_tcon;
int sizeof_smbsrv_request;
};
+
+#include "ntvfs/ntvfs_proto.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
#include "smb_build.h"
+#include "ntvfs/ntvfs.h"
/* the list of currently registered NTVFS backends, note that there
* can be more than one backend with the same name, as long as they
#include "includes.h"
#include "smb_server/smb_server.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "ntvfs/ntvfs.h"
/* a second stage function converts from the out parameters of the generic
call onto the out parameters of the specific call made */
#include "includes.h"
#include "smb_server/smb_server.h"
-
+#include "ntvfs/ntvfs.h"
/* connect/disconnect */
NTSTATUS ntvfs_connect(struct smbsrv_request *req, const char *sharename)
#include "includes.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
+#include "ntvfs/ntvfs.h"
NTSTATUS ntvfs_async_state_push(struct smbsrv_request *req,
#include "system/filesys.h"
#include "smb_server/smb_server.h"
+#include "ntvfs/ntvfs.h"
/* this is the private structure for the posix vfs backend. It is used
to hold per-connection (per tree connect) state information */
#include "includes.h"
#include "ioctl.h"
#include "smb_server/smb_server.h"
+#include "ntvfs/ntvfs.h"
/*
connect to a share - used when a tree_connect operation comes
#include "svfs.h"
#include "system/time.h"
#include "system/dir.h"
+#include "ntvfs/ntvfs.h"
/*
convert a windows path to a unix path - don't do any manging or case sensitive handling
#include "system/time.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
+#include "ntvfs/ntvfs.h"
#ifndef O_DIRECTORY
#define O_DIRECTORY 0
#include "auth/auth.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "smb_server/smb_server.h"
+#include "ntvfs/ntvfs.h"
struct unixuid_private {
struct sidmap_context *sidmap;
pidl "";
pidl_hdr "/* autogenerated by pidl */";
pidl_hdr "#include \"$baseheader\"";
+ pidl_hdr "#include \"tdr/tdr.h\"";
pidl_hdr "";
foreach (@$idl) { ParserInterface($_) if ($_->{TYPE} eq "INTERFACE"); }
}
if (defined($public_file)) {
- open PUBLIC, ">$public_file";
+ open PUBLIC, ">$public_file" or die("Can't open `$public_file': $!");
$public_fd = \*PUBLIC;
}
if ($private_file eq $public_file) {
$private_fd = $public_fd;
} elsif (defined($private_file)) {
- open PRIVATE, ">$private_file";
+ open PRIVATE, ">$private_file" or die("Can't open `$private_file': $!"); ;
$private_fd = \*PRIVATE;
}
next if ($line =~ /^\/|[;]/);
+ if ($line =~ s/^_PUBLIC_[\t ]//) {
+ $target = $public_file;
+ }
+
next unless ( $line =~ /
^void|^BOOL|^int|^struct|^char|^const|^\w+_[tT]\s|^uint|^unsigned|^long|
^NTSTATUS|^ADS_STATUS|^enum\s.*\(|^DATA_BLOB|^WERROR|^XFILE|^FILE|^DIR|
next;
}
- if ($line =~ s/_PUBLIC_//xo) {
- $target = $public_file;
- }
-
if ( $line =~ /\(.*\)\s*$/o ) {
chomp $line;
print $target "$line;\n";
tcon.o \
session.o \
management.o
+PRIVATE_PROTO_HEADER = smb_server_proto.h
REQUIRED_SUBSYSTEMS = \
LIBPACKET \
SMB_PROTOCOL \
#include "includes.h"
#include "smb_server/smb_server.h"
#include "librpc/gen_ndr/ndr_security.h"
+#include "ntvfs/ntvfs.h"
#include "smbd/service_stream.h"
#include "smb_server/smb_server.h"
#include "lib/stream/packet.h"
+#include "ntvfs/ntvfs.h"
/*
#include "includes.h"
#include "smb_server/smb_server.h"
#include "libcli/nbt/libnbt.h"
+#include "ntvfs/ntvfs.h"
/* useful way of catching wct errors with file and line number */
#include "smb_server/smb_server.h"
#include "smbd/service_stream.h"
#include "lib/stream/packet.h"
+#include "ntvfs/ntvfs.h"
/* we over allocate the data buffer to prevent too many realloc calls */
#include "includes.h"
#include "smb_server/smb_server.h"
+#include "ntvfs/ntvfs.h"
/* check req->async.status and if not OK then send an error reply */
#include "includes.h"
#include "smb_server/smb_server.h"
#include "smbd/service_stream.h"
+#include "ntvfs/ntvfs.h"
/**
#include "dlinklist.h"
#include "smb_server/smb_server.h"
#include "librpc/gen_ndr/ndr_misc.h"
+#include "ntvfs/ntvfs.h"
#define CHECK_MIN_BLOB_SIZE(blob, size) do { \
if ((blob)->length < (size)) { \
BOOL nt_status_support;
} config;
};
+
+#include "smb_server/smb_server_proto.h"
#include "dlinklist.h"
#include "smb_server/smb_server.h"
#include "smbd/service_stream.h"
+#include "ntvfs/ntvfs.h"
/****************************************************************************
#include "system/kerberos.h"
#include "smb_build.h"
#include "registry/registry.h"
+#include "ntvfs/ntvfs.h"
/*
recursively delete a directory tree