Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can also use the same technique to cause a exhaustion on the number of files/inodes. Ie you format a ext4 partition with crazy number of inodes, then create the zip file containing crazy amount of 0-byte files. Then receiving side has a normal formatted ext3,ext4 partition. Exhaustion on number of inodes. This is not nice so don't do it.


Wonder what would happen if you hid a symlink pointing to root as one of the files. Someone without a doubt would rm-rf.


rm -rf doesn't follow symlinks:

    /tmp $ mkdir -p a/b/c
    /tmp $ mkdir -p a/d/e
    /tmp $ cd a/b/c
    /tmp/a/b/c $ ln -s /tmp/a/d .
    /tmp/a/b/c $ cd ../../
    /tmp/a $ ls */*
    b/c:
    d

    d/e:
    /tmp/a $ rm -rf b
    /tmp/a $ ls
    d
It would be pretty stupid for it to.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: