diff options
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/adt_tree.h | 29 | ||||
-rw-r--r-- | source/include/client.h | 1 | ||||
-rw-r--r-- | source/include/includes.h | 1 | ||||
-rw-r--r-- | source/include/local.h | 3 | ||||
-rw-r--r-- | source/include/msdfs.h | 6 | ||||
-rw-r--r-- | source/include/passdb.h | 14 | ||||
-rw-r--r-- | source/include/rpc_lsa.h | 4 | ||||
-rw-r--r-- | source/include/rpc_samr.h | 4 | ||||
-rw-r--r-- | source/include/smb.h | 4 | ||||
-rw-r--r-- | source/include/smb_macros.h | 2 | ||||
-rw-r--r-- | source/include/smbldap.h | 4 |
11 files changed, 58 insertions, 14 deletions
diff --git a/source/include/adt_tree.h b/source/include/adt_tree.h index 12e2ea5cc53..2fbfb55e889 100644 --- a/source/include/adt_tree.h +++ b/source/include/adt_tree.h @@ -21,6 +21,14 @@ #ifndef ADT_TREE_H #define ADT_TREE_H +#ifndef _BOOL +typedef int BOOL; +#define _BOOL +#endif + + +/* data structure used to build the tree */ + typedef struct _tree_node { struct _tree_node *parent; struct _tree_node **children; @@ -35,4 +43,25 @@ typedef struct _tree_root { void (*free_func)(void *p); } SORTED_TREE; +/* + * API + */ + +/* initializer and desctrutor */ +SORTED_TREE* pathtree_init( void *data_p, int (cmp_fn)(void*, void*), void (free_fn)(void*) ); +void pathtree_destroy( SORTED_TREE *tree ); + +/* add a new path component */ + +BOOL pathtree_add( SORTED_TREE *tree, const char *path, void *data_p ); + +/* search path */ + +void* pathtree_find( SORTED_TREE *tree, char *key ); + +/* debug (print) functions */ + +void pathtree_print_keys( SORTED_TREE *tree, int debug ); + + #endif diff --git a/source/include/client.h b/source/include/client.h index 8ae8faf90dc..61c420c06b1 100644 --- a/source/include/client.h +++ b/source/include/client.h @@ -106,6 +106,7 @@ struct cli_state { int initialised; int win95; uint32 capabilities; + BOOL dfsroot; TALLOC_CTX *mem_ctx; diff --git a/source/include/includes.h b/source/include/includes.h index 45c7133f1ea..982eee18862 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -802,7 +802,6 @@ extern int errno; #include "messages.h" #include "charset.h" #include "dynconfig.h" -#include "adt_tree.h" #include "util_getent.h" diff --git a/source/include/local.h b/source/include/local.h index 7ac2e256120..7d5baa21fa8 100644 --- a/source/include/local.h +++ b/source/include/local.h @@ -198,9 +198,6 @@ /* the maximum age in seconds of a password. Should be a lp_ parameter */ #define MAX_PASSWORD_AGE (21*24*60*60) -/* Allocation roundup. */ -#define SMB_ROUNDUP_ALLOCATION_SIZE 0x100000 - /* shall we deny oplocks to clients that get timeouts? */ #define FASCIST_OPLOCK_BACKOFF 1 diff --git a/source/include/msdfs.h b/source/include/msdfs.h index 32aa7ecef25..eaefa81c5b8 100644 --- a/source/include/msdfs.h +++ b/source/include/msdfs.h @@ -37,6 +37,12 @@ /* Maximum number of referrals for each Dfs volume */ #define MAX_REFERRAL_COUNT 256 +typedef struct _client_referral { + uint32 proximity; + uint32 ttl; + pstring dfspath; +} CLIENT_DFS_REFERRAL; + struct referral { pstring alternate_path; /* contains the path referred */ diff --git a/source/include/passdb.h b/source/include/passdb.h index 1b9ccc50ee4..3c244e7625b 100644 --- a/source/include/passdb.h +++ b/source/include/passdb.h @@ -241,7 +241,7 @@ struct acct_info * this SAMBA will load. Increment this if *ANY* changes are made to the interface. */ -#define PASSDB_INTERFACE_VERSION 6 +#define PASSDB_INTERFACE_VERSION 7 typedef struct pdb_context { @@ -287,6 +287,12 @@ typedef struct pdb_context GROUP_MAP **rmap, int *num_entries, BOOL unix_only); + NTSTATUS (*pdb_enum_group_members)(struct pdb_context *context, + TALLOC_CTX *mem_ctx, + const DOM_SID *group, + uint32 **member_rids, + int *num_members); + NTSTATUS (*pdb_enum_group_memberships)(struct pdb_context *context, const char *username, gid_t primary_gid, @@ -385,6 +391,12 @@ typedef struct pdb_methods GROUP_MAP **rmap, int *num_entries, BOOL unix_only); + NTSTATUS (*enum_group_members)(struct pdb_methods *methods, + TALLOC_CTX *mem_ctx, + const DOM_SID *group, + uint32 **member_rids, + int *num_members); + NTSTATUS (*enum_group_memberships)(struct pdb_methods *methods, const char *username, gid_t primary_gid, diff --git a/source/include/rpc_lsa.h b/source/include/rpc_lsa.h index c0425271b32..01add64727c 100644 --- a/source/include/rpc_lsa.h +++ b/source/include/rpc_lsa.h @@ -390,8 +390,8 @@ typedef struct lsa_trans_name_info } LSA_TRANS_NAME; -/* This number purly arbitary - just to prevent a client from requesting large amounts of memory */ -#define MAX_LOOKUP_SIDS 256 +/* This number is based on Win2k and later maximum response allowed */ +#define MAX_LOOKUP_SIDS 20480 /* LSA_TRANS_NAME_ENUM - LSA Translated Name Enumeration container */ typedef struct lsa_trans_name_enum_info diff --git a/source/include/rpc_samr.h b/source/include/rpc_samr.h index a007bcd2e57..e041ee26f0b 100644 --- a/source/include/rpc_samr.h +++ b/source/include/rpc_samr.h @@ -540,7 +540,7 @@ typedef struct sam_unknown_info_6_info typedef struct sam_unknown_info_7_info { - uint16 unknown_0; /* 0x0003 */ + uint16 server_role; } SAM_UNK_INFO_7; @@ -580,7 +580,7 @@ typedef struct sam_unknown_info_2_inf UINT64_S seq_num; uint32 unknown_4; /* 0x0000 0001 */ - uint32 unknown_5; /* 0x0000 0003 */ + uint32 server_role; uint32 unknown_6; /* 0x0000 0001 */ uint32 num_domain_usrs; /* number of users in domain */ uint32 num_domain_grps; /* number of domain groups in domain */ diff --git a/source/include/smb.h b/source/include/smb.h index eb7214ecbfe..ff645134109 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -466,6 +466,8 @@ typedef struct #include "smb_acls.h" #include "vfs.h" +struct dptr_struct; + typedef struct connection_struct { struct connection_struct *next, *prev; @@ -475,7 +477,7 @@ typedef struct connection_struct BOOL force_user; BOOL force_group; struct vuid_cache vuid_cache; - void *dirptr; + struct dptr_struct *dirptr; BOOL printer; BOOL ipc; BOOL read_only; /* Attributes for the current user of the share. */ diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index 4fa9ffa5ace..b1ac617f5cf 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -178,8 +178,6 @@ /* this is how errors are generated */ #define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,__FILE__) -#define SMB_ROUNDUP(x,r) ( ((x)%(r)) ? ( (((x)+(r))/(r))*(r) ) : (x)) - /* Extra macros added by Ying Chen at IBM - speed increase by inlining. */ #define smb_buf(buf) (((char *)(buf)) + smb_size + CVAL(buf,smb_wct)*2) #define smb_buflen(buf) (SVAL(buf,smb_vwv0 + (int)CVAL(buf, smb_wct)*2)) diff --git a/source/include/smbldap.h b/source/include/smbldap.h index adb51430dc6..d005104dea4 100644 --- a/source/include/smbldap.h +++ b/source/include/smbldap.h @@ -120,8 +120,8 @@ extern ATTRIB_MAP_ENTRY sidmap_attr_list[]; have to worry about LDAP structure types */ const char* get_attr_key2string( ATTRIB_MAP_ENTRY table[], int key ); -char** get_attr_list( ATTRIB_MAP_ENTRY table[] ); -void free_attr_list( char **list ); +const char** get_attr_list( ATTRIB_MAP_ENTRY table[] ); +void free_attr_list( const char **list ); void smbldap_set_mod (LDAPMod *** modlist, int modop, const char *attribute, const char *value); void smbldap_make_mod(LDAP *ldap_struct, LDAPMessage *existing, LDAPMod ***mods, |