Omaha #3049 - entire data directory cannot be removed because it is mounted

The script does still verify that the variable reference to the data directory is set. Thus, the root
directory could only be removed as a result of malicious intent. A user could intentionally not
set the data directory and remove the verification check or the user could intentionally set the
data directory to the root location.


Former-commit-id: 6df6ea2fe8 [formerly 9787e4f1d8] [formerly 429aec5855] [formerly 429aec5855 [formerly 6a5deba786]] [formerly 604c5a4d10 [formerly 429aec5855 [formerly 6a5deba786] [formerly 604c5a4d10 [formerly efe867dc134027eb7cdf393473476fcc4ec0f6f8]]]]
Former-commit-id: 604c5a4d10
Former-commit-id: e47ba7d5d3fcdd36d4757a37622d3f0be3a9e21d [formerly 6d7ea917ed50ecb988065c87a7a98f7629d02567] [formerly 7b2661ba21 [formerly f767ff98e1]]
Former-commit-id: 7b2661ba21
Former-commit-id: 416e6a376d
This commit is contained in:
Bryan Kowal 2014-08-13 16:59:26 -05:00
parent 52175d95ec
commit 7d5b15461a

View file

@ -162,16 +162,10 @@ do
done
# purge the existing data directory
if [ -d ${AWIPS2_DATA_DIRECTORY} ]; then
rm -rf ${AWIPS2_DATA_DIRECTORY}
if [ $? -ne 0 ]; then
exit 1
fi
fi
mkdir ${AWIPS2_DATA_DIRECTORY}
rm -rf ${AWIPS2_DATA_DIRECTORY}/*
if [ $? -ne 0 ]; then
exit 1
fi
exit 1
fi
init_db