John Hasler wrote:
John Summerfield writes:The size of cfgfile is what bothered me as soon as I saw it.Presumably properly calculating the amount of storage to request takes care of that.As I said: use snprintf or do something else. In fact, use snprintf anyway.Leading / is fine...We don't have the rest of the code, but it doesn't seem likely that / is a valid value for HOME.
You can't assume that. eg: [root@ts root]# cat /etc/passwd | grep :/: nobody:x:99:99:Nobody:/:/sbin/nologin rpc:x:32:32:Portmapper RPC user:/:/bin/false [root@ts root]# summer@Dolphin:~$ echo $HOME /home/summer summer@Dolphin:~$ HOME=/ sh -c 'echo $HOME' / summer@Dolphin:~$ HOME=/$HOME sh -c 'echo $HOME' //home/summer summer@Dolphin:~$ If you mean something different from all of these, please clarify. -- Cheers John -- spambait 1aaaaaaa@computerdatasafe.com.au Z1aaaaaaa@computerdatasafe.com.au Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/