After successfully emerging emacs (version 21.2), I noticed that all of the lisp files (and a number of other files, too) under /usr/share/emacs/ were world-writeable (666 permissions). I would think that somebody could stick a malicious bit of lisp code in there.. causing emacs to execute "rm -rf ~/*" or "rm -rf /*". I haven't attempted to unmerge emacs and reemerge it to see if it has been fixed yet, or was just a glitch. This bug may be present in Gentoo v. 1.2 as well.
When emacs is installing itselfs it simply copies the files going in /usr/share/info/emacs/* from the unpacked distribution. These files have for some reason the wrong mask when comparing the files ebuild unpacks and when I unpack the distribution file manually.
Created attachment 1516 [details, diff] quick fix for setting more sane permissions on files
fixed in -r1 thanks for the bug report! Matt