This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _PASSDB_H
struct samr_displayentry *cache;
uint32 num_entries;
ssize_t cache_size;
- BOOL search_ended;
+ bool search_ended;
void *private_data;
- BOOL (*next_entry)(struct pdb_search *search,
+ bool (*next_entry)(struct pdb_search *search,
struct samr_displayentry *entry);
void (*search_end)(struct pdb_search *search);
};
* samr_lookup_rids twice. It was done in the srv_samr_nt.c code as well as in
* the pdb module. Remove the latter, this might happen more often. VL.
* changed to version 14 to move lookup_rids and lookup_names to return
- * enum SID_NAME_USE rather than uint32.
+ * enum lsa_SidType rather than uint32.
+ * Changed to 16 for access to the trusted domain passwords (obnox).
*/
-#define PASSDB_INTERFACE_VERSION 14
+#define PASSDB_INTERFACE_VERSION 16
struct pdb_methods
{
const char *name; /* What name got this module */
- NTSTATUS (*setsampwent)(struct pdb_methods *, BOOL update, uint32 acb_mask);
+ NTSTATUS (*setsampwent)(struct pdb_methods *, bool update, uint32 acb_mask);
void (*endsampwent)(struct pdb_methods *);
NTSTATUS (*rename_sam_account)(struct pdb_methods *, struct samu *oldname, const char *newname);
- NTSTATUS (*update_login_attempts)(struct pdb_methods *methods, struct samu *sam_acct, BOOL success);
+ NTSTATUS (*update_login_attempts)(struct pdb_methods *methods, struct samu *sam_acct, bool success);
NTSTATUS (*getgrsid)(struct pdb_methods *methods, GROUP_MAP *map, DOM_SID sid);
DOM_SID sid);
NTSTATUS (*enum_group_mapping)(struct pdb_methods *methods,
- const DOM_SID *sid, enum SID_NAME_USE sid_name_use,
+ const DOM_SID *sid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap, size_t *p_num_entries,
- BOOL unix_only);
+ bool unix_only);
NTSTATUS (*enum_group_members)(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
TALLOC_CTX *mem_ctx,
uint32 group_rid, uint32 member_rid);
- NTSTATUS (*find_alias)(struct pdb_methods *methods,
- const char *name, DOM_SID *sid);
-
NTSTATUS (*create_alias)(struct pdb_methods *methods,
const char *name, uint32 *rid);
int num_rids,
uint32 *rids,
const char **pp_names,
- enum SID_NAME_USE *attrs);
+ enum lsa_SidType *attrs);
NTSTATUS (*lookup_names)(struct pdb_methods *methods,
const DOM_SID *domain_sid,
int num_names,
const char **pp_names,
uint32 *rids,
- enum SID_NAME_USE *attrs);
+ enum lsa_SidType *attrs);
NTSTATUS (*get_account_policy)(struct pdb_methods *methods,
int policy_index, uint32 *value);
NTSTATUS (*get_seq_num)(struct pdb_methods *methods, time_t *seq_num);
- BOOL (*search_users)(struct pdb_methods *methods,
+ bool (*search_users)(struct pdb_methods *methods,
struct pdb_search *search,
uint32 acct_flags);
- BOOL (*search_groups)(struct pdb_methods *methods,
+ bool (*search_groups)(struct pdb_methods *methods,
struct pdb_search *search);
- BOOL (*search_aliases)(struct pdb_methods *methods,
+ bool (*search_aliases)(struct pdb_methods *methods,
struct pdb_search *search,
const DOM_SID *sid);
- BOOL (*uid_to_rid)(struct pdb_methods *methods, uid_t uid,
+ bool (*uid_to_rid)(struct pdb_methods *methods, uid_t uid,
uint32 *rid);
- BOOL (*gid_to_sid)(struct pdb_methods *methods, gid_t gid,
+ bool (*uid_to_sid)(struct pdb_methods *methods, uid_t uid,
DOM_SID *sid);
- BOOL (*sid_to_id)(struct pdb_methods *methods, const DOM_SID *sid,
- union unid_t *id, enum SID_NAME_USE *type);
-
- BOOL (*rid_algorithm)(struct pdb_methods *methods);
- BOOL (*new_rid)(struct pdb_methods *methods, uint32 *rid);
+ bool (*gid_to_sid)(struct pdb_methods *methods, gid_t gid,
+ DOM_SID *sid);
+ bool (*sid_to_id)(struct pdb_methods *methods, const DOM_SID *sid,
+ union unid_t *id, enum lsa_SidType *type);
+
+ bool (*rid_algorithm)(struct pdb_methods *methods);
+ bool (*new_rid)(struct pdb_methods *methods, uint32 *rid);
+
+
+ bool (*get_trusteddom_pw)(struct pdb_methods *methods,
+ const char *domain, char** pwd,
+ DOM_SID *sid, time_t *pass_last_set_time);
+ bool (*set_trusteddom_pw)(struct pdb_methods *methods,
+ const char* domain, const char* pwd,
+ const DOM_SID *sid);
+ bool (*del_trusteddom_pw)(struct pdb_methods *methods,
+ const char *domain);
+ NTSTATUS (*enum_trusteddoms)(struct pdb_methods *methods,
+ TALLOC_CTX *mem_ctx, uint32 *num_domains,
+ struct trustdom_info ***domains);
void *private_data; /* Private data of some kind */