Re: [PATCH] Kconfig: add warning about permission of config file

From: Michal Marek
Date: Tue May 24 2011 - 09:23:35 EST


On 24.5.2011 15:06, Hiromu Yakura wrote:
Hello,
thanks for replying.

On Mon, May 23, 2011 at 13:58, Arnaud Lacombe<lacombar@xxxxxxxxx> wrote:
Do you have a precise way to reproduce this, in particular which
target is involved ? I tried to `chmod 555' the kernel root directory,
re-ran `conf' (through the `defconfig' target) and `mconf' (manually
for this one, as check-lxdialog.sh fails when invoked though make).
The former failed with:

*** Error during writing of the configuration.

gmake[1]: *** [defconfig] Error 1
gmake: *** [defconfig] Error 2
In my environment, this patch is working properly.
The output is as follows:

hiromu@hiromu-MacBook:/usr/src/linux-2.6$ ls -ld .
dr-xr-sr-x 25 hiromu hiromu 4096 May 24 21:41 .
hiromu@hiromu-MacBook:/usr/src/linux-2.6$ make defconfig
*** Default configuration is based on 'x86_64_defconfig'
*** Permission denied to write the configuration.

Arnaud's point is that your patch should not be necessary at all, because kconfig already checks the return value of the fopen() call in conf_write() and prints the above message if it fails. So do you have a testcase where make <...>config without your patch returns without error, but the configuration is not written?

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