Skip to content
Tcl Source Code Artifact [e43fca3828]
Login

Artifact [e43fca3828]

Artifact e43fca38285e69c3c467e315dbe478e695795d06:

Ticket change [e43fca3828] - Ticket [930225ffffffffff|930225ffff] <i>access() - safe to use?</i> status still Open with 4 other changes by dkf on 2004-04-06 16:36:42.
D 2004-04-06T16:36:42
J icomment Logged\sIn:\sYES\s\nuser_id=79902\n\nWhich\sOS\sstates\sthis\sin\sits\smanpages?\n\nThe\ssecurity\sproblems\sof\saccess()\sonly\sreally\sbite\swhen\nrunning\ssetuid/setgid,\ssince\syou\sotherwise\sgo\sthrough\sthe\nsame\sset\sof\schecks\sinternally\swhen\syou\smanipulate\sthe\sfile\nwith\sopen(),\setc.\s\sLuckily,\sthat's\snot\sa\snormal\nconfiguration\sof\sTcl\sso\swe\scan\signore\sit\sfor\snow.\n\nThe\salternatives\sare\sto\sstat()\sand\scheck\sthe\spermissions\son\nthe\sfile\sourselves\s(which\shas\sexactly\sthe\ssame\ssecurity\nproblems)\sor\sopen\sthe\sfile\sand\seither\scheck\sthe\sresult\sor\sdo\nan\sfstat(),\swhich\shas\sits\sown\sset\sof\sproblems\s(especially\nwhen\swriting\sa\sfile.)\n\nEverything\sgets\s*much*\smore\scomplex\swhen\syou\suse\sAFS\sor\ssome\nother\sfilesystem\swith\sACLs,\sand\sit\sturns\sout\sthat\sthe\naccess(2)\smanpage\son\sRH9\sis\swrong\s(as\saccess()\schecks\sACLs)\nand\sis\stherefore\snot\sreplacable\swith\sany\s*stat()\sbased\ssolution.\n\nI\sthink\sthe\sonly\s"fix"\sis\sto\swarn\speople\swriting\sscripts\nthat\srun\ssetuid/setgid\sto\sbe\svery\scareful.\s\sAnd\sbeware\sof\nscaremongering\smanual\spages.\n
J login dkf
J mimetype text/plain
J username dkf
K 930225ffffffffffffffffffffffffffffffffff
U dkf
Z b9b437f224ca6a532fff7ac959eed10a