Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | llvm-objcopy/test: add REQUIRES: shell for use of umask | David Blaikie | 2019-07-22 | 1 | -0/+1 |
| | | | | | | (follow-up to r365162) llvm-svn: 366755 | ||||
* | [llvm-objcopy] Don't change permissions of non-regular output files | Fangrui Song | 2019-07-11 | 1 | -0/+6 |
| | | | | | | | | | | | | | | | | | | | | | | There is currently an EPERM error when a regular user executes `llvm-objcopy a.o /dev/null`. Worse, root can even change the mode bits of /dev/null. Fix it by checking if the output file is special. A new overload of llvm::sys::fs::setPermissions with FD as the parameter is added. Users should provide `perm & ~umask` as the parameter if they intend to respect umask. The existing overload of llvm::sys::fs::setPermissions may be deleted if we can find an implementation of fchmod() on Windows. fchmod() is usually better than chmod() because it saves syscalls and can avoid race condition. Reviewed By: jakehehrlich, jhenderson Differential Revision: https://reviews.llvm.org/D64236 llvm-svn: 365753 | ||||
* | [llvm-objcopy] Change handling of output file permissions | Alex Brachet | 2019-07-04 | 1 | -0/+44 |
Summary: Address bug [[ https://bugs.llvm.org/show_bug.cgi?id=42082 | 42082 ]] where files were always outputted with 0775 permissions. Now, the output file is given either 0666 or 0777 if the object is executable. Reviewers: espindola, alexshap, rupprecht, jhenderson, jakehehrlich, MaskRay Reviewed By: rupprecht, jhenderson, jakehehrlich, MaskRay Subscribers: emaste, arichardson, jakehehrlich, MaskRay, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62718 llvm-svn: 365162 |