Skip to content

Commit a98a805

Browse files
committed
[Fix] Sentinel review: inline comments on chown redirect in quarantine restore
1 parent e1d72a0 commit a98a805

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

files/internals/lmd_quarantine.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ restore() {
222222
if ! _validate_restore_path "$file_path"; then
223223
return 1
224224
fi
225-
chown "${file_owner}:${file_group}" "$quardir/$file" >> /dev/null 2>&1
225+
chown "${file_owner}:${file_group}" "$quardir/$file" >> /dev/null 2>&1 # redirect: chown may fail on invalid owner/group from corrupt .info
226226
chmod "$file_mode" "$quardir/$file" >> /dev/null 2>&1 # redirect: chmod may fail on invalid mode from corrupt .info
227227
command mv -f "$quardir/$file" "$file_path"
228228
if [ "$os_freebsd" == "1" ]; then
@@ -238,7 +238,7 @@ restore() {
238238
if ! _validate_restore_path "$file_path"; then
239239
return 1
240240
fi
241-
chown "${file_owner}:${file_group}" "$file" >> /dev/null 2>&1
241+
chown "${file_owner}:${file_group}" "$file" >> /dev/null 2>&1 # redirect: chown may fail on invalid owner/group from corrupt .info
242242
chmod "$file_mode" "$file" >> /dev/null 2>&1 # redirect: chmod may fail on invalid mode from corrupt .info
243243
command mv -f "$file" "$file_path"
244244
if [ "$os_freebsd" == "1" ]; then

0 commit comments

Comments
 (0)