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: 604c5a4d10 [formerly efe867dc134027eb7cdf393473476fcc4ec0f6f8]
Former-commit-id: 6a5deba786
This commit is contained in:
Bryan Kowal 2014-08-13 16:59:26 -05:00
parent 3d68ae0c78
commit 429aec5855

View file

@ -162,15 +162,9 @@ 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
exit 1
fi
init_db