From f378f9f144d2b8ccb9c8443f3e605171e60ce3c2 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 22 Mar 2011 16:48:05 +0100 Subject: s3-passdb: add machine_sid.h and lookup_sid.h Guenther --- source3/passdb/lookup_sid.h | 33 +++++++++++++++++++++++++++++++++ source3/passdb/machine_sid.h | 7 +++++++ source3/passdb/proto.h | 40 ---------------------------------------- 3 files changed, 40 insertions(+), 40 deletions(-) create mode 100644 source3/passdb/lookup_sid.h create mode 100644 source3/passdb/machine_sid.h (limited to 'source3/passdb') diff --git a/source3/passdb/lookup_sid.h b/source3/passdb/lookup_sid.h new file mode 100644 index 0000000000..74761d3f6d --- /dev/null +++ b/source3/passdb/lookup_sid.h @@ -0,0 +1,33 @@ + +/* The following definitions come from passdb/lookup_sid.c */ + +bool lookup_name(TALLOC_CTX *mem_ctx, + const char *full_name, int flags, + const char **ret_domain, const char **ret_name, + struct dom_sid *ret_sid, enum lsa_SidType *ret_type); +bool lookup_name_smbconf(TALLOC_CTX *mem_ctx, + const char *full_name, int flags, + const char **ret_domain, const char **ret_name, + struct dom_sid *ret_sid, enum lsa_SidType *ret_type); +NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids, + const struct dom_sid **sids, int level, + struct lsa_dom_info **ret_domains, + struct lsa_name_info **ret_names); +bool lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, + const char **ret_domain, const char **ret_name, + enum lsa_SidType *ret_type); +void store_uid_sid_cache(const struct dom_sid *psid, uid_t uid); +void store_gid_sid_cache(const struct dom_sid *psid, gid_t gid); +void uid_to_sid(struct dom_sid *psid, uid_t uid); +void gid_to_sid(struct dom_sid *psid, gid_t gid); +bool sid_to_uid(const struct dom_sid *psid, uid_t *puid); +bool sid_to_gid(const struct dom_sid *psid, gid_t *pgid); +NTSTATUS get_primary_group_sid(TALLOC_CTX *mem_ctx, + const char *username, + struct passwd **_pwd, + struct dom_sid **_group_sid); +bool delete_uid_cache(uid_t uid); +bool delete_gid_cache(gid_t gid); +bool delete_sid_cache(const struct dom_sid* psid); +void flush_uid_cache(void); +void flush_gid_cache(void); diff --git a/source3/passdb/machine_sid.h b/source3/passdb/machine_sid.h new file mode 100644 index 0000000000..2da281ac34 --- /dev/null +++ b/source3/passdb/machine_sid.h @@ -0,0 +1,7 @@ + +/* The following definitions come from passdb/machine_sid.c */ + +struct dom_sid *get_global_sam_sid(void); +void reset_global_sam_sid(void) ; +bool sid_check_is_domain(const struct dom_sid *sid); +bool sid_check_is_in_our_domain(const struct dom_sid *sid); diff --git a/source3/passdb/proto.h b/source3/passdb/proto.h index 03eab66e97..2f7776b796 100644 --- a/source3/passdb/proto.h +++ b/source3/passdb/proto.h @@ -23,46 +23,6 @@ bool login_cache_write(const struct samu *sampass, const struct login_cache *entry); bool login_cache_delentry(const struct samu *sampass); -/* The following definitions come from passdb/lookup_sid.c */ - -bool lookup_name(TALLOC_CTX *mem_ctx, - const char *full_name, int flags, - const char **ret_domain, const char **ret_name, - struct dom_sid *ret_sid, enum lsa_SidType *ret_type); -bool lookup_name_smbconf(TALLOC_CTX *mem_ctx, - const char *full_name, int flags, - const char **ret_domain, const char **ret_name, - struct dom_sid *ret_sid, enum lsa_SidType *ret_type); -NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids, - const struct dom_sid **sids, int level, - struct lsa_dom_info **ret_domains, - struct lsa_name_info **ret_names); -bool lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, - const char **ret_domain, const char **ret_name, - enum lsa_SidType *ret_type); -void store_uid_sid_cache(const struct dom_sid *psid, uid_t uid); -void store_gid_sid_cache(const struct dom_sid *psid, gid_t gid); -void uid_to_sid(struct dom_sid *psid, uid_t uid); -void gid_to_sid(struct dom_sid *psid, gid_t gid); -bool sid_to_uid(const struct dom_sid *psid, uid_t *puid); -bool sid_to_gid(const struct dom_sid *psid, gid_t *pgid); -NTSTATUS get_primary_group_sid(TALLOC_CTX *mem_ctx, - const char *username, - struct passwd **_pwd, - struct dom_sid **_group_sid); -bool delete_uid_cache(uid_t uid); -bool delete_gid_cache(gid_t gid); -bool delete_sid_cache(const struct dom_sid* psid); -void flush_uid_cache(void); -void flush_gid_cache(void); - -/* The following definitions come from passdb/machine_sid.c */ - -struct dom_sid *get_global_sam_sid(void); -void reset_global_sam_sid(void) ; -bool sid_check_is_domain(const struct dom_sid *sid); -bool sid_check_is_in_our_domain(const struct dom_sid *sid); - /* The following definitions come from passdb/passdb.c */ const char *my_sam_name(void); -- cgit