Re: [PATCH] modules_install

Adam Sulmicki (adam@cfar.umd.edu)
Sun, 04 Oct 1998 15:15:14 -0400


Geert Uytterhoeven writes:

->--- pre-2.1.124-2/Makefile.orig Sun Oct 4 20:05:16 1998
->+++ pre-2.1.124-2/Makefile Sun Oct 4 20:20:34 1998
->@@ -316,10 +316,10 @@
-> if [ -f VIDEO_MODULES ]; then inst_mod VIDEO_MODULES video; fi; \
-> if [ -f FC4_MODULES ]; then inst_mod FC4_MODULES fc4; fi; \
-> \
->- ls *.o > .allmods; \
->- echo $$MODULES | tr ' ' '\n' | sort | comm -23 .allmods - > .misc; \
->- if [ -s .misc ]; then inst_mod .misc misc; fi; \
->- rm -f .misc .allmods; \
+ rm -f /tmp/.misc.$$$$ /tmp/.allmods.$$$$; \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
extra line here.
->+ ls *.o > /tmp/.allmods.$$$$; \
->+ echo $$MODULES | tr ' ' '\n' | sort | comm -23 /tmp/.allmods.$$$$ - > /
->tmp/.misc.$$$$; \
->+ if [ -s /tmp/.misc.$$$$ ]; then inst_mod /tmp/.misc.$$$$ misc; fi; \
->+ rm -f /tmp/.misc.$$$$ /tmp/.allmods.$$$$; \
-> )

Umm, as I see it could create potential security hole.

I would prefer that you first remove the files before writing to them.
after all someone could make just an link to /etc/passwd.

See the extra line above for fix.

Adam

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/