mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
bug #670: let the user disable fs copy to context ISO
This commit is contained in:
1 parent
3df0c6dadc
commit
291da9962c
3 files changed
+24
-5
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user