2 Unix SMB/CIFS implementation.
3 Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 %module(package="samba.misc") misc
24 #include "param/param.h"
25 #include "auth/credentials/credentials.h"
26 #include "dsdb/samdb/samdb.h"
27 #include "lib/ldb-samba/ldif_handlers.h"
28 #include "librpc/ndr/libndr.h"
32 %include "exception.i"
33 %import "../../lib/talloc/talloc.i"
34 %import "../../lib/ldb/ldb.i"
35 %import "../../auth/credentials/credentials.i"
36 %import "../../param/param.i"
37 %import "../../libcli/security/security.i"
38 %import "../../libcli/util/errors.i"
40 %rename(random_password) generate_random_str;
41 char *generate_random_str(TALLOC_CTX *mem_ctx, size_t len);
44 void ldb_set_credentials(struct ldb_context *ldb, struct cli_credentials *creds)
46 ldb_set_opaque(ldb, "credentials", creds);
49 void ldb_set_session_info(struct ldb_context *ldb, struct auth_session_info *session_info)
51 ldb_set_opaque(ldb, "sessionInfo", session_info);
54 void ldb_set_loadparm(struct ldb_context *ldb, struct loadparm_context *lp_ctx)
56 ldb_set_opaque(ldb, "loadparm", lp_ctx);
61 bool samdb_set_domain_sid(struct ldb_context *ldb,
62 const struct dom_sid *dom_sid_in);
64 WERROR dsdb_attach_schema_from_ldif_file(struct ldb_context *ldb, const char *pf, const char *df);
66 %rename(version) samba_version_string;
67 const char *samba_version_string(void);
68 int dsdb_set_global_schema(struct ldb_context *ldb);
69 int ldb_register_samba_handlers(struct ldb_context *ldb);
72 bool dsdb_set_ntds_invocation_id(struct ldb_context *ldb, const char *guid)
74 struct GUID invocation_id_in;
75 if (NT_STATUS_IS_ERR(GUID_from_string(guid, &invocation_id_in))) {
78 return samdb_set_ntds_invocation_id(ldb, &invocation_id_in);
82 char *private_path(TALLOC_CTX* mem_ctx,
83 struct loadparm_context *lp_ctx,