Implement security mechanism for [ 1851190 ] Running outdated client can cause data corruption

This commit is contained in:
Carlos Ruiz 2008-02-20 00:38:39 +00:00
parent 760f9d926a
commit 7427acc440
10 changed files with 29 additions and 38 deletions

View File

@ -44,15 +44,17 @@ goto START
:NEXT :NEXT
cd utils
@Rem =================================== @Rem ===================================
@Rem Sign Database Build @Rem Sign Database Build
@Rem =================================== @Rem ===================================
@"%JAVA%" -classpath %CP% -DADEMPIERE_HOME=%ADEMPIERE_HOME% org.adempiere.process.SignDatabaseBuild @Call RUN_SignDatabaseBuild.bat > NUL 2>&1
@Rem =================================== @Rem ===================================
@Rem Setup Adempiere Environment @Rem Setup Adempiere Environment
@Rem =================================== @Rem ===================================
@Call utils\RUN_WinEnv.bat @Call RUN_WinEnv.bat
@Rem =================================== @Rem ===================================
@Rem Run Ant directly @Rem Run Ant directly

View File

@ -28,22 +28,22 @@ ARGS=CONFIG
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.Setup $ARGS $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.Setup $ARGS
# Sign database build
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.adempiere.process.SignDatabaseBuild
#echo =================================== #echo ===================================
#echo Setup Adempiere Server Environment #echo Setup Adempiere Server Environment
#echo =================================== #echo ===================================
#$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME -Dant.home="." org.apache.tools.ant.launch.Launcher setup #$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME -Dant.home="." org.apache.tools.ant.launch.Launcher setup
echo =================================== echo ===================================
echo Make .sh executable & set Env echo Make .sh executable & set Env
echo =================================== echo ===================================
chmod -R a+x *.sh chmod -R a+x *.sh
find . -name '*.sh' -exec chmod a+x '{}' \; find . -name '*.sh' -exec chmod a+x '{}' \;
. utils/RUN_UnixEnv.sh # Sign database build
cd utils
. RUN_SignDatabaseBuild.sh > /dev/null 2>&1
. RUN_UnixEnv.sh
#echo ================================ #echo ================================
#echo Test local Connection #echo Test local Connection

View File

@ -45,15 +45,17 @@ goto START
:NEXT :NEXT
cd utils
@Rem =================================== @Rem ===================================
@Rem Sign Database Build @Rem Sign Database Build
@Rem =================================== @Rem ===================================
@"%JAVA%" -classpath %CP% -DADEMPIERE_HOME=%ADEMPIERE_HOME% org.adempiere.process.SignDatabaseBuild @Call RUN_SignDatabaseBuild.bat > NUL 2>&1
@Rem =================================== @Rem ===================================
@Rem Setup Adempiere Environment @Rem Setup Adempiere Environment
@Rem =================================== @Rem ===================================
@Call utils\RUN_WinEnv.bat @Call RUN_WinEnv.bat
@Echo . @Echo .
@Echo For problems, check log file in base directory @Echo For problems, check log file in base directory

View File

@ -25,16 +25,17 @@ ARGS=CONFIG
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.SilentSetup $ARGS $JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.compiere.install.SilentSetup $ARGS
# Sign database build
$JAVA -classpath $CP -DADEMPIERE_HOME=$ADEMPIERE_HOME org.adempiere.process.SignDatabaseBuild
echo =================================== echo ===================================
echo Make .sh executable & set Env echo Make .sh executable & set Env
echo =================================== echo ===================================
chmod -R a+x *.sh chmod -R a+x *.sh
find . -name '*.sh' -exec chmod a+x '{}' \; find . -name '*.sh' -exec chmod a+x '{}' \;
. utils/RUN_UnixEnv.sh # Sign database build
cd utils
. RUN_SignDatabaseBuild.sh > /dev/null 2>&1
. RUN_UnixEnv.sh
echo . echo .
echo For problems, check log file in base directory echo For problems, check log file in base directory

View File

@ -13,6 +13,6 @@
@Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle) @Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle)
@call %ADEMPIERE_DB_PATH%\DBRestore system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM% @call %ADEMPIERE_DB_PATH%\DBRestore system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM%
@call %ADEMPIERE_HOME%\RUN_SignDatabaseBuild @Call %ADEMPIERE_HOME%\utils\RUN_SignDatabaseBuild.bat > NUL 2>&1
@pause @pause

