Skip to content
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

/var/ossec path is hardcoded in several places #24

Closed
evan2645 opened this issue Jan 29, 2014 · 6 comments
Closed

/var/ossec path is hardcoded in several places #24

evan2645 opened this issue Jan 29, 2014 · 6 comments

Comments

@evan2645
Copy link

Sometimes it is required for ossec to be installed in a non-standard location, such as /opt/ossec. This can be done by setting USER_DIR in preloaded-vars.conf prior to configuring/compiling.

The problem is that there are a couple locations in which the /var/ossec path is hardcoded, and does not obey the USER_DIR configuration variable. I'm including a summary of the instances I was able to find below.

bin/util.sh
bin/ossec-batch-manager.pl

@jrossi
Copy link
Member

jrossi commented Feb 15, 2014

This a large problem and something we need to fix, but this is going to require a fair amount of changes over a lot of code. But saying that its a problem that we plan to address.

@jrossi jrossi added this to the ossec-hids-3.0 milestone Feb 15, 2014
@awiddersheim
Copy link
Member

The two files referenced in the original issue:

bin/util.sh
bin/ossec-batch-manager.pl

These are contrib files. They don't really get compiled and installed in the same way much of the C code does. I haven't really found anywhere in the C code where paths are hard coded but I don't doubt that they exist.

You could fix this semi easily by changing these two contrib files to having a default path hard coded as a single variable but then have install.sh use sed to replace the paths somewhere around here:

https://github.com/ossec/ossec-hids/blob/master/install.sh#L757

Not the greatest solution ever but since OSSEC doesn't really make use of the typical Make, automake, configure style solution most other projects do this might be the best option for now. Either that or we say they are contrib files and aren't fully supported in this fashion.

@mstarks01
Copy link
Contributor

I have a fix for util.sh but need to back out a different commit before I submit a pull request.

@awiddersheim
Copy link
Member

@mstarks01 sounds like you were close to having a PR for this. Any update?

@mstarks01
Copy link
Contributor

#237

@jrossi
Copy link
Member

jrossi commented Jul 12, 2014

Completed in #237

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants