]> granicus.if.org Git - shadow/commit
Clear passwords on __gr_dup/__pw_dup errors.
authorTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 11 Jul 2015 11:00:13 +0000 (13:00 +0200)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Sat, 11 Jul 2015 11:00:13 +0000 (13:00 +0200)
commitdf5dafe049aa26e8834d83dd6274b28dc32a217c
treecf2d1815addae19a07cfa17534a5a2f9d043215c
parent3c32fd4a29846a713554d27c3fb05f68408da2ab
Clear passwords on __gr_dup/__pw_dup errors.

The functions __gr_dup and __pw_dup do not explicitly zero the
memory which hold the passwords after free. The gr_free and pw_free
functions do this explicitly.

To guarantee same behaviour, it's possible to call these *_free
functions directly from __*_dup, because the memory is initialized
with zeros at the beginning. Calling free(NULL) has no negative
effect and can be considered safe these days.
lib/groupmem.c
lib/pwmem.c