mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
r25703: Use less entropy by using the pointer value as a process-unique token.
Andrew Bartlett
This commit is contained in:
parent
ecea817a3e
commit
3480dc71a9
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user