HomeFreeBSD

Patch createdb script to avoid race condition / file tampering

Description

Patch createdb script to avoid race condition / file tampering

During the initialization net/rtg uses the /tmp/mysql.sql
and /tmp/rtg.sql to store the SQL commands executed in the
database with special user privileges.

Using well known files can lead to a race condition between
two process who uses the same file names and allow file
tampering by a malicious user.

This fix uses mktemp command to create temporary files
in a safe way

PR: 238262
Submitted by: rodrigo
Approved by: freebsd-ports@dan.me.uk (maintainer timeout)
MFH: 2019Q3

Details

Provenance
rodrigoAuthored on
Parents
rP507218: - Update to 2.27.0
Branches
Unknown
Tags
Unknown