Re: [patch] v1.01 of /proc/.config (ready to eat)

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 13 Mar 1999 14:12:42 +0000 (GMT)


> +++ linux-2.2.3-dconfig/scripts/mkdconfig.sh Sat Mar 13 11:51:00 1999
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +
> +tmp1=/tmp/dconfig1_$$
> +tmp2=/tmp/dconfig2_$$

Whoops. Fix that to use mktemp. Think about a user who thoughtfully
symlinks /tmp/dconfig1_whatever to /etc/passwd then you make a kernel
as root. mktemp easily sorts that with.

tmp1=`mktemp -q /tmp/dconfig1_XXXXXX`
tmp2=`mktemp -q /tmp/dconfig2_XXXXXX`

> +rm -f ./kernel/dconfig_buf.c 2> /dev/null
> +cat $tmp1 .config $tmp2 > ./kernel/dconfig_buf.c

(cat $tmp1; sed -e "s/^CONFIG_//" <.config; cat $tmp2) > ./kernel/dconfig_buf.c

(free compression 8))

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/