View File

@ -16,4 +16,4 @@ read in
# globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle) # globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle)
sh $ADEMPIERE_DB_PATH/DBRestore.sh system/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM sh $ADEMPIERE_DB_PATH/DBRestore.sh system/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM
sh $ADEMPIERE_HOME/RUN_SignDatabaseBuild.sh sh $ADEMPIERE_HOME/utils/RUN_SignDatabaseBuild.sh > /dev/null 2>&1

View File

@ -13,6 +13,6 @@
@Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle) @Rem globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres (ignored in oracle)
@call %ADEMPIERE_DB_PATH%\ImportAdempiere system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM% @call %ADEMPIERE_DB_PATH%\ImportAdempiere system/%ADEMPIERE_DB_SYSTEM% %ADEMPIERE_DB_USER% %ADEMPIERE_DB_PASSWORD% %ADEMPIERE_DB_SYSTEM%
@call %ADEMPIERE_HOME%\RUN_SignDatabaseBuild @call %ADEMPIERE_HOME%\utils\RUN_SignDatabaseBuild > NUL 2>&1
@pause @pause

View File

@ -26,4 +26,4 @@ read in
# globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle) # globalqss - cruiz - 2007-10-09 - added fourth parameter for postgres(ignored in oracle)
sh $ADEMPIERE_DB_PATH/ImportAdempiere.sh $SYSUSER/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM sh $ADEMPIERE_DB_PATH/ImportAdempiere.sh $SYSUSER/$ADEMPIERE_DB_SYSTEM $ADEMPIERE_DB_USER $ADEMPIERE_DB_PASSWORD $ADEMPIERE_DB_SYSTEM
sh $ADEMPIERE_HOME/RUN_SignDatabaseBuild.sh sh $ADEMPIERE_HOME/utils/RUN_SignDatabaseBuild.sh > /dev/null 2>&1

View File

@ -2,21 +2,10 @@
@Rem $Header: /cvsroot/adempiere/install/Adempiere/RUN_setup.bat,v 1.19 2005/09/08 21:54:12 jjanke Exp $ @Rem $Header: /cvsroot/adempiere/install/Adempiere/RUN_setup.bat,v 1.19 2005/09/08 21:54:12 jjanke Exp $
@Echo off @Echo off
@if (%ADEMPIERE_HOME%) == () (CALL myEnvironment.bat) else (CALL %ADEMPIERE_HOME%\utils\myEnvironment.bat)
@if not "%JAVA_HOME%" == "" goto JAVA_HOME_OK
@Set JAVA=java
@Echo JAVA_HOME is not set.
@Echo You may not be able to start the required Setup window !!
@Echo Set JAVA_HOME to the directory of your local 1.5 JDK.
@Echo If you experience problems, run utils/WinEnv.js
@Echo Example: cscript utils\WinEnv.js C:\Adempiere "C:\Program Files\Java\jdk1.5.0_04"
goto START
:JAVA_HOME_OK
@Set JAVA=%JAVA_HOME%\bin\java @Set JAVA=%JAVA_HOME%\bin\java
:START
@Echo ======================================= @Echo =======================================
@Echo Sign Database Build @Echo Sign Database Build
@Echo ======================================= @Echo =======================================

View File

@ -3,15 +3,12 @@
echo Install Adempiere Server echo Install Adempiere Server
# $Header: /cvsroot/adempiere/install/Adempiere/RUN_setup.sh,v 1.19 2005/09/08 21:54:12 jjanke Exp $ # $Header: /cvsroot/adempiere/install/Adempiere/RUN_setup.sh,v 1.19 2005/09/08 21:54:12 jjanke Exp $
if [ $JAVA_HOME ]; then if [ $ADEMPIERE_HOME ]; then
JAVA=$JAVA_HOME/bin/java cd $ADEMPIERE_HOME/utils
else
JAVA=java
echo JAVA_HOME is not set.
echo You may not be able to start the Setup
echo Set JAVA_HOME to the directory of your local JDK.
fi fi
. ./myEnvironment.sh Server
JAVA=$JAVA_HOME/bin/java
echo =================================== echo ===================================
echo Sign Database Build echo Sign Database Build