1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #670: let the user disable fs copy to context ISO

(cherry picked from commit 291da9962c726e94dad9505606028fa09ca762d5)
This commit is contained in:
Javi Fontan 2011-09-28 11:43:59 +02:00
parent 533539c93b
commit 17509ee003
3 changed files with 24 additions and 5 deletions

View File

@ -16,6 +16,8 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
CONTEXT_FILE=$1
while (( "$#" )); do
if [ "$#" == "1" ]; then
DST=$1
@ -56,7 +58,12 @@ for f in $SRC; do
;;
*)
exec_and_log "cp -R $f $ISO_DIR"
if [ $SECURE_CONTEXT -eq 0 -o "$f" == "$CONTEXT_FILE" ]; then
exec_and_log "cp -R $f $ISO_DIR" \
"Error copying $f to $ISO_DIR"
else
log "not copying potentialy dangerous file $f"
fi
;;
esac
done

View File

@ -16,6 +16,8 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
CONTEXT_FILE=$1
while (( "$#" )); do
if [ "$#" == "1" ]; then
DST=$1
@ -53,8 +55,12 @@ for f in $SRC; do
;;
*)
exec_and_log "cp -R $f $ISO_DIR" \
"Error copying $f to $ISO_DIR"
if [ $SECURE_CONTEXT -eq 0 -o "$f" == "$CONTEXT_FILE" ]; then
exec_and_log "cp -R $f $ISO_DIR" \
"Error copying $f to $ISO_DIR"
else
log "not copying potentialy dangerous file $f"
fi
;;
esac
done

View File

@ -16,6 +16,8 @@
# limitations under the License. #
#--------------------------------------------------------------------------- #
CONTEXT_FILE=$1
while (( "$#" )); do
if [ "$#" == "1" ]; then
DST=$1
@ -58,8 +60,12 @@ for f in $SRC; do
;;
*)
exec_and_log "cp -R $f $ISO_DIR" \
"Error copying $f to $ISO_DIR"
if [ $SECURE_CONTEXT -eq 0 -o "$f" == "$CONTEXT_FILE" ]; then
exec_and_log "cp -R $f $ISO_DIR" \
"Error copying $f to $ISO_DIR"
else
log "not copying potentialy dangerous file $f"
fi
;;
esac
done