mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 00:14:44 +01:00
parser: equality tests: convert to using sha256sum for the hashes
There is a general industry wide effort to move off of md5 and even sha1 (see recent kernel changes). While in this particular use case it doesn't make a difference (besides slightly lowering the chance of a collision) switch to sha256sum to make sure our code doesn't depend on tools that are deprecated and there is an effort to remove. Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
bf7b80c478
commit
027b508da8
1 changed files with 1 additions and 1 deletions
|
@ -103,7 +103,7 @@ hash_binary_policy()
|
|||
printf %s "$2" | ${APPARMOR_PARSER} --features-file "${_SCRIPTDIR}/features_files/$features_file" ${flags} > "$tmpdir/$1.bin" 2>"$dump"
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ] ; then
|
||||
hash=$(md5sum "${tmpdir}/$1.bin" | cut -d ' ' -f 1)
|
||||
hash=$(sha256sum "${tmpdir}/$1.bin" | cut -d ' ' -f 1)
|
||||
rc=$?
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue