1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

certctl(8): realpath the file before creating the symlink

Otherwise we end up creating broken relative symlinks in
/etc/ssl/blacklisted.
This commit is contained in:
Kyle Evans 2019-10-03 20:05:46 +00:00
parent c5dac63c15
commit fa0e0c0269
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353066

View File

@ -69,7 +69,7 @@ create_trusted_link()
return 1
fi
[ $VERBOSE -gt 0 ] && echo "Adding $hash.0 to trust store"
[ $NOOP -eq 0 ] && ln -fs "$1" "$CERTDESTDIR/$hash.0"
[ $NOOP -eq 0 ] && ln -fs $(realpath "$1") "$CERTDESTDIR/$hash.0"
}
create_blacklisted()
@ -78,7 +78,7 @@ create_blacklisted()
hash=$( do_hash "$1" ) || return
[ $VERBOSE -gt 0 ] && echo "Adding $hash.0 to blacklist"
[ $NOOP -eq 0 ] && ln -fs "$1" "$BLACKLISTDESTDIR/$hash.0"
[ $NOOP -eq 0 ] && ln -fs $(realpath "$1") "$BLACKLISTDESTDIR/$hash.0"
}
do_scan()