git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
890e771
)
s4-samdb: make sure the static credentials are never freed
author
Andrew Tridgell
<tridge@samba.org>
Fri, 23 Oct 2009 03:54:07 +0000
(14:54 +1100)
committer
Andrew Tridgell
<tridge@samba.org>
Fri, 23 Oct 2009 03:54:07 +0000
(14:54 +1100)
source4/dsdb/samdb/samdb.c
patch
|
blob
|
history
diff --git
a/source4/dsdb/samdb/samdb.c
b/source4/dsdb/samdb/samdb.c
index c56782bb4970711d10a886c2cdfbacf66f9a6abe..70f0409c3d90ff4a759439fb95d642f9358f1408 100644
(file)
--- a/
source4/dsdb/samdb/samdb.c
+++ b/
source4/dsdb/samdb/samdb.c
@@
-72,6
+72,14
@@
char *samdb_relative_path(struct ldb_context *ldb,
return full_name;
}
+/*
+ make sure the static credentials are not freed
+ */
+static int samdb_credentials_destructor(struct cli_credentials *creds)
+{
+ return -1;
+}
+
/*
this returns a static set of system credentials. It is static so
that we always get the same pointer in ldb_wrap_connect()
@@
-104,6
+112,7
@@
struct cli_credentials *samdb_credentials(struct tevent_context *event_ctx,
return NULL;
}
static_credentials = cred;
+ talloc_set_destructor(cred, samdb_credentials_destructor);
return cred;
}