{"id":1121862,"date":"2023-03-27T10:10:53","date_gmt":"2023-03-27T14:10:53","guid":{"rendered":"https:\/\/www.prime-wow.com\/?p=1121862"},"modified":"2023-03-27T10:10:53","modified_gmt":"2023-03-27T14:10:53","slug":"the-curious-case-of-o_directoryo_creat","status":"publish","type":"post","link":"https:\/\/www.prime-wow.com\/?p=1121862","title":{"rendered":"[$] The curious case of O_DIRECTORY|O_CREAT"},"content":{"rendered":"<p>The <a href=\"https:\/\/man7.org\/linux\/man-pages\/man2\/openat.2.html\"><tt>open()<\/tt><\/a><br \/>\nsystem call offers a number of flags that modify its behavior; not all<br \/>\ncombinations of those flags make sense in a single call.  It turns out,<br \/>\nthough, that the kernel has responded in a surprising way to the<br \/>\ncombination of <tt>O_CREAT<\/tt> and <tt>O_DIRECTORY<\/tt> for a long time.<br \/>\nAfter a 2020 change made that response even more surprising, it seems<br \/>\nlikely that this behavior will soon be fixed, resulting in a rare user-visible<br \/>\nsemantic change to a core system call.&#013;<br \/>\n&#013;<br \/>\nSource: LWN.net &#8211; <a href=\"https:\/\/lwn.net\/Articles\/926782\/\" target=\"_blank\" rel=\"noopener\">[$] The curious case of O_DIRECTORY|O_CREAT<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The open() system call offers a number of flags that modify its behavior; not all combinations of those flags make sense in a single call. It turns out, though, that the kernel has responded in a surprising way to the &hellip; <a href=\"https:\/\/www.prime-wow.com\/?p=1121862\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[72],"tags":[75],"class_list":["post-1121862","post","type-post","status-publish","format-standard","hentry","category-linux","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts\/1121862","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1121862"}],"version-history":[{"count":0,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=\/wp\/v2\/posts\/1121862\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1121862"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1121862"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.prime-wow.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1121862"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}