1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-30 19:42:05 +03:00

s3-idmap: only include idmap headers where needed.

Guenther
This commit is contained in:
Günther Deschner
2010-08-18 18:13:42 +02:00
parent 3ef531ec34
commit 2b41f421fd
33 changed files with 80 additions and 51 deletions

View File

@ -30,6 +30,8 @@
#define SMB_IDMAP_INTERFACE_VERSION 5
#include "librpc/gen_ndr/idmap.h"
struct idmap_domain {
const char *name;
struct idmap_methods *methods;
@ -60,4 +62,6 @@ struct idmap_methods {
NTSTATUS (*close_fn)(struct idmap_domain *dom);
};
#include "winbindd/idmap_proto.h"
#endif /* _IDMAP_H_ */

View File

@ -653,7 +653,6 @@ struct ntlmssp_state;
#include "auth.h"
#include "ntdomain.h"
#include "librpc/rpc/dcerpc.h"
#include "idmap.h"
#include "client.h"
#include "session.h"

View File

@ -5653,55 +5653,6 @@ NTSTATUS vfs_stat_fsp(files_struct *fsp);
char *stdin_new_passwd( void);
char *get_pass( const char *prompt, bool stdin_get);
/* The following definitions come from winbindd/idmap.c */
bool idmap_is_offline(void);
bool idmap_is_online(void);
NTSTATUS smb_register_idmap(int version, const char *name,
struct idmap_methods *methods);
void idmap_close(void);
NTSTATUS idmap_init_cache(void);
NTSTATUS idmap_allocate_uid(struct unixid *id);
NTSTATUS idmap_allocate_gid(struct unixid *id);
NTSTATUS idmap_backends_unixid_to_sid(const char *domname,
struct id_map *id);
NTSTATUS idmap_backends_sid_to_unixid(const char *domname,
struct id_map *id);
NTSTATUS idmap_new_mapping(const struct dom_sid *psid, enum id_type type,
struct unixid *pxid);
/* The following definitions come from winbindd/idmap_cache.c */
bool idmap_cache_find_sid2uid(const struct dom_sid *sid, uid_t *puid,
bool *expired);
bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired);
void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid);
bool idmap_cache_find_sid2gid(const struct dom_sid *sid, gid_t *pgid,
bool *expired);
bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired);
void idmap_cache_set_sid2gid(const struct dom_sid *sid, gid_t gid);
/* The following definitions come from winbindd/idmap_nss.c */
NTSTATUS idmap_nss_init(void);
/* The following definitions come from winbindd/idmap_passdb.c */
NTSTATUS idmap_passdb_init(void);
/* The following definitions come from winbindd/idmap_tdb.c */
NTSTATUS idmap_tdb_init(void);
/* The following definitions come from winbindd/idmap_util.c */
NTSTATUS idmap_uid_to_sid(const char *domname, struct dom_sid *sid, uid_t uid);
NTSTATUS idmap_gid_to_sid(const char *domname, struct dom_sid *sid, gid_t gid);
NTSTATUS idmap_sid_to_uid(const char *dom_name, struct dom_sid *sid, uid_t *uid);
NTSTATUS idmap_sid_to_gid(const char *domname, struct dom_sid *sid, gid_t *gid);
bool idmap_unix_id_is_in_range(uint32_t id, struct idmap_domain *dom);
/* The following definitions come from winbindd/nss_info.c */

View File

@ -174,7 +174,6 @@ typedef union unid_t {
|LOOKUP_NAME_WKN\
|LOOKUP_NAME_DOMAIN)
#include "librpc/gen_ndr/idmap.h"
#include "librpc/gen_ndr/epmapper.h"
#include "librpc/gen_ndr/dcerpc.h"

View File

@ -18,6 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.*/
#include "includes.h"
#include "idmap_cache.h"
/**
* Find a sid2uid mapping

10
source3/lib/idmap_cache.h Normal file
View File

@ -0,0 +1,10 @@
/* The following definitions come from lib/idmap_cache.c */
bool idmap_cache_find_sid2uid(const struct dom_sid *sid, uid_t *puid,
bool *expired);
bool idmap_cache_find_uid2sid(uid_t uid, struct dom_sid *sid, bool *expired);
void idmap_cache_set_sid2uid(const struct dom_sid *sid, uid_t uid);
bool idmap_cache_find_sid2gid(const struct dom_sid *sid, gid_t *pgid,
bool *expired);
bool idmap_cache_find_gid2sid(gid_t gid, struct dom_sid *sid, bool *expired);
void idmap_cache_set_sid2gid(const struct dom_sid *sid, gid_t gid);

View File

