diff --git a/bin/compose-core b/bin/compose-core index 79822df..9218f7c 100755 --- a/bin/compose-core +++ b/bin/compose-core @@ -3069,9 +3069,11 @@ get_relation_data_file() { new=true fi - if [ "$new" ]; then + if [ -n "$new" ]; then + OLDUMASK=$(umask) + umask 0077 e "$relation_config" > "$relation_data_file" - chmod go-rwx "$relation_data_file" ## protecting this file + umask "$OLDUMASK" e "$relation_config" | md5_compat > "$relation_data_file.md5_ref" fi echo "$relation_data_file"