2 Unix SMB/Netbios implementation.
5 Winbind daemon for ntdom nss module
7 Copyright (C) Tim Potter 2000
9 This library is free software; you can redistribute it and/or
10 modify it under the terms of the GNU Library General Public
11 License as published by the Free Software Foundation; either
12 version 2 of the License, or (at your option) any later version.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.
19 You should have received a copy of the GNU Library General Public
20 License along with this library; if not, write to the
21 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 Boston, MA 02111-1307, USA.
31 #include "winbindd_nss.h"
33 /* Naughty global stuff */
35 extern int DEBUGLEVEL;
37 /* Client state structure */
39 struct winbindd_cli_state {
40 struct winbindd_cli_state *prev, *next; /* Linked list pointers */
41 int sock; /* Open socket from client */
42 pid_t pid; /* pid of client */
43 int read_buf_len, write_buf_len; /* Indexes in request/response */
44 BOOL finished; /* Can delete from list */
45 BOOL write_extra_data; /* Write extra_data field */
46 struct winbindd_request request; /* Request from client */
47 struct winbindd_response response; /* Respose to client */
48 struct getent_state *getpwent_state; /* State for getpwent() */
49 struct getent_state *getgrent_state; /* State for getgrent() */
53 struct getent_state *prev, *next;
54 struct acct_info *sam_entries;
55 uint32 sam_entry_index, num_sam_entries;
56 struct winbindd_domain *domain;
60 /* Server state structure */
62 struct winbindd_state {
63 /* Netbios name of PDC */
66 /* User and group id pool */
67 uid_t uid_low, uid_high; /* Range of uids to allocate */
68 gid_t gid_low, gid_high; /* Range of gids to allocate */
70 /* Cached handle to lsa pipe */
71 POLICY_HND lsa_handle;
73 BOOL pwdb_initialised;
76 extern struct winbindd_state server_state; /* Server information */
78 /* Structures to hold per domain information */
80 struct winbindd_domain {
82 /* Domain information */
84 fstring name; /* Domain name */
85 fstring controller; /* NetBIOS name of DC */
87 DOM_SID sid; /* SID for this domain */
88 BOOL got_domain_info; /* Got controller and sid */
90 /* Cached handles to samr pipe */
91 POLICY_HND sam_handle, sam_dom_handle;
92 BOOL sam_handle_open, sam_dom_handle_open;
94 struct winbindd_domain *prev, *next; /* Linked list info */
97 extern struct winbindd_domain *domain_list; /* List of domains we know */
99 #include "winbindd_proto.h"
101 #include "rpc_parse.h"
103 #define WINBINDD_ESTABLISH_LOOP 30
104 #define DOM_SEQUENCE_NONE ((uint32)-1)
106 #endif /* _WINBINDD_H */