Place program specific configuration into the user's private .kde area.
commit59d1c462a7d2f3546f41c6f96a35c91f2aaeb151
authorJohannes Sixt <j6t@kdbg.org>
Tue, 22 Jun 2010 18:42:36 +0000 (22 20:42 +0200)
committerJohannes Sixt <j6t@kdbg.org>
Tue, 22 Jun 2010 18:42:36 +0000 (22 20:42 +0200)
treeddf3826d2797ed7a97edcc01748a15b188da11ab
parente3119c062202dd64bab7bc45bb21fc6e97a0e4f4
Place program specific configuration into the user's private .kde area.

Previously, program specific configuration was placed in the directory
where the program is located, with the name .kdbgrc. prepended. The new
method is to place the configuration in the user's private area. Then name
of the file consists of a hash of the directory where the executable is
located and the executable's name.

The new method has a few advantages over the old one:

- It is now possible to keep configuration of an executable that is in a
  directory where writing is not permitted.

- When the build directory is erased (such as for a rebuild-all), the
  configuration is not lost.

- It is hard to accidentally distribute a configuration file in a tar ball.

- Since 05318e77 that erased the home-grown ProgramConfig class, the
  ownership of an existing .kdbgrc file was disregarded, whereby it was
  possible to run a command (the DebuggerCmdStr) from an untrusted source.
  This issue does not exist anymore.
kdbg/debugger.cpp
kdbg/main.cpp