Overview
| Artifact ID: | c6f7400b3fc8366789eacc14639ae7afe8f40a97 |
|---|---|
| Ticket: | cdd157d4849df09ab1d594938aa0d2f4694d643f
file copy -force does an invalid call to open |
| User & Date: | Tomo on 2016-07-18 14:52:40 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
The following TCL command: file copy -force in.txt out.txt will produce this call to "open" syscall: open("out.txt", O_WRONLY|O_CREAT|O_TRUNC, 0100664) = 6 We can see that beside the mode ("664") there is the S_IFREG flag (0100000, regular flag) which is set. According to open man page, there shouldn't be any other bit in "mode" than the permission bits (see http://man7.org/linux/man-pages/man2/open.2.html "According to POSIX, the effect when other bits are set in mode is unspecified...") I found that some filesystem doesn't like this bit to be set. I see that "file copy -force" do a stat on the file before doing the open and I suspect TCL to blindly reuse the flag gained by the stat command but it should only use the lower bits. - foundin changed to: "8.6"
- is_private changed to: "0"
- login: "Tomo"
- priority changed to: "5 Medium"
- private_contact changed to: "22f396e0a6e1333adf623bf097fc096e9dc12cdd"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "Tomo"
- subsystem changed to: "37. File System"
- title changed to: "file copy -force does an invalid call to open"
- type changed to: "Bug"