source: trunk/server/source4/param/secrets.h@ 918

Last change on this file since 918 was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 2.2 KB
Line 
1/*
2 * Unix SMB/CIFS implementation.
3 * secrets.tdb file format info
4 * Copyright (C) Andrew Tridgell 2000
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 3 of the License, or (at your
9 * option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef _SECRETS_H
21#define _SECRETS_H
22
23#define SECRETS_PRIMARY_DOMAIN_DN "cn=Primary Domains"
24#define SECRETS_PRINCIPALS_DN "cn=Principals"
25#define SECRETS_PRIMARY_DOMAIN_FILTER "(&(flatname=%s)(objectclass=primaryDomain))"
26#define SECRETS_PRIMARY_REALM_FILTER "(&(realm=%s)(objectclass=primaryDomain))"
27#define SECRETS_KRBTGT_SEARCH "(&((|(realm=%s)(flatname=%s))(samAccountName=krbtgt)))"
28#define SECRETS_PRINCIPAL_SEARCH "(&(|(realm=%s)(flatname=%s))(servicePrincipalName=%s))"
29#define SECRETS_LDAP_FILTER "(&(objectclass=ldapSecret)(cn=SAMDB Credentials))"
30
31/**
32 * Use a TDB to store an incrementing random seed.
33 *
34 * Initialised to the current pid, the very first time Samba starts,
35 * and incremented by one each time it is needed.
36 *
37 * @note Not called by systems with a working /dev/urandom.
38 */
39struct loadparm_context;
40struct tevent_context;
41struct ldb_message;
42struct ldb_context;
43
44#include "librpc/gen_ndr/misc.h"
45
46struct tdb_wrap *secrets_init(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
47struct ldb_context *secrets_db_connect(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx);
48struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
49 struct loadparm_context *lp_ctx,
50 const char *domain,
51 enum netr_SchannelType *sec_channel_type,
52 char **errstring);
53char *keytab_name_from_msg(TALLOC_CTX *mem_ctx, struct ldb_context *ldb, struct ldb_message *msg);
54
55
56#endif /* _SECRETS_H */
Note: See TracBrowser for help on using the repository browser.