.
D 2016-07-18T14:52:40.611
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment The\sfollowing\sTCL\scommand:\r\n\r\nfile\scopy\s-force\sin.txt\sout.txt\r\n\r\nwill\sproduce\sthis\scall\sto\s"open"\ssyscall:\r\n\r\nopen("out.txt",\sO_WRONLY|O_CREAT|O_TRUNC,\s0100664)\s=\s6\r\n\r\nWe\scan\ssee\sthat\sbeside\sthe\smode\s("664")\sthere\sis\sthe\sS_IFREG\sflag\s(0100000,\sregular\sflag)\swhich\sis\sset.\sAccording\sto\sopen\sman\spage,\sthere\sshouldn't\sbe\sany\sother\sbit\sin\s"mode"\sthan\sthe\spermission\sbits\s(see\shttp://man7.org/linux/man-pages/man2/open.2.html\s"According\sto\sPOSIX,\sthe\seffect\swhen\sother\sbits\sare\sset\sin\smode\sis\sunspecified...")\r\n\r\nI\sfound\sthat\ssome\sfilesystem\sdoesn't\slike\sthis\sbit\sto\sbe\sset.\r\n\r\nI\ssee\sthat\s"file\scopy\s-force"\sdo\sa\sstat\son\sthe\sfile\sbefore\sdoing\sthe\sopen\sand\sI\ssuspect\sTCL\sto\sblindly\sreuse\sthe\sflag\sgained\sby\sthe\sstat\scommand\sbut\sit\sshould\sonly\suse\sthe\slower\sbits.
J foundin 8.6
J is_private 0
J login Tomo
J priority 5\sMedium
J private_contact 22f396e0a6e1333adf623bf097fc096e9dc12cdd
J resolution None
J severity Minor
J status Open
J submitter Tomo
J subsystem 37.\sFile\sSystem
J title file\scopy\s-force\sdoes\san\sinvalid\scall\sto\sopen
J type Bug
K cdd157d4849df09ab1d594938aa0d2f4694d643f
U Tomo
Z 9aaa63a4f7554bee1832f9cb55fb6d5c