From 6892a732276a80a648d3e4914ecf9852ab523632 Mon Sep 17 00:00:00 2001 From: Gerard Beekmans Date: Thu, 9 Aug 2001 01:05:51 +0000 Subject: Fixed ed symlink vulnerability git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@949 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/ed-exp.xml | 7 +++++++ chapter06/ed-inst.xml | 7 ++++++- chapter06/ed.xml | 1 + index.xml | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 chapter06/ed-exp.xml diff --git a/chapter06/ed-exp.xml b/chapter06/ed-exp.xml new file mode 100644 index 000000000..345ae6510 --- /dev/null +++ b/chapter06/ed-exp.xml @@ -0,0 +1,7 @@ + +Command explanations + +Insert proper symlink bug explanation here. + + + diff --git a/chapter06/ed-inst.xml b/chapter06/ed-inst.xml index 4e896a9cc..ced1cb48d 100644 --- a/chapter06/ed-inst.xml +++ b/chapter06/ed-inst.xml @@ -3,7 +3,12 @@ Install Ed by running the following commands: -./configure --prefix=/usr && +cp buf.c buf.c-backup && +sed 's/int u/int u, sfd/' buf.c-temp | \ +   sed '/.*\*mktemp.*/d' | \ +   sed 's/.*if (mktemp.*/ sfd = mkstemp(sfn);\ +   if ((sfd == -1) || (sfp = fopen (sfn, "w+")) == NULL)/' > buf.c +./configure --prefix=/usr && make && make install && mv /usr/bin/ed /usr/bin/red /bin diff --git a/chapter06/ed.xml b/chapter06/ed.xml index ede6fc9f6..ff04effc9 100644 --- a/chapter06/ed.xml +++ b/chapter06/ed.xml @@ -5,6 +5,7 @@ Estimated disk space required: &ed-compsize; &c6-ed-inst; +&c6-ed-exp; &aa-ed-desc; diff --git a/index.xml b/index.xml index 4f15d5012..38fd4043f 100644 --- a/index.xml +++ b/index.xml @@ -199,6 +199,7 @@ + -- cgit v1.2.3-54-g00ecf