Bug 134060

Summary: Current bind-chroot uses hardcoded /tmp/named path in scriplet
Product: [Fedora] Fedora Reporter: Matthias Saou <matthias>
Component: bindAssignee: Jason Vas Dias <jvdias>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3Keywords: EasyFix
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: bind-9.2.4-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-18 21:04:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 123268    

Description Matthias Saou 2004-09-29 11:06:05 UTC
Description of problem:
The current FC devel bind-chroot uses a hardcoded path of /tmp/named
in its scriplet, which is a predictable name that can lead to security
concerns. Using mktemp instead should be considered.

Version-Release number of selected component (if applicable):
bind-chroot-9.2.4-1

How reproducible:
Always.

Steps to Reproduce:
1. rpm -qp --scripts bind-chroot-9.2.4-1.i386.rpm | grep tmp
  
Actual results:
grep -v '^ROOTDIR='/var/named/chroot /etc/sysconfig/named > /tmp/named
mv -f /tmp/named /etc/sysconfig/named

Expected results:
Seeing something like TMP=$(mktemp /tmp/named.XXXXXX) then using $TMP.

Comment 1 Jason Vas Dias 2004-09-29 13:59:02 UTC
Yes, this is the way bind-chroot always has done sysconfig/named
editing. 
The next version will use mktemp .