[BLFS Trac] #2179: Update to ed(1) patch via Gentoo

BLFS Trac trac at linuxfromscratch.org
Tue Oct 10 08:55:44 PDT 2006

#2179: Update to ed(1) patch via Gentoo
 Reporter:  Tyler Berry  |       Owner:  blfs-book at linuxfromscratch.org
     Type:  defect       |      Status:  new                           
 Priority:  normal       |   Milestone:  6.2                           
Component:  BOOK         |     Version:  SVN                           
 Severity:  normal       |    Keywords:                                
 The patch LFS uses to replace an insecure mktemp(3) call in ed with
 mkstemp(3) was adopted by Gentoo, who after some poking at it managed to
 get it to produce broken output files.

 Short version: mkstemp returns an open file descriptor. ed wants a FILE *,
 so the LFS patch calls fopen(3) on the filename; this re-opens the file
 and the previous open due to the mkstemp is never closed. The attached
 patch, which replaces LFS's current patch, uses fdopen(3) instead to
 convert the open file descriptor to a FILE *.

Ticket URL: <http://wiki.linuxfromscratch.org/blfs/ticket/2179>
BLFS Trac <http://wiki.linuxfromscratch.org/blfs>
Beyond Linux From Scratch

More information about the blfs-book mailing list