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

This commit is contained in:
Javi Fontan committed 2011-09-28 11:43:59 +02:00
1 parent 3df0c6dadc
commit 291da9962c
3 files changed
+24 -5

No files matched your search

+8 -1
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
+8 -2
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
+8 -2
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