* Bugs in /usr/sbin/adduser
@ 1994-02-23 16:35 Horst Luehrsen
1994-03-01 13:16 ` Mark Jeffery
1994-03-21 18:37 ` Douglas Jones
0 siblings, 2 replies; 4+ messages in thread
From: Horst Luehrsen @ 1994-02-23 16:35 UTC (permalink / raw)
I was rewriting /usr/sbin/adduser to create a "ypadduser" shell skript and
found two bugs: There are two lines which look like c program comments - but
they are valid shell commands which try to execute files in the root directory:
if read LSHELL
then
/* cin 002 begin */ <--- HERE
if [ ! -f "${LSHELL}" ]
then
LSHELL=`grep "/${LSHELL}$" /etc/shells | tail -1l`
fi
if [ ! -n "${LSHELL}" ]
then
LSHELL="${DEFSHELL}"
fi
/* cin 002 end */ <--- HERE
Anyone who uses the adduser shell scripts should delete this two lines or
change them to comments by adding a "#" at the begin of the line!
Horst
--
Horst Luehrsen <Horst.Luehrsen@Informatik.Uni-Erlangen.DE>
Martensstrasse 3, 91058 Erlangen
Tel: +49-9131-857884 Fax:+49-9131-32090
** Wer Speicher allokiert, schreckt auch vor der **
** Exekution von Programmen nicht zurueck! **
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Bugs in /usr/sbin/adduser
1994-02-23 16:35 Bugs in /usr/sbin/adduser Horst Luehrsen
@ 1994-03-01 13:16 ` Mark Jeffery
1994-03-02 11:30 ` Ulf Kronman
1994-03-21 18:37 ` Douglas Jones
1 sibling, 1 reply; 4+ messages in thread
From: Mark Jeffery @ 1994-03-01 13:16 UTC (permalink / raw)
Imagine if the C style comment had followed an rm command!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Bugs in /usr/sbin/adduser
1994-02-23 16:35 Bugs in /usr/sbin/adduser Horst Luehrsen
1994-03-01 13:16 ` Mark Jeffery
@ 1994-03-21 18:37 ` Douglas Jones
1 sibling, 0 replies; 4+ messages in thread
From: Douglas Jones @ 1994-03-21 18:37 UTC (permalink / raw)
In article <2kg0jlErph@uni-erlangen.de> Horst.Luehrsen@Informatik.Uni-Erlangen.DE writes:
>
>I was rewriting /usr/sbin/adduser to create a "ypadduser" shell skript and
>found two bugs: There are two lines which look like c program comments - but
>they are valid shell commands which try to execute files in the root directory:
>
> if read LSHELL
> then
> /* cin 002 begin */ <--- HERE
> if [ ! -f "${LSHELL}" ]
> then
> LSHELL=`grep "/${LSHELL}$" /etc/shells | tail -1l`
> fi
> if [ ! -n "${LSHELL}" ]
> then
> LSHELL="${DEFSHELL}"
> fi
> /* cin 002 end */ <--- HERE
>
>
>Anyone who uses the adduser shell scripts should delete this two lines or
>change them to comments by adding a "#" at the begin of the line!
>
> Horst
>
>--
> Horst Luehrsen <Horst.Luehrsen@Informatik.Uni-Erlangen.DE>
> Martensstrasse 3, 91058 Erlangen
> Tel: +49-9131-857884 Fax:+49-9131-32090
> ** Wer Speicher allokiert, schreckt auch vor der **
> ** Exekution von Programmen nicht zurueck! **
Actully the following two lines:
> /* cin 002 begin */ <--- HERE
> /* cin 002 end */ <--- HERE
are not valid commands in themselves, but are expanded to commands. They
could have disastrous effects. Like, if the first thing it encountered
in the expansion was a 'rm'. Anyway, GOOD eye Horst on catching these!
Cheers,
Douglas
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1994-03-21 18:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-02-23 16:35 Bugs in /usr/sbin/adduser Horst Luehrsen
1994-03-01 13:16 ` Mark Jeffery
1994-03-02 11:30 ` Ulf Kronman
1994-03-21 18:37 ` Douglas Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox