diff options
author | Günther Deschner <gd@samba.org> | 2011-03-22 16:48:05 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-03-30 01:13:08 +0200 |
commit | f378f9f144d2b8ccb9c8443f3e605171e60ce3c2 (patch) | |
tree | 6940ca36324ca4b75b0570c0296aa6994566de70 | |
parent | cd7e088ddf37cb9f516e3a9d94232fa1e91221cd (diff) | |
download | samba-f378f9f144d2b8ccb9c8443f3e605171e60ce3c2.tar.gz samba-f378f9f144d2b8ccb9c8443f3e605171e60ce3c2.tar.bz2 samba-f378f9f144d2b8ccb9c8443f3e605171e60ce3c2.zip |
s3-passdb: add machine_sid.h and lookup_sid.h
Guenther
-rw-r--r-- | source3/include/passdb.h | 2 | ||||
-rw-r--r-- | source3/passdb/lookup_sid.h | 33 | ||||
-rw-r--r-- | source3/passdb/machine_sid.h | 7 | ||||
-rw-r--r-- | source3/passdb/proto.h | 40 |
4 files changed, 42 insertions, 40 deletions
diff --git a/source3/include/passdb.h b/source3/include/passdb.h index b4a14aaacc..3f4d2b91b3 100644 --- a/source3/include/passdb.h +++ b/source3/include/passdb.h @@ -489,5 +489,7 @@ struct pdb_init_function_entry { }; #include "passdb/proto.h" +#include "passdb/machine_sid.h" +#include "passdb/lookup_sid.h" #endif /* _PASSDB_H */ 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); |