diff options
author | Philipp Gesang <philipp.gesang@intra2net.com> | 2018-10-04 09:25:14 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-10-19 13:59:04 +0200 |
commit | e310ad7e1ebabfb6d5f1a3cfd096da6cfe4a286c (patch) | |
tree | 79f97568a3521cbe82b682cb94b9bedcc0e988ac /source3/nmbd/nmbd.c | |
parent | 7b59cd74f9f75d85b91c6ca517d0243e7f6bd2e1 (diff) | |
download | samba-e310ad7e1ebabfb6d5f1a3cfd096da6cfe4a286c.tar.gz |
s3:secrets: clean up sid before storing
SIDs may contain non-zero memory beyond SubAuthorityCount:
{
key(15) = "SECRETS/SID/FOO"
data(68) = "\01\04\00\00\00\00\00\05\15\00\00\00}u@\8C\08\A3\06nx\95\16\FE\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00`F\92\B7\03\00\00\00\18e\92\B7\03\00\00\00@H\92\B7\00\00\00\00"
}
These parts are lost when converting to ``string format syntax``
so a roundtrip conversion does not result in the same binary
representation.
Ensure that these never reach the tdb by using an initialized
copy. This allows bitwise comparisons of secrets.tdb after
dumping SIDs as text and reading them back.
Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Oct 19 13:59:04 CEST 2018 on sn-devel-144
Diffstat (limited to 'source3/nmbd/nmbd.c')
0 files changed, 0 insertions, 0 deletions