ITADN

Harden trash-put against unwritable dirs

#394Pull Requestcurious-rabbit 创建于 2026-07-03
C
curious-rabbitcommented
- refuse to treat an existing option-shaped file (e.g. --trash-dir=x) as an option. "trash-put *" cannot be hijacked into trashing to another dir anymore - reject a trash dir whose info/ or files/ is a symlink - stop trashinfo creation from looping forever on an unwritable or full dir. fail fast on EACCES/EPERM/ENOSPC/EDQUOT/EROFS, cap retries otherwise - on failure trash-put stops cleanly and leaves the original file in place - only hide foreign-owned trashinfo in world-writable (shared) trash dirs. Now your own files stay restorable when uids differ (NFS, backups, cross-OS)
合并状态:未合并 8 条评论