Re: rm/unlink and `how to find out who i am'

看板DFBSD_kernel作者時間21年前 (2005/04/03 03:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/6 (看更多)
On Sat, Apr 02, 2005 at 06:42:06PM +0000, Rahul Siddharthan wrote: > >> Why should that `not happen here'? Neither unlink nor rm should > >> be called as unlink////. Perhaps I'm misunderstanding. > > > >That's exactly the reason why. It doesn't matter if they are called > >/tmp/unlink////, because some stupid caller didn't include the final > >rm (/tmp/unlink////rm). > > I thought a slash (/) is the one character that cannot be part of a > filename? So unlink//// cannot possibly be the name by which rm is > being called, surely? argv[0] is set by the caller, not the kernel. It can through (almost) any junk in there. Joerg
文章代碼(AID): #12Jkls00 (DFBSD_kernel)
討論串 (同標題文章)
文章代碼(AID): #12Jkls00 (DFBSD_kernel)