From a36f9250e7c9446f3eece6d8db29fcbde99256fb Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 7 May 2001 04:32:40 +0000 Subject: Preliminary merge of winbind into HEAD. Note that this compiles and links but I haven't actually run it yet so it probably doesn't work. (-: (This used to be commit 59f95416b66db6df05289bde224de29c721978e5) --- source3/nsswitch/winbindd.h | 64 ++++++++++++++++++++++++++++++++------------- 1 file changed, 46 insertions(+), 18 deletions(-) (limited to 'source3/nsswitch/winbindd.h') diff --git a/source3/nsswitch/winbindd.h b/source3/nsswitch/winbindd.h index d333b32bcf..c848047089 100644 --- a/source3/nsswitch/winbindd.h +++ b/source3/nsswitch/winbindd.h @@ -49,12 +49,23 @@ struct winbindd_cli_state { struct getent_state *getgrent_state; /* State for getgrent() */ }; +/* State between get{pw,gr}ent() calls */ + struct getent_state { - struct getent_state *prev, *next; - struct acct_info *sam_entries; - uint32 sam_entry_index, num_sam_entries; - struct winbindd_domain *domain; - BOOL got_sam_entries; + struct getent_state *prev, *next; + void *sam_entries; + uint32 sam_entry_index, num_sam_entries; + uint32 dispinfo_ndx; + BOOL got_all_sam_entries, got_sam_entries; + struct winbindd_domain *domain; +}; + +/* Storage for cached getpwent() user entries */ + +struct getpwent_user { + fstring name; /* Account name */ + fstring gecos; /* User information */ + uint32 user_rid, group_rid; /* NT user and group rids */ }; /* Server state structure */ @@ -68,7 +79,7 @@ struct winbindd_state { gid_t gid_low, gid_high; /* Range of gids to allocate */ /* Cached handle to lsa pipe */ - POLICY_HND lsa_handle; + CLI_POLICY_HND lsa_handle; BOOL lsa_handle_open; BOOL pwdb_initialised; }; @@ -79,19 +90,21 @@ extern struct winbindd_state server_state; /* Server information */ struct winbindd_domain { - /* Domain information */ - - fstring name; /* Domain name */ - fstring controller; /* NetBIOS name of DC */ - - DOM_SID sid; /* SID for this domain */ - BOOL got_domain_info; /* Got controller and sid */ + /* Domain information */ - /* Cached handles to samr pipe */ - POLICY_HND sam_handle, sam_dom_handle; - BOOL sam_handle_open, sam_dom_handle_open; - - struct winbindd_domain *prev, *next; /* Linked list info */ + fstring name; /* Domain name */ + fstring controller; /* NetBIOS name of DC */ + + DOM_SID sid; /* SID for this domain */ + BOOL got_domain_info; /* Got controller and sid */ + + /* Cached handles to samr pipe */ + + CLI_POLICY_HND sam_handle, sam_dom_handle; + BOOL sam_handle_open, sam_dom_handle_open; + time_t last_check; + + struct winbindd_domain *prev, *next; /* Linked list info */ }; extern struct winbindd_domain *domain_list; /* List of domains we know */ @@ -99,8 +112,23 @@ extern struct winbindd_domain *domain_list; /* List of domains we know */ #include "winbindd_proto.h" #include "rpc_parse.h" +#include "rpc_client.h" #define WINBINDD_ESTABLISH_LOOP 30 #define DOM_SEQUENCE_NONE ((uint32)-1) +/* SETENV */ +#if HAVE_SETENV +#define SETENV(name, value, overwrite) setenv(name,value,overwrite) +#elif HAVE_PUTENV +#define SETENV(name, value, overwrite) \ +{ \ + fstring envvar; \ + slprintf(envvar, sizeof(fstring), "%s=%s", name, value); \ + putenv(envvar); \ +} +#else +#define SETENV(name, value, overwrite) ; +#endif + #endif /* _WINBINDD_H */ -- cgit