summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-08-05 23:14:05 +0200
committerMichael Adam <obnox@samba.org>2008-08-05 23:44:00 +0200
commit4c5752d40f3854276a4643d834c0cdab8779d43c (patch)
tree163c41408534c3f6a7a57e1159aba887615f873d /testsuite
parent149e1ae25ab78754532f3005ab7885e826d53104 (diff)
downloadsamba-4c5752d40f3854276a4643d834c0cdab8779d43c.tar.gz
samba-4c5752d40f3854276a4643d834c0cdab8779d43c.tar.bz2
samba-4c5752d40f3854276a4643d834c0cdab8779d43c.zip
secrets: fix replacemend random seed generator (security issue).
This is a regression introduced by the change to dbwrap. The replacement dbwrap_change_int32_atomic() does not correctly mimic the behaviour of tdb_change_int32_atomic(): The intended behaviour is to use *oldval as an initial value when the entry does not yet exist in the db and to return the old value in *oldval. The effect was that: 1. get_rand_seed() always returns sys_getpid() in *new_seed instead of the incremented seed from the secrets.tdb. 2. the seed stored in the tdb is always starting at 0 instead of sys_getpid() + 1 and incremented in subsequent calls. In principle this is a security issue, but i think the danger is low, since this is only used as a fallback when there is no useable /dev/urandom, and this is at most called on startup or via reinit_after_fork. Michael (This used to be commit bfc5d34a196f667276ce1e173821db478d01258b)
Diffstat (limited to 'testsuite')
0 files changed, 0 insertions, 0 deletions