remove some unused functions.
*/
#include "includes.h"
+#include "../lib/crypto/crc32.h"
static const uint32_t crc32_tab[] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
*/
#include "includes.h"
+#include "../lib/crypto/md4.h"
/* NOTE: This code makes no attempt to be fast!
*/
_PUBLIC_ void dbghdr(int level, const char *location, const char *func);
+_PUBLIC_ void dbghdrclass(int level, int class, const char *location, const char *func);
+
/**
reopen the log file (usually called because the log file name might have changed)
*/
macro instead.
*/
_PUBLIC_ void dbgtext(const char *format, ...) PRINTF_ATTRIBUTE(1,2);
+
+extern XFILE *dbf;
void interpret_dos_date(uint32_t date,int *year,int *month,int *day,int *hour,int *minute,int *second);
-
struct timespec nt_time_to_unix_timespec(NTTIME *nt);
+time_t convert_timespec_to_time_t(struct timespec ts);
+
+struct timespec convert_time_t_to_timespec(time_t t);
+
+bool null_timespec(struct timespec ts);
+
#endif /* _SAMBA_TIME_H_ */
#include "includes.h"
#include "system/filesys.h"
+#include "../lib/util/unix_privs.h"
/**
* @file
return true;
}
-
void print_asc(int level, const uint8_t *buf,int len)
{
int i;
**/
_PUBLIC_ char *fd_load(int fd, size_t *size, size_t maxsize, TALLOC_CTX *mem_ctx);
+
+char **file_lines_parse(char *p, size_t size, int *numlines, TALLOC_CTX *mem_ctx);
+
/**
load a file into memory
**/
**/
_PUBLIC_ char *smb_xstrdup(const char *s);
+char *smb_xstrndup(const char *s, size_t n);
+
/**
Like strdup but for memory.
**/
*/
_PUBLIC_ void *realloc_array(void *ptr, size_t el_size, unsigned count, bool free_on_fail);
+void *malloc_array(size_t el_size, unsigned int count);
+
/* The following definitions come from lib/util/fsusage.c */
#define talloc_get_type_abort(ptr, type) \
(type *)talloc_check_name_abort(ptr, #type)
+bool unmap_file(void *start, size_t size);
+
+void print_asc(int level, const uint8_t *buf,int len);
+
#endif /* _SAMBA_UTIL_H_ */
* set then an error is returned */
off_t x_tseek(XFILE *f, off_t offset, int whence);
+XFILE *x_fdup(const XFILE *f);
+
#endif /* _XFILE_H_ */
#include "lib/events/events.h"
#include "../lib/util/dlinklist.h"
#include "../libcli/nbt/libnbt.h"
+#include "../libcli/nbt/nbt_proto.h"
#include "lib/socket/socket.h"
#include "librpc/gen_ndr/ndr_nbt.h"
#include "param/param.h"
#include "system/network.h"
#include "librpc/ndr/libndr.h"
-_PUBLIC_ void ndr_print_in_addr(struct ndr_print *ndr, const char *name, const struct in_addr *_ip)
-{
- struct in_addr ip;
-
- ip.s_addr = htonl(_ip->s_addr);
-
- ndr->print(ndr, "%-25s: %s", name, inet_ntoa(ip));
-}
-
_PUBLIC_ void ndr_print_GUID(struct ndr_print *ndr, const char *name, const struct GUID *guid)
{
ndr->print(ndr, "%-25s: %s", name, GUID_string(ndr, guid));
}
-NTSTATUS ndr_table_register_builtin_tables(void);
-
NTSTATUS ndr_table_init(void)
{
static bool initialized = false;
const struct ndr_interface_table *ndr_table_by_uuid(const struct GUID *uuid);
const struct ndr_interface_list *ndr_table_list(void);
NTSTATUS ndr_table_init(void);
+NTSTATUS ndr_table_register_builtin_tables(void);
#endif /* _NDR_TABLE_PROTO_H_ */
};
ndr_table_init();
-#if (_SAMBA_BUILD_ >= 3)
+
/* Initialise samba stuff */
load_case_tables();
dbf = x_stderr;
- setup_logging(argv[0],True);
-#endif
+ setup_logging(argv[0], true);
pc = poptGetContext("ndrdump", argc, argv, long_options, 0);
#include "auth/auth.h"
#include "libcli/security/security.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
+#include "auth/auth_sam_reply.h"
NTSTATUS auth_convert_server_info_sambaseinfo(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
#include "librpc/gen_ndr/samr.h" /* for struct samrPassword */
#include "auth/credentials/credentials.h"
#include "auth/credentials/credentials_krb5.h"
+#include "auth/credentials/credentials_proto.h"
#include "libcli/auth/libcli_auth.h"
#include "lib/events/events.h"
#include "param/param.h"
#include "../lib/util/util_ldb.h"
#include "auth/credentials/credentials.h"
#include "auth/credentials/credentials_krb5.h"
+#include "auth/credentials/credentials_proto.h"
#include "param/param.h"
#include "lib/events/events.h"
.priority = GENSEC_SASL
};
-int gensec_sasl_log(void *context,
+static int gensec_sasl_log(void *context,
int sasl_log_level,
const char *message)
{
return NT_STATUS_OK;
}
-size_t gensec_gssapi_sig_size(struct gensec_security *gensec_security, size_t data_size)
+static size_t gensec_gssapi_sig_size(struct gensec_security *gensec_security, size_t data_size)
{
struct gensec_gssapi_state *gensec_gssapi_state
= talloc_get_type(gensec_security->private_data, struct gensec_gssapi_state);
#include "libcli/auth/libcli_auth.h"
#include "auth/auth.h"
#include "param/param.h"
+#include "auth/gensec/schannel_state.h"
/**
connect to the schannel ldb
#include "includes.h"
#include "../lib/util/asn1.h"
#include "auth/gensec/gensec.h"
+#include "system/kerberos.h"
+#include "auth/kerberos/kerberos.h"
/*
generate a krb5 GSS-API wrapper packet given a ticket
#include "includes.h"
#include "system/kerberos.h"
+#include "auth/kerberos/kerberos.h"
#ifdef HAVE_KRB5
#include "includes.h"
#include "system/kerberos.h"
+#include "auth/kerberos/kerberos.h"
/* Taken from accept_sec_context.c,v 1.65 */
krb5_error_code smb_rd_req_return_stuff(krb5_context context,
#include "includes.h"
#include "auth/auth.h"
+#include "auth/auth_proto.h"
#include "libcli/security/security.h"
#include "libcli/auth/libcli_auth.h"
#include "dsdb/samdb/samdb.h"
*/
#include "includes.h"
+#include "auth/ntlm/pam_errors.h"
#ifdef WITH_HAVE_SECURITY_PAM_APPL_H
#include <security/pam_appl.h>
#ifndef __AUTH_NTLM_PAM_ERRORS_H__
#define __AUTH_NTLM_PAM_ERRORS_H__
-/* The following definitions come from auth/pam_errors.c */
-
-
-/*****************************************************************************
-convert a PAM error to a NT status32 code
- *****************************************************************************/
-NTSTATUS pam_to_nt_status(int pam_error);
-
-/*****************************************************************************
-convert an NT status32 code to a PAM error
- *****************************************************************************/
-int nt_status_to_pam(NTSTATUS nt_status);
-
/*****************************************************************************
convert a PAM error to a NT status32 code
*****************************************************************************/
*/
#include "includes.h"
-#include "pstring.h"
#include "param/param.h"
+#include "auth/ntlmssp/msrpc_parse.h"
/*
this is a tiny msrpc packet generator. I am only using this to
#include "libcli/ldap/ldap.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "param/param.h"
+#include "auth/auth_sam.h"
const char *user_attrs[] = {
/* required for the krb5 kdc */
#include "../lib/util/dlinklist.h"
#include "param/param.h"
#include "librpc/gen_ndr/security.h"
+#include "cluster/ctdb/ctdb_cluster.h"
/* a linked list of messaging handlers, allowing incoming messages
to be directed to the right messaging context */
#include "includes.h"
#include "librpc/gen_ndr/samr.h"
#include "dsdb/common/flags.h"
+#include "lib/ldb/include/ldb.h"
+#include "dsdb/common/proto.h"
/*
translated the ACB_CTRL Flags to UserFlags (userAccountControl)
/**
* Make a and 'and' or 'or' tree from the two supplied elements
*/
-struct ldb_parse_tree *make_parse_list(struct ldb_module *module,
+static struct ldb_parse_tree *make_parse_list(struct ldb_module *module,
TALLOC_CTX *mem_ctx, enum ldb_parse_op op,
struct ldb_parse_tree *first_arm, struct ldb_parse_tree *second_arm)
{
/**
* Make an equality or prefix match tree, from the attribute, operation and matching value supplied
*/
-struct ldb_parse_tree *make_match_tree(struct ldb_module *module,
+static struct ldb_parse_tree *make_match_tree(struct ldb_module *module,
TALLOC_CTX *mem_ctx, enum ldb_parse_op op,
const char *attr, const DATA_BLOB *match)
{
* helper functions to call the next module in chain
* */
-int partition_request(struct ldb_module *module, struct ldb_request *request)
+static int partition_request(struct ldb_module *module, struct ldb_request *request)
{
int ret;
switch (request->operation) {
struct samldb_step *curstep;
};
-struct samldb_ctx *samldb_ctx_init(struct ldb_module *module,
- struct ldb_request *req)
+static struct samldb_ctx *samldb_ctx_init(struct ldb_module *module,
+ struct ldb_request *req)
{
struct samldb_ctx *ac;
bool found;
};
-struct update_kt_ctx *update_kt_ctx_init(struct ldb_module *module,
- struct ldb_request *req)
+static struct update_kt_ctx *update_kt_ctx_init(struct ldb_module *module,
+ struct ldb_request *req)
{
struct update_kt_ctx *ac;
* free all the memory used by (len, keys)
*/
-void
+static void
hdb_free_keys (krb5_context context, int len, Key *keys)
{
int i;
* it's random keys that is going to be created.
*/
-krb5_error_code
+static krb5_error_code
hdb_generate_key_set(krb5_context context, krb5_principal principal,
Key **ret_key_set, size_t *nkeyset, int no_salt)
{
}
-krb5_error_code
+static krb5_error_code
hdb_generate_key_set_password(krb5_context context,
krb5_principal principal,
const char *password,
*/
#include "../replace/replace.h"
+#include "heimdal/lib/gssapi/gssapi_mech.h"
-void *__gss_ntlm_initialize(void)
+gssapi_mech_interface __gss_ntlm_initialize(void)
{
return NULL;
}
const char *dos_charset,
const char *unix_charset,
bool native_iconv);
+
+void load_case_tables(void);
+bool charset_register_backend(const void *_funcs);
+
#endif /* __CHARSET_H__ */
#include "includes.h"
#include "system/filesys.h"
#include "auth/credentials/credentials.h"
+#include "lib/cmdline/credentials.h"
static const char *cmdline_get_userpassword(struct cli_credentials *credentials)
{
extern struct cli_credentials *cmdline_credentials;
extern struct loadparm_context *cmdline_lp_ctx;
+void popt_common_dont_ask(void);
+
#endif /* _POPT_COMMON_H */
#include "talloc.h"
#include "events.h"
#include "events_internal.h"
+#include "events_util.h"
#include <fcntl.h>
/**
void ldb_msg_remove_element(struct ldb_message *msg, struct ldb_message_element *el);
+int ldb_msg_element_compare_name(struct ldb_message_element *el1,
+ struct ldb_message_element *el2);
+void ldb_dump_results(struct ldb_context *ldb, struct ldb_result *result, FILE *f);
+
/**
Obtain current/next database sequence number
*/
int ldb_mod_register_control(struct ldb_module *module, const char *oid);
+
+struct ldb_val ldb_binary_decode(void *mem_ctx, const char *str);
+
#endif
int map_return_normal_error(struct ldb_request *req,
struct ldb_reply *ares,
int error);
+
+int map_return_entry(struct map_context *ac, struct ldb_reply *ares);
return LDB_ERR_NO_SUCH_OBJECT on record-not-found
and LDB_SUCCESS on success
*/
-int ltdb_search_base(struct ldb_module *module, struct ldb_dn *dn)
+static int ltdb_search_base(struct ldb_module *module, struct ldb_dn *dn)
{
struct ltdb_private *ltdb = (struct ltdb_private *)module->private_data;
TDB_DATA tdb_key, tdb_data;
check special dn's have valid attributes
currently only @ATTRIBUTES is checked
*/
-int ltdb_check_special_dn(struct ldb_module *module,
+static int ltdb_check_special_dn(struct ldb_module *module,
const struct ldb_message *msg)
{
int i, j;
return ret;
}
-void ltdb_request_done(struct ldb_request *req, int error)
+static void ltdb_request_done(struct ldb_request *req, int error)
{
struct ldb_reply *ares;
};
-int store_destructor(struct results_store *del)
+static int store_destructor(struct results_store *del)
{
struct private_data *priv = del->priv;
struct results_store *loop;
const struct reg_diff_callbacks *callbacks,
void *callback_data);
+WERROR reg_dotreg_diff_load(int fd,
+ struct smb_iconv_convenience *iconv_convenience,
+ const struct reg_diff_callbacks *callbacks,
+ void *callback_data);
+
+WERROR reg_preg_diff_load(int fd,
+ struct smb_iconv_convenience *iconv_convenience,
+ const struct reg_diff_callbacks *callbacks,
+ void *callback_data);
+
+WERROR local_get_predefined_key(struct registry_context *ctx,
+ uint32_t key_id, struct registry_key **key);
#endif /* _REGISTRY_H */
This is what sys_select() used to do in Samba.
********************************************************************/
-int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval)
+static int sys_select_intr(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *tval)
{
int ret;
fd_set *readfds2, readfds_buf, *writefds2, writefds_buf, *errorfds2, errorfds_buf;
const char *crlfile = private_path(tmp_ctx, lp_ctx, lp_tls_crlfile(lp_ctx));
const char *dhpfile = private_path(tmp_ctx, lp_ctx, lp_tls_dhpfile(lp_ctx));
void tls_cert_generate(TALLOC_CTX *, const char *, const char *, const char *);
-
params = talloc(mem_ctx, struct tls_params);
if (params == NULL) {
talloc_free(tmp_ctx);
#define LIFETIME 700*24*60*60
#define DH_BITS 1024
+void tls_cert_generate(TALLOC_CTX *mem_ctx,
+ const char *keyfile, const char *certfile,
+ const char *cafile);
+
/*
auto-generate a set of self signed certificates
*/
*/
#include "includes.h"
+#include "libcli/auth/libcli_auth.h"
/* NOTES:
#include "../lib/util/asn1.h"
#include "libcli/ldap/ldap.h"
#include "lib/ldb/include/ldb.h"
+#include "libcli/ldap/ldap_proto.h"
struct control_handler {
const char *oid;
#include "includes.h"
#include "libcli/ldap/ldap.h"
#include "libcli/ldap/ldap_client.h"
+#include "libcli/ldap/ldap_proto.h"
_PUBLIC_ struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx)
#include "libcli/ldap/ldap.h"
#include "librpc/gen_ndr/ndr_security.h"
#include "librpc/gen_ndr/ndr_misc.h"
+#include "libcli/ldap/ldap_ndr.h"
/*
encode a NDR uint32 as a ldap filter element
#include "includes.h"
#include "libcli/raw/libcliraw.h"
+#include "libcli/raw/raw_proto.h"
/***************************************************************************
#include "lib/socket/socket.h"
#include "libcli/resolve/resolve.h"
#include "param/param.h"
+#include "libcli/raw/raw_proto.h"
struct sock_connect_state {
struct composite_context *ctx;
#include "includes.h"
#include "libcli/raw/libcliraw.h"
+#include "libcli/raw/raw_proto.h"
/*******************************************************************
put a dos date into a buffer (time/date format)
#include "includes.h"
#include "smb.h"
#include "libcli/raw/libcliraw.h"
+#include "libcli/raw/raw_proto.h"
/*
work out how many bytes on the wire a ea list will consume.
#include "includes.h"
#include "smb.h"
#include "libcli/raw/libcliraw.h"
+#include "libcli/raw/raw_proto.h"
/****************************************************************************
lpq - async send
#include "librpc/gen_ndr/ndr_nbt.h"
#include "../libcli/nbt/libnbt.h"
#include "param/param.h"
+#include "libcli/resolve/resolve.h"
struct nbtlist_state {
struct nbt_name name;
#include "libnet/userman.h"
#include "libnet/groupinfo.h"
#include "librpc/gen_ndr/ndr_samr_c.h"
+#include "libnet/libnet_proto.h"
struct groupinfo_state {
#include "libnet/composite.h"
#include "libnet/groupman.h"
#include "librpc/gen_ndr/ndr_samr_c.h"
+#include "libnet/libnet_proto.h"
struct groupadd_state {
#include "libcli/security/security.h"
#include "lib/events/events.h"
-struct libnet_context *py_net_ctx(PyObject *obj, struct event_context *ev)
+static struct libnet_context *py_net_ctx(PyObject *obj, struct event_context *ev)
{
/* FIXME: Use obj */
return libnet_context_init(ev, global_loadparm);
#include "libnet/userman.h"
#include "libnet/userinfo.h"
#include "librpc/gen_ndr/ndr_samr_c.h"
+#include "libnet/libnet_proto.h"
struct userinfo_state {
#include "libnet/userman.h"
#include "libnet/userinfo.h"
#include "librpc/gen_ndr/ndr_samr_c.h"
+#include "libnet/libnet_proto.h"
/*
* Composite USER ADD functionality
int NDR_CHECK_depth = 0;
int NDR_CHECK_shift = 0x18;
-int get_CIMTYPE_size(int t)
-{
- if (t & CIM_FLAG_ARRAY) return 4;
- t &= 0x1FF;
- switch (t) {
- case CIM_SINT8:
- case CIM_UINT8:
- return 1;
- case CIM_SINT16:
- case CIM_UINT16:
- case CIM_BOOLEAN:
- return 2;
- case CIM_SINT32:
- case CIM_UINT32:
- case CIM_REAL32:
- case CIM_STRING:
- case CIM_DATETIME:
- case CIM_REFERENCE:
- case CIM_OBJECT:
- return 4;
- case CIM_SINT64:
- case CIM_UINT64:
- case CIM_REAL64:
- return 8;
- default:
- DEBUG(0, ("Unknown CIMTYPE size for %04X", t));
- return 4;
- }
-}
-
enum ndr_err_code ndr_push_BSTR(struct ndr_push *ndr, int ndr_flags, const struct BSTR *r)
{
uint32_t len;
#include "nbt_server/nbt_server.h"
#include "lib/socket/socket.h"
#include "librpc/gen_ndr/ndr_nbt.h"
+#include "nbt_server/dgram/proto.h"
static const char *nbt_browse_opcode_string(enum nbt_browse_opcode r)
{
#include "smbd/service_task.h"
#include "cldap_server/cldap_server.h"
#include "libcli/security/security.h"
+#include "nbt_server/dgram/proto.h"
/*
reply to a GETDC request
#include "system/time.h"
#include "system/dir.h"
#include "ntvfs/ntvfs.h"
+#include "ntvfs/cifs_posix_cli/proto.h"
/*
convert a windows path to a unix path - don't do any manging or case sensitive handling
#include "librpc/gen_ndr/srvsvc.h"
#include "rpc_server/common/common.h"
#include "param/param.h"
+#include "ntvfs/ipc/ipc.h"
+#include "ntvfs/ipc/proto.h"
/* At this moment these are just dummy functions, but you might get the
* idea. */
#include "system/time.h"
#include "system/dir.h"
#include "ntvfs/ntvfs.h"
+#include "ntvfs/simple/proto.h"
/*
convert a windows path to a unix path - don't do any manging or case sensitive handling
goto done; \
} } while(0)
-NTSTATUS sldb_create(struct share_context *ctx, const char *name, struct share_info *info, int count)
+static NTSTATUS sldb_create(struct share_context *ctx, const char *name, struct share_info *info, int count)
{
struct ldb_context *ldb;
struct ldb_message *msg;
goto done; \
} } while(0)
-NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info *info, int count)
+static NTSTATUS sldb_set(struct share_context *ctx, const char *name, struct share_info *info, int count)
{
struct ldb_context *ldb;
struct ldb_message *msg;
return ret;
}
-NTSTATUS sldb_remove(struct share_context *ctx, const char *name)
+static NTSTATUS sldb_remove(struct share_context *ctx, const char *name)
{
struct ldb_context *ldb;
struct ldb_dn *dn;
#include "dsdb/samdb/samdb.h"
#include "auth/auth.h"
#include "param/param.h"
+#include "rpc_server/common/common.h"
+#include "rpc_server/common/proto.h"
/*
Here are common server info functions used by some dcerpc server interfaces
#include "param/share.h"
#include "librpc/gen_ndr/srvsvc.h"
#include "rpc_server/dcerpc_server.h"
+#include "rpc_server/common/common.h"
+#include "rpc_server/common/proto.h"
/*
Here are common server info functions used by some dcerpc server interfaces
/*
drsuapi_DsCrackNames
*/
-WERROR dcesrv_drsuapi_DsCrackNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
+static WERROR dcesrv_drsuapi_DsCrackNames(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct drsuapi_DsCrackNames *r)
{
WERROR status;
}
/* Obtain the site name from a server DN */
-const char *result_site_name(struct ldb_dn *site_dn)
+static const char *result_site_name(struct ldb_dn *site_dn)
{
/* Format is cn=<NETBIOS name>,cn=Servers,cn=<site>,cn=sites.... */
const struct ldb_val *val = ldb_dn_get_component_val(site_dn, 2);
*/
#include "includes.h"
+#include "scripting/python/modules.h"
#include <Python.h>
extern void init_ldb(void);
#include "includes.h"
#include "smbd/process_model.h"
+#include "smbd/process_model_proto.h"
#include "param/param.h"
static const struct model_ops *process_model_byname(const char *name);
#include "libnet/libnet.h"
#include "librpc/gen_ndr/ndr_samr_c.h"
#include "param/param.h"
+#include "torture/libnet/utils.h"
bool test_opendomain(struct torture_context *tctx,
.test_result = quiet_test_result
};
-void run_shell(struct torture_context *tctx)
+static void run_shell(struct torture_context *tctx)
{
char *cline;
int argc;
#include "../lib/util/dlinklist.h"
#include "param/param.h"
#include "lib/cmdline/popt_common.h"
+#include "torture/smbtorture.h"
_PUBLIC_ int torture_numops=10;
_PUBLIC_ int torture_entries=1000;