{"id":183605,"date":"2026-10-05T10:54:21","date_gmt":"2026-10-05T08:54:21","guid":{"rendered":"https:\/\/prohoster.info\/blog\/news\/teo-de-raadt-predlozhil-izmeneniya-dlya-ogranicheniya-dostupa-k-fs-cherez-funkcziyu-openat"},"modified":"2026-10-05T10:54:25","modified_gmt":"2026-10-05T08:54:25","slug":"theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat","status":"publish","type":"post","link":"https:\/\/prohoster.info\/sq\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat","title":{"rendered":"Teo de Raadt propozoi ndryshime p\u00ebr t\u00eb kufizuar qasje n\u00eb sistemin e skedar\u00ebve p\u00ebrmes funksionit openat","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Teo de Raadt ka propozuar q\u00eb t\u00eb p\u00ebrfshihet nj\u00eb mekaniz\u00ebm i ri n\u00eb OpenBSD p\u00ebr t\u00eb zvog\u00ebluar sip\u00ebrfaqen e sulmeve, i implementuar p\u00ebrmes zgjerimit t\u00eb mund\u00ebsive t\u00eb thirrjes s\u00eb sistemit openat. Patch-et me implementimin e flamur\u00ebve shtes\u00eb p\u00ebr openat dhe open, q\u00eb kufizojn\u00eb mund\u00ebsin\u00eb e kalimit n\u00eb katalog\u00ebt e sip\u00ebrm p\u00ebrmes \"..\/\" dhe aksesit p\u00ebr rrug\u00eb t\u00eb plota, jan\u00eb p\u00ebrgatitur p\u00ebr kernelin, libc, si dhe disa aplikacione nga sistemi baz\u00eb. Ndryshimet akoma nuk jan\u00eb p\u00ebrfshir\u00eb n\u00eb OpenBSD-current dhe jan\u00eb n\u00eb faz\u00ebn e diskutimit mes zhvilluesve.    <\/p>\n<p>Familja e thirrjeve t\u00eb sistemit openat(2) funksionon si nj\u00eb analog i open(2) p\u00ebrve\u00e7 se, n\u00ebse n\u00eb parametrin \"path\" \u00ebsht\u00eb specifikuar nj\u00eb rrug\u00eb relative, skedari q\u00eb hapet caktohet n\u00eb lidhje me katalogun e lidhur me skedarin e dosjes \"fd\", jo n\u00eb lidhje me katalogun aktual t\u00eb pun\u00ebs. N\u00ebse i d\u00ebrgoni openat nj\u00eb rrug\u00eb t\u00eb plot\u00eb, p\u00ebr shembull: int dirfd = open(\"\/tmp\", O_RDONLY | O_DIRECTORY); int hfd = openat(dirfd, \"\/etc\/hosts\", O_RDONLY);    <\/p>\n<p>funksioni openat() do t\u00eb injoroj\u00eb \"dirfd\" dhe, si pasoj\u00eb, rruga e plot\u00eb do t\u00eb trajtohet n\u00eb m\u00ebnyr\u00eb t\u00eb zakonshme.    <\/p>\n<p>Prandaj, z\u00ebvend\u00ebsimi i open() me openat() vetvetiu nuk rrit sigurin\u00eb e programit. Nj\u00eb thirrje e till\u00eb mund t\u00eb p\u00ebrshpejtoj\u00eb analiz\u00ebn e rrug\u00ebs, por nuk kufizon aksesin n\u00eb sistemin e skedar\u00ebve. Flamujt q\u00eb ndalojn\u00eb rrug\u00ebt absolute (p.sh., RESOLVE_BENEATH dhe\/ose RESOLVE_IN_ROOT p\u00ebr openat2 n\u00eb Linux) nuk garantojn\u00eb mbrojtje: programuesi duhet t'i shtoj\u00eb ato n\u00eb t\u00eb gjitha thirrjet p\u00ebrkat\u00ebse, dhe gjat\u00eb marrjes s\u00eb kontrollit t\u00eb procesit, nj\u00eb sulmues mund t\u00eb p\u00ebrdor\u00eb rrug\u00eb t\u00eb tjera p\u00ebr hapjen e skedar\u00ebve.    <\/p>\n<p>Gjat\u00eb pun\u00ebs mbi utilitarin openrsync, Teo kishte nevoj\u00eb t\u00eb kufizonte aft\u00ebsit\u00eb e tij p\u00ebr t\u00eb kaluar n\u00ebp\u00ebr sistemin e skedar\u00ebve, por t\u00eb b\u00ebhet k\u00ebshtu duke p\u00ebrdorur funksionet unveil() dhe pledge() ishte e pamundur. At\u00ebher\u00eb lindi ideja p\u00ebr nj\u00eb mekaniz\u00ebm si openat(), por me karakteristika sigurie q\u00eb plot\u00ebsojn\u00eb pledge\/unveil ose madje funksionojn\u00eb n\u00eb munges\u00eb t\u00eb tyre.     <\/p>\n<p>Ideja kryesore \u00ebsht\u00eb t\u00eb b\u00ebj\u00eb q\u00eb kufizimet t\u00eb jen\u00eb pjes\u00eb e vet\u00eb skedarit t\u00eb dosjes. P\u00ebr k\u00ebt\u00eb, propozohet nj\u00eb flamur F_BELOW, i cili mund t\u00eb vendoset p\u00ebrmes fcntl(), ose flamuri O_BELOW p\u00ebr open(). Skedari \"dirfd\" i kufizuar n\u00eb k\u00ebt\u00eb m\u00ebnyr\u00eb do t\u00eb lejoj\u00eb vet\u00ebm kalime posht\u00eb n\u00eb pem\u00ebn e katalogjeve: thirrjet openat() me rrug\u00eb t\u00eb plot\u00eb ose me kalim lart p\u00ebrmes \"..\" do t\u00eb p\u00ebrfundojn\u00eb me nj\u00eb gabim ENOENT. N\u00eb rast sulmi q\u00eb \u00e7on n\u00eb ekzekutimin e kodit, tabela e skedar\u00ebve t\u00eb dosjeve t\u00eb procesit do t\u00eb p\u00ebrmbaj\u00eb \"dirfd\" m\u00eb pak funksional, \u00e7ka do t\u00eb kufizoj\u00eb sip\u00ebrfaqen e sulmit.<br \/>\n<br \/>Burimi: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=66401\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 OpenBSD \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0430\u0442\u0430\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 openat. \u041f\u0430\u0442\u0447\u0438 \u0441 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0444\u043b\u0430\u0433\u043e\u0432 \u0434\u043b\u044f openat \u0438 open, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0449\u0438\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u043a \u0432\u0435\u0440\u0445\u043d\u0438\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u043c \u0447\u0435\u0440\u0435\u0437 &#171;\/..&#187; \u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043f\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u044f\u043c, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u044f\u0434\u0440\u0430, libc, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438\u0437 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u043e\u043a\u0430 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-183605","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 OpenBSD \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0430\u0442\u0430\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 openat.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Alexander Kovalev\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/sq\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<meta property=\"og:locale\" content=\"sq_AL\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0424\u0421 \u0447\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u044e openat | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 OpenBSD \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0430\u0442\u0430\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 openat.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/sq\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2026-10-05T08:54:21+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2026-10-05T08:54:25+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Theo de Raadt propozoi ndryshime p\u00ebr t\u00eb kufizuar aksesin n\u00eb FS p\u00ebrmes funksionit openat | ProHoster","description":"Theo de Raadt propozoi t\u00eb p\u00ebrfshihej nj\u00eb mekaniz\u00ebm i ri n\u00eb OpenBSD p\u00ebr t\u00eb reduktuar sip\u00ebrfaqen e sulmit, i realizuar p\u00ebrmes zgjerimit t\u00eb mund\u00ebsive t\u00eb thirrjes sistemore openat.","canonical_url":"https:\/\/prohoster.info\/sq\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"sq_AL","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0424\u0421 \u0447\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u044e openat | ProHoster","og:description":"\u0422\u0435\u043e \u0434\u0435 \u0420\u0430\u0430\u0434\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u043b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432 OpenBSD \u043d\u043e\u0432\u044b\u0439 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u043b\u044f \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0432\u0435\u0440\u0445\u043d\u043e\u0441\u0442\u0438 \u0430\u0442\u0430\u043a\u0438, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0447\u0435\u0440\u0435\u0437 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 openat.","og:url":"https:\/\/prohoster.info\/sq\/blog\/news\/theo-de-raadt-proposed-changes-to-restrict-filesystem-access-via-openat","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2026-10-05T08:54:21+00:00","article:modified_time":"2026-10-05T08:54:25+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":[],"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/183605","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/comments?post=183605"}],"version-history":[{"count":1,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/183605\/revisions"}],"predecessor-version":[{"id":183606,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/posts\/183605\/revisions\/183606"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/media?parent=183605"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/categories?post=183605"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/sq\/wp-json\/wp\/v2\/tags?post=183605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}