diff options
Diffstat (limited to 'source/include')
-rw-r--r-- | source/include/idmap.h | 10 | ||||
-rw-r--r-- | source/include/includes.h | 7 | ||||
-rw-r--r-- | source/include/smb.h | 8 | ||||
-rw-r--r-- | source/include/smb_macros.h | 24 | ||||
-rw-r--r-- | source/include/smb_share_modes.h | 8 |
5 files changed, 21 insertions, 36 deletions
diff --git a/source/include/idmap.h b/source/include/idmap.h index 80bd541a23f..f4926f1e5c4 100644 --- a/source/include/idmap.h +++ b/source/include/idmap.h @@ -42,16 +42,24 @@ struct idmap_domain { BOOL readonly; void *private_data; struct idmap_methods *methods; + BOOL initialized; + const char *params; }; /* Filled out by IDMAP backends */ struct idmap_methods { /* Called when backend is first loaded */ - NTSTATUS (*init)(struct idmap_domain *dom, const char *compat_params); + NTSTATUS (*init)(struct idmap_domain *dom); + /* Map an array of uids/gids to SIDs. The caller specifies + the uid/gid and type. Gets back the SID. */ NTSTATUS (*unixids_to_sids)(struct idmap_domain *dom, struct id_map **ids); + + /* Map an arry of SIDs to uids/gids. The caller sets the SID + and type and gets back a uid or gid. */ NTSTATUS (*sids_to_unixids)(struct idmap_domain *dom, struct id_map **ids); + NTSTATUS (*set_mapping)(struct idmap_domain *dom, const struct id_map *map); NTSTATUS (*remove_mapping)(struct idmap_domain *dom, const struct id_map *map); diff --git a/source/include/includes.h b/source/include/includes.h index ca8f2ded8cc..14bfc2d6409 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -1191,8 +1191,11 @@ krb5_error_code nt_status_to_krb5(NTSTATUS nt_status); void smb_krb5_free_error(krb5_context context, krb5_error *krberror); krb5_error_code handle_krberror_packet(krb5_context context, krb5_data *packet); -void krb5_get_init_creds_opt_free(krb5_get_init_creds_opt *opt); -krb5_error_code krb5_get_init_creds_opt_alloc(krb5_context context, krb5_get_init_creds_opt **opt); + +void smb_krb5_get_init_creds_opt_free(krb5_context context, + krb5_get_init_creds_opt *opt); +krb5_error_code smb_krb5_get_init_creds_opt_alloc(krb5_context context, + krb5_get_init_creds_opt **opt); krb5_error_code smb_krb5_mk_error(krb5_context context, krb5_error_code error_code, const krb5_principal server, diff --git a/source/include/smb.h b/source/include/smb.h index 2ad3202ef9d..29fb1e133d8 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -286,12 +286,14 @@ typedef struct dom_sid { #define dom_sid28 dom_sid enum id_mapping { - ID_UNKNOWN, + ID_UNKNOWN = 0, ID_MAPPED, - ID_UNMAPPED + ID_UNMAPPED, + ID_EXPIRED }; enum id_type { + ID_TYPE_NOT_SPECIFIED = 0, ID_TYPE_UID, ID_TYPE_GID }; @@ -885,7 +887,7 @@ struct connections_data { int cnum; uid_t uid; gid_t gid; - char name[24]; + char servicename[FSTRING_LEN]; char addr[24]; char machine[FSTRING_LEN]; time_t start; diff --git a/source/include/smb_macros.h b/source/include/smb_macros.h index add7dcd31c2..c433ac2dc43 100644 --- a/source/include/smb_macros.h +++ b/source/include/smb_macros.h @@ -46,25 +46,6 @@ #define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0) #endif -/* zero a structure */ -#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x)) - -/* zero a structure given a pointer to the structure */ -#define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0) - -/* zero a structure given a pointer to the structure - no zero check */ -#define ZERO_STRUCTPN(x) memset((char *)(x), 0, sizeof(*(x))) - -/* zero an array - note that sizeof(array) must work - ie. it must not be a - pointer */ -#define ZERO_ARRAY(x) memset((char *)(x), 0, sizeof(x)) - -/* pointer difference macro */ -#define PTR_DIFF(p1,p2) ((ptrdiff_t)(((const char *)(p1)) - (const char *)(p2))) - -/* work out how many elements there are in a static array */ -#define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) - /* assert macros */ #ifdef DEVELOPER #define SMB_ASSERT(b) ( (b) ? (void)0 : \ @@ -350,11 +331,6 @@ copy an IP address from one buffer to another #else -#define _STRING_LINE_(s) #s -#define _STRING_LINE2_(s) _STRING_LINE_(s) -#define __LINESTR__ _STRING_LINE2_(__LINE__) -#define __location__ __FILE__ ":" __LINESTR__ - #define PRS_ALLOC_MEM(ps, type, count) (type *)prs_alloc_mem((ps),sizeof(type),(count)) #define PRS_ALLOC_MEM_VOID(ps, size) prs_alloc_mem((ps),(size),1) diff --git a/source/include/smb_share_modes.h b/source/include/smb_share_modes.h index 1e04ea496de..5ed43bda336 100644 --- a/source/include/smb_share_modes.h +++ b/source/include/smb_share_modes.h @@ -33,12 +33,8 @@ extern "C" { # endif #endif -#include "tdb.h" - -/* Database context handle. */ -struct smbdb_ctx { - TDB_CONTEXT *smb_tdb; -}; +/* Opaque database context handle. */ +struct smbdb_ctx; /* Share mode entry. */ /* |