diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-04-14 08:24:36 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:11:33 -0500 |
commit | 9bf2c694010ae9b2773bfe738a1f88c4b6693e48 (patch) | |
tree | e1040979d65276e88f0f126cf48017bf607c9a0f /source4/auth/gensec | |
parent | 0ab612f69ea273731aedb6766c7a4033f51e1f95 (diff) | |
download | samba-9bf2c694010ae9b2773bfe738a1f88c4b6693e48.tar.gz samba-9bf2c694010ae9b2773bfe738a1f88c4b6693e48.tar.bz2 samba-9bf2c694010ae9b2773bfe738a1f88c4b6693e48.zip |
r6340: - added an easy to use function to initialise a temporary ldb with some ldif
- init the schannel.ldb with some CASE_INSENSITIVE attributes
(This used to be commit e6376b24303dc513e15c7e640c8c1c8d8ca11091)
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r-- | source4/auth/gensec/schannel_state.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/auth/gensec/schannel_state.c b/source4/auth/gensec/schannel_state.c index b2d632a1f0..dea204e622 100644 --- a/source4/auth/gensec/schannel_state.c +++ b/source4/auth/gensec/schannel_state.c @@ -36,17 +36,28 @@ static struct ldb_context *schannel_db_connect(TALLOC_CTX *mem_ctx) { char *path; struct ldb_context *ldb; + BOOL existed; + const char *init_ldif = + "dn: @ATTRIBUTES\n" \ + "computerName: CASE_INSENSITIVE\n" \ + "flatname: CASE_INSENSITIVE\n"; path = smbd_tmp_path(mem_ctx, "schannel.ldb"); if (!path) { return NULL; } + + existed = file_exists(path); ldb = ldb_wrap_connect(mem_ctx, path, 0, NULL); talloc_free(path); if (!ldb) { return NULL; } + + if (!existed) { + gendb_add_ldif(ldb, init_ldif); + } return ldb; } |