@ -23,6 +23,7 @@
#include "../librpc/gen_ndr/ndr_security.h"
#include "secrets.h"
#include "memcache.h"
#include "idmap_cache.h"
/*****************************************************************
Dissect a user-provided name into domain, name, sid and type.

View File

@ -46,6 +46,7 @@
#include "includes.h"
#include "../libcli/auth/libcli_auth.h"
#include "secrets.h"
#include "idmap_cache.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB

View File

@ -21,6 +21,7 @@
#include "includes.h"
#include "utils/net.h"
#include "secrets.h"
#include "idmap.h"
#define ALLOC_CHECK(mem) do { \
if (!mem) { \

View File

@ -22,6 +22,7 @@
#include "includes.h"
#include "winbindd.h"
#include "idmap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -32,6 +32,7 @@
#include "libads/ldap_schema.h"
#include "nss_info.h"
#include "secrets.h"
#include "idmap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "ads.h"
#include "idmap.h"
#include "idmap_adex.h"
#include "../libds/common/flags.h"

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "ads.h"
#include "idmap.h"
#include "idmap_adex.h"
#undef DBGC_CLASS

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "ads.h"
#include "idmap.h"
#include "idmap_adex.h"
#include "libads/cldap.h"

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "ads.h"
#include "idmap.h"
#include "idmap_adex.h"
#include "nss_info.h"
#include "secrets.h"

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "ads.h"
#include "idmap.h"
#include "idmap_adex.h"
#include "secrets.h"

View File

@ -22,6 +22,7 @@
#include "includes.h"
#include "ads.h"
#include "idmap.h"
#include "idmap_adex.h"
#undef DBGC_CLASS

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "winbindd/winbindd.h"
#include "idmap.h"
#include "idmap_hash.h"
#include "ads.h"
#include "nss_info.h"

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "winbindd/winbindd.h"
#include "idmap.h"
#include "idmap_hash.h"
#include <stdio.h>

View File

@ -26,6 +26,7 @@
#include "includes.h"
#include "winbindd.h"
#include "secrets.h"
#include "idmap.h"
#include "idmap_rw.h"
#undef DBGC_CLASS

View File

@ -22,6 +22,7 @@
#include "includes.h"
#include "winbindd.h"
#include "nsswitch/winbind_client.h"
#include "idmap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -20,6 +20,7 @@
*/
#include "includes.h"
#include "idmap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -0,0 +1,36 @@
/* The following definitions come from winbindd/idmap.c */
bool idmap_is_offline(void);
bool idmap_is_online(void);
NTSTATUS smb_register_idmap(int version, const char *name,
struct idmap_methods *methods);
void idmap_close(void);
NTSTATUS idmap_init_cache(void);
NTSTATUS idmap_allocate_uid(struct unixid *id);
NTSTATUS idmap_allocate_gid(struct unixid *id);
NTSTATUS idmap_backends_unixid_to_sid(const char *domname,
struct id_map *id);
NTSTATUS idmap_backends_sid_to_unixid(const char *domname,
struct id_map *id);
NTSTATUS idmap_new_mapping(const struct dom_sid *psid, enum id_type type,
struct unixid *pxid);
/* The following definitions come from winbindd/idmap_nss.c */
NTSTATUS idmap_nss_init(void);
/* The following definitions come from winbindd/idmap_passdb.c */
NTSTATUS idmap_passdb_init(void);
/* The following definitions come from winbindd/idmap_tdb.c */
NTSTATUS idmap_tdb_init(void);
/* The following definitions come from winbindd/idmap_util.c */
NTSTATUS idmap_uid_to_sid(const char *domname, struct dom_sid *sid, uid_t uid);
NTSTATUS idmap_gid_to_sid(const char *domname, struct dom_sid *sid, gid_t gid);
NTSTATUS idmap_sid_to_uid(const char *dom_name, struct dom_sid *sid, uid_t *uid);
NTSTATUS idmap_sid_to_gid(const char *domname, struct dom_sid *sid, gid_t *gid);
bool idmap_unix_id_is_in_range(uint32_t id, struct idmap_domain *dom);

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "winbindd.h"
#include "idmap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -25,6 +25,7 @@
#include "includes.h"
#include "winbindd.h"
#include "idmap.h"
#include "idmap_rw.h"
#undef DBGC_CLASS

View File

@ -33,6 +33,7 @@
#include "includes.h"
#include "winbindd.h"
#include "idmap.h"
#include "idmap_rw.h"
#undef DBGC_CLASS

View File

@ -20,6 +20,8 @@
#include "includes.h"
#include "winbindd.h"
#include "winbindd_proto.h"
#include "idmap.h"
#include "idmap_cache.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP

View File

@ -20,6 +20,8 @@
#include "includes.h"
#include "winbindd.h"
#include "librpc/gen_ndr/cli_wbint.h"
#include "idmap_cache.h"
#include "idmap.h"
struct wb_gid2sid_state {
struct tevent_context *ev;

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "winbindd.h"
#include "librpc/gen_ndr/cli_wbint.h"
#include "idmap_cache.h"
struct wb_sid2gid_state {
struct tevent_context *ev;

View File

@ -20,6 +20,7 @@
#include "includes.h"
#include "winbindd.h"
#include "librpc/gen_ndr/cli_wbint.h"
#include "idmap_cache.h"
struct wb_sid2uid_state {
struct tevent_context *ev;

View File

@ -20,6 +20,8 @@
#include "includes.h"
#include "winbindd.h"
#include "librpc/gen_ndr/cli_wbint.h"
#include "idmap_cache.h"
#include "idmap.h"
struct wb_uid2sid_state {
struct tevent_context *ev;

View File

@ -31,6 +31,7 @@
#include "../librpc/gen_ndr/srv_lsa.h"
#include "../librpc/gen_ndr/srv_samr.h"
#include "secrets.h"
#include "idmap.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND

View File

@ -25,6 +25,7 @@
#include "winbindd/winbindd_proto.h"
#include "librpc/gen_ndr/srv_wbint.h"
#include "../librpc/gen_ndr/cli_netlogon.h"
#include "idmap.h"
void _wbint_Ping(struct pipes_struct *p, struct wbint_Ping *r)
{