[RPL/2] Error in half-compilation

DEMAINE Benoit-Pierre benoit at demaine.info
Mer 20 Juin 01:04:38 CEST 2007


BERTRAND Joël wrote:
> 	For pre8w, I suspect a bug in Gentoo build process. I don't have any 
> gentoo box, only debian/sparc and Solaris/sparc. It was a security issue 
> (code injection) in RPL/2. If you install RPL/2 in /usr and your PATH is 
> define as /usr/local/bin:/usr/bin, and a user can write on 
> /usr/local/bin, this user can write its own rplpp (RPL/2 preprocessor). 
> He can put it in /usr/local/bin, and if a root cron job (for example) 
> starts a RPL/2 routine, this user can obtain root privileges.
> 
> 	Thus, path of rplpp is hard coded and defined by d_exec_path. It should 
> be /usr/local/bin or /usr/bin, not 
> /var/tmp/portage/doublehp/rpl2-4.0.0.8.0.23/image//usr.
> 

>>  gcc -DHAVE_CONFIG_H -Dd_version_rpl=\"4.00pre8w\" -Dd_exec_path=\"/var/tmp/portage/doublehp/rpl2-4.0.0.8.0.23/image//usr\" -DMOTIF_SUPPORT -UPOSTSCRIPT_SUPPORT -DGNUPLOT_SUPPORT -DVIM_SUPPORT -UMYSQL_SUPPORT -UEXPERIMENTAL_CODE "-Dd_date_rpl=\"Monday 18/06/07, 23:41:54 CEST\"" "-Dd_date_en_rpl=\"Monday 06/18/07, 23:41:54 CEST\"" -g -I. -I../../src -I.. -I../../src -I.. -I../../tools/readline-5.2 -I../tools/readline-5.2 -DREADLINE_LIBRARY -I../tools/gsl-1.9 -O2 -march=athlon-mp -pipe -mmmx -msse -m3dnow -malign-double -mieee-fp -Wall -O6 -funsigned-char -Wno-pointer-sign -MT librpl_la-algebre_lineaire1.conv.lo -MD -MP -MF .deps/librpl_la-algebre_lineaire1.conv.Tpo -c algebre_lineaire1.conv.c -o librpl_la-algebre_lineaire1.conv.o >/dev/null 2>&1
> 

Updated to "new" pre8w:

dhp at moon_gen_2:/tmp/rpl-4.00pre8s/build$ cat 
/var/log/portage/doublehp\:rpl2-4.0.0.8.0.23\:20070619-215321.log |grep 
d_exec_path |tail -n1
if gcc -DHAVE_CONFIG_H -Dd_version_rpl=\"4.00pre8w\" 
-Dd_exec_path=\"/usr\" -DFORCE_GNUPLOT_PATH -DMOTIF_SUPPORT 
-UPOSTSCRIPT_SUPPORT -DGNUPLOT_SUPPORT -DVIM_SUPPORT -UMYSQL_SUPPORT 
-UEXPERIMENTAL_CODE -Dd_date_rpl="\"Wednesday 20/06/07, 00:47:52 CEST\"" 
-Dd_date_en_rpl="\"Wednesday 06/20/07, 00:47:52 CEST\"" -g -I. 
-I../../src -I.. -I../../src -I.. -I../../tools/readline-5.2 
-I../tools/readline-5.2 -DREADLINE_LIBRARY  -I../tools/gsl-1.9     -O2 
-march=athlon-mp -pipe -mmmx -msse -m3dnow -malign-double -mieee-fp 
-Wall -O6 -funsigned-char                     -Wno-pointer-sign -MT 
rpl-rpl.conv.o -MD -MP -MF ".deps/rpl-rpl.conv.Tpo" -c -o rpl-rpl.conv.o 
`test -f 'rpl.conv.c' || echo '../../src/'`rpl.conv.c; \
dhp at moon_gen_2:/tmp/rpl-4.00pre8s/build$ rpl -i
+++RPL/2 version 4.00pre8w (Wednesday 06/20/07, 00:47:52 CEST)
+++Copyright (C) 1989 to 2006, 2007 BERTRAND Joël

+++This is a free software with absolutely no warranty.
+++For details, type 'warranty'.

shell-init: error retrieving current directory: getcwd: cannot access 
parent directories: No such file or directory
+++1 2 +

1: 3
+++abort
dhp at moon_gen_2:/tmp/rpl-4.00pre8s/build$

So, for me: compiles and run. I compiled adding
--enable-final-run-path="/usr"

This is way better for me, since now I can use CLI.

I dont know how to test CONVERT and PLOT.

I will try
--enable-final-run-path="/"
and post again "if it leads to better results" (within 2h); wont if not.

Thanks for quick and efficient patch.

-- 
  >o_/ DEMAINE Benoit-Pierre (aka DoubleHP) http://benoit.demaine.info/
If computing were an exact science, IT engineers would not have work \_o<

"So all that's left, Is the proof that love's not only blind but deaf."
(FAKE TALES OF SAN FRANCISCO, Arctic Monkeys)



Plus d'informations sur la liste de diffusion RPL2