diff options
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/charset.h | 8 | ||||
-rw-r--r-- | source3/include/includes.h | 33 | ||||
-rw-r--r-- | source3/include/mapping.h | 2 | ||||
-rw-r--r-- | source3/include/passdb.h | 10 | ||||
-rw-r--r-- | source3/include/smb.h | 22 |
5 files changed, 50 insertions, 25 deletions
diff --git a/source3/include/charset.h b/source3/include/charset.h index c5d03a62e8..1edf12309a 100644 --- a/source3/include/charset.h +++ b/source3/include/charset.h @@ -20,7 +20,13 @@ */ /* this defines the charset types used in samba */ -typedef enum {CH_UCS2=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4} charset_t; +typedef enum {CH_UCS2=0, CH_UTF16=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, CH_UTF8=4} charset_t; + +/* FIXME!!! Hack job for now to get the lsa ndr code compiling */ +#ifndef strlen_m +#define strlen_m strlen +#endif + #define NUM_CHARSETS 5 diff --git a/source3/include/includes.h b/source3/include/includes.h index ab85c0e75e..635cf3807f 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -66,6 +66,36 @@ #undef HAVE_TERMIOS_H #endif +#ifdef __GNUC__ +/** gcc attribute used on function parameters so that it does not emit + * warnings about them being unused. **/ +# define UNUSED(param) param __attribute__ ((unused)) +#else +# define UNUSED(param) param +/** Feel free to add definitions for other compilers here. */ +#endif + +#ifndef _PUBLIC_ +#ifdef HAVE_VISIBILITY_ATTR +# define _PUBLIC_ __attribute__((visibility("default"))) +#else +# define _PUBLIC_ +#endif +#endif + +#ifndef NORETURN_ATTRIBUTE +#if (__GNUC__ >= 3) +/** Use gcc attribute to check printf fns. a1 is the 1-based index of + * the parameter containing the format, and a2 the index of the first + * argument. Note that some gcc 2.x versions don't handle this + * properly **/ +#define NORETURN_ATTRIBUTE __attribute__ ((noreturn)) +#else +#define NORETURN_ATTRIBUTE +#endif +#endif + + #if (__GNUC__ >= 3 ) && (__GNUC_MINOR__ >= 1 ) /** Use gcc attribute to check printf fns. a1 is the 1-based index of * the parameter containing the format, and a2 the index of the first @@ -1000,9 +1030,6 @@ extern int errno; #include "rpc_client.h" #include "event.h" -#include "librpc/ndr/libndr.h" -#include "librpc/gen_ndr/unixinfo.h" - /* * Type for wide character dirent structure. * Only d_name is defined by POSIX. diff --git a/source3/include/mapping.h b/source3/include/mapping.h index fdaa2b0453..8ba784e98c 100644 --- a/source3/include/mapping.h +++ b/source3/include/mapping.h @@ -26,7 +26,7 @@ typedef struct _GROUP_MAP { struct pdb_methods *methods; gid_t gid; DOM_SID sid; - enum SID_NAME_USE sid_name_use; + enum lsa_SidType sid_name_use; fstring nt_name; fstring comment; } GROUP_MAP; diff --git a/source3/include/passdb.h b/source3/include/passdb.h index 35bb93aa31..9dc6d60eb0 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -241,7 +241,7 @@ struct pdb_search { * samr_lookup_rids twice. It was done in the srv_samr_nt.c code as well as in * the pdb module. Remove the latter, this might happen more often. VL. * changed to version 14 to move lookup_rids and lookup_names to return - * enum SID_NAME_USE rather than uint32. + * enum lsa_SidType rather than uint32. */ #define PASSDB_INTERFACE_VERSION 14 @@ -300,7 +300,7 @@ struct pdb_methods DOM_SID sid); NTSTATUS (*enum_group_mapping)(struct pdb_methods *methods, - const DOM_SID *sid, enum SID_NAME_USE sid_name_use, + const DOM_SID *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap, size_t *p_num_entries, BOOL unix_only); @@ -365,14 +365,14 @@ struct pdb_methods int num_rids, uint32 *rids, const char **pp_names, - enum SID_NAME_USE *attrs); + enum lsa_SidType *attrs); NTSTATUS (*lookup_names)(struct pdb_methods *methods, const DOM_SID *domain_sid, int num_names, const char **pp_names, uint32 *rids, - enum SID_NAME_USE *attrs); + enum lsa_SidType *attrs); NTSTATUS (*get_account_policy)(struct pdb_methods *methods, int policy_index, uint32 *value); @@ -396,7 +396,7 @@ struct pdb_methods BOOL (*gid_to_sid)(struct pdb_methods *methods, gid_t gid, DOM_SID *sid); BOOL (*sid_to_id)(struct pdb_methods *methods, const DOM_SID *sid, - union unid_t *id, enum SID_NAME_USE *type); + union unid_t *id, enum lsa_SidType *type); BOOL (*rid_algorithm)(struct pdb_methods *methods); BOOL (*new_rid)(struct pdb_methods *methods, uint32 *rid); diff --git a/source3/include/smb.h b/source3/include/smb.h index 6bc8680f86..eb8ec93f7e 100644 --- a/source3/include/smb.h +++ b/source3/include/smb.h @@ -248,20 +248,6 @@ typedef uint64_t NTTIME; #define SID_MAX_SIZE ((size_t)(8+(MAXSUBAUTHS*4))) -/* SID Types */ -enum SID_NAME_USE { - SID_NAME_USE_NONE = 0, - SID_NAME_USER = 1, /* user */ - SID_NAME_DOM_GRP, /* domain group */ - SID_NAME_DOMAIN, /* domain sid */ - SID_NAME_ALIAS, /* local group */ - SID_NAME_WKN_GRP, /* well-known group */ - SID_NAME_DELETED, /* deleted account: needed for c2 rating */ - SID_NAME_INVALID, /* invalid account */ - SID_NAME_UNKNOWN, /* unknown sid type */ - SID_NAME_COMPUTER /* sid for a computer */ -}; - #define LOOKUP_NAME_ISOLATED 1 /* Look up unqualified names */ #define LOOKUP_NAME_REMOTE 2 /* Ask others */ #define LOOKUP_NAME_ALL (LOOKUP_NAME_ISOLATED|LOOKUP_NAME_REMOTE) @@ -287,8 +273,14 @@ typedef struct dom_sid { uint32 sub_auths[MAXSUBAUTHS]; } DOM_SID; +#define dom_sid2 dom_sid +#define dom_sid28 dom_sid + #include "librpc/ndr/misc.h" #include "librpc/ndr/security.h" +#include "librpc/ndr/libndr.h" +#include "librpc/gen_ndr/unixinfo.h" +#include "librpc/gen_ndr/lsa.h" struct lsa_dom_info { BOOL valid; @@ -300,7 +292,7 @@ struct lsa_dom_info { struct lsa_name_info { uint32 rid; - enum SID_NAME_USE type; + enum lsa_SidType type; const char *name; int dom_idx; }; |