HomeFreeBSD

MFH: r507219

Description

MFH: r507219

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)

Approved by: ports-secteam (miwi@)

Details

Provenance
rodrigoAuthored on
Parents
rP509205: Mark net/kio-gdrive broken
Branches
Unknown
Tags
Unknown