From 3b0a18cd24e3b0ab3020b8d1b5f17d268f0c93c1 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Wed, 26 Sep 2007 17:44:17 +0000 Subject: [PATCH] Make SD session key more random. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5659 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/job.c | 4 +++- bacula/technotes-2.3 | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/bacula/src/stored/job.c b/bacula/src/stored/job.c index 9da68019e9..b97bee6abf 100644 --- a/bacula/src/stored/job.c +++ b/bacula/src/stored/job.c @@ -73,6 +73,7 @@ bool job_cmd(JCR *jcr) { int JobId; char auth_key[100]; + char seed[100]; BSOCK *dir = jcr->dir_bsock; POOL_MEM job_name, client_name, job, fileset_name, fileset_md5; int JobType, level, spool_attributes, no_attributes, spool_data; @@ -134,7 +135,8 @@ bool job_cmd(JCR *jcr) /* * Pass back an authorization key for the File daemon */ - make_session_key(auth_key, NULL, 1); + bsnprintf(seed, sizeof(seed), "%p", jcr); + make_session_key(auth_key, seed, 1); dir->fsend(OKjob, jcr->VolSessionId, jcr->VolSessionTime, auth_key); if (debug_level == 3) { Dmsg2(000, ">dird jid=%u: %s", (uint32_t)jcr->JobId, dir->msg); diff --git a/bacula/technotes-2.3 b/bacula/technotes-2.3 index e10e081db1..ef1cbc35ec 100644 --- a/bacula/technotes-2.3 +++ b/bacula/technotes-2.3 @@ -2,6 +2,7 @@ General: 26Sep07 +kes Make SD session key more random. kes Add retry for SQLite opening db if it fails. kes Suppress extra error messages during batch insert failure. kes Add jcr to timer packets so if killed message can be sent to job. -- 2.39.5