-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardwired DEFAULT_MODULE_PATHS #47
Comments
Hi Nil, Note that the coserver can also be started from guile:
Half of the hard-coded paths are OK, the other half are just plain wrong. The OK hard-coded paths are the ones that point at the install directories. The bad hard-coded paths are all the relative paths. These should be replaced by an env var. Relative paths, such as "build", are extremely evil. The problem with the relative paths is that they cause huge amountsw of trouble, and waste huge amounts of debugging time: people check in code that depends on the relative paths, and that code works for them, but not for other people, and then we get these bug reports that "opencog doesn't work" and its a never-ending collision course of bad file paths. The more relative file paths that we use, the harder it is to debug things, the harder it is to spot the errors. I've wasted far too much time wrestling with file-paths in opencog, the whole concept is bad. Yet, the bug only bits infrequently, and fixing it is hard, so its low priority ... I'm guessing that perhaps having the ENV var is the right fix.... |
Good, I actually did remove the build hardwired paths and added a env variable instance |
@linas do you consider the solution sufficiently adequate and the issue should be closed? |
Well, Config.cc still lists a bunch of relative search paths in
In the modern theory of computer security, this is a security hole, since an attacker could install a config file in some unsuspecting place (e.g. in the /tmp directory) and then opencog might find it (if running the cogserver in the /tmp directory), and use that evil config file to do ... something. Given that this seems very unlikely, I think we can just leave this be, for now. Given that I seem to read about security breaches every day on slashdot, anything that allows a security breach to occur is just asking to get into the news. |
Merge opencog/cogutil into singnet/cogutil (from singnet/cogutil/master fork)
The list of paths to look for modules is entirely hardwired in
Both the atomspace and opencog repos rely on it (which is why it is in cogutils) but it prevents from running the cogserver from certain places like
which contains
run_cogserver.sh
, thus failing to run the cogserver..I guess there are 2 ways to properly deal with that
OPENCOG_MODULE_PATHS
meanwhile I've added
../build
in the list of hardwired default module paths which I suppose should accommodate 90% of the users wanting to run the cogserver from that script.The text was updated successfully, but these errors were encountered: