Re: Re #2: [patch] Re: [PATCH] modules_install

Alan Cox (alan@lxorguk.ukuu.org.uk)
Mon, 5 Oct 1998 03:53:02 +0100 (BST)


> ->> + mkdir $$TMPDIR; \
> ->> + if [ $$? -ne 0 ]; then \
> ->> + echo "$0: Can't create temp dir $$TMPDIR, exiting..."; \
> ->> + exit 1; \
> ->> + fi; \
> ->
> ->And this is a denial of service attack
> ->
> ->Just back the patch out. Its a complete turkey. If you want to fix it
> ->you need additional tools like mktemp which not all distributions include
>
> It is not case, the above is attempt to try to protect from case when
> someone make the file before hand, but they also used chattr command to
> make it immutable and therefore not removable by 'rm -rf'. Even mktemp
> won't help here (in fact the test condition below mkdir comes form
> manpage on mktmp :)

mktemp can try multiple names, doing that in sh is rather harder.

-
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/