Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(RHEL-23313) Fix parsing of statetab files when it contains space characters #472

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions usr/libexec/readonly-root
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ if is_true "$READONLY" || is_true "$TEMPORARY_STATE"; then

for file in /etc/rwtab /etc/rwtab.d/* /run/initramfs/rwtab ; do
is_ignored_file "$file" && continue
[ -f $file ] && while read type path ; do
[ -f $file ] && while read -r type path ; do
case "$type" in
empty)
cp_empty $path
Expand Down Expand Up @@ -184,17 +184,17 @@ if is_true "$READONLY" || is_true "$TEMPORARY_STATE"; then
mount -n --bind $bindmountopts "$STATE_MOUNT/$file" "$file"
fi

for path in $(grep -v "^#" "$file" 2>/dev/null); do
while read -r path ; do
mount_state "$path"
selinux_fixup "$path"
done
done < <(grep -v "^#" "$file" 2>/dev/null)
done

if [ -f "$STATE_MOUNT/files" ] ; then
for path in $(grep -v "^#" "$STATE_MOUNT/files" 2>/dev/null); do
while read -r path ; do
mount_state "$path"
selinux_fixup "$path"
done
done < <(grep -v "^#" "$STATE_MOUNT/files" 2>/dev/null)
fi
fi

Expand Down
Loading