summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-10-19 05:41:32 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:21 +0100
commite85370e70355ebaa98a8be60a4d4b2f82fc90415 (patch)
tree48cfbc6d9206a65da73f0bc4c0361a488e8fbf88 /source4
parentc4ebf9587f66ce171f0c4778921c358eb5b94da3 (diff)
downloadsamba-e85370e70355ebaa98a8be60a4d4b2f82fc90415.tar.gz
samba-e85370e70355ebaa98a8be60a4d4b2f82fc90415.tar.bz2
samba-e85370e70355ebaa98a8be60a4d4b2f82fc90415.zip
r25703: Use less entropy by using the pointer value as a process-unique token.
Andrew Bartlett (This used to be commit 3480dc71a9f969909b984855d546a1974593368f)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/credentials/credentials_krb5.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/source4/auth/credentials/credentials_krb5.c b/source4/auth/credentials/credentials_krb5.c
index 2b5a5fe7f1..01e405ad65 100644
--- a/source4/auth/credentials/credentials_krb5.c
+++ b/source4/auth/credentials/credentials_krb5.c
@@ -199,22 +199,14 @@ int cli_credentials_set_ccache(struct cli_credentials *cred,
static int cli_credentials_new_ccache(struct cli_credentials *cred, struct ccache_container **_ccc)
{
krb5_error_code ret;
- char *rand_string;
struct ccache_container *ccc = talloc(cred, struct ccache_container);
char *ccache_name;
if (!ccc) {
return ENOMEM;
}
- rand_string = generate_random_str(NULL, 16);
- if (!rand_string) {
- talloc_free(ccc);
- return ENOMEM;
- }
-
- ccache_name = talloc_asprintf(ccc, "MEMORY:%s",
- rand_string);
- talloc_free(rand_string);
+ ccache_name = talloc_asprintf(ccc, "MEMORY:%p",
+ ccc);
if (!ccache_name) {
talloc_free(ccc);