mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-25 22:27:34 +00:00
Skip writable check when mounting with "ro" option.
When opening a tomb file with "ro" passed through the -o option, the writability check in is-valid-tomb() is skipped. This allows tomb files to be opened without write permission. test-open-read-only() now succeeds.
This commit is contained in:
parent
f4f8c4e024
commit
70334f58fb
3
tomb
3
tomb
@ -507,7 +507,8 @@ is_valid_tomb() {
|
|||||||
|
|
||||||
_fail=0
|
_fail=0
|
||||||
# Tomb file must be a readable, writable, non-empty regular file.
|
# Tomb file must be a readable, writable, non-empty regular file.
|
||||||
[[ ! -w "$1" ]] && {
|
# If passed the "ro" mount option, the writable check is skipped.
|
||||||
|
[[ ! -w "$1" ]] && [[ $(option_value -o) != *"ro"* ]] && {
|
||||||
_warning "Tomb file is not writable: ::1 tomb file::" $1
|
_warning "Tomb file is not writable: ::1 tomb file::" $1
|
||||||
_fail=1
|
_fail=1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user