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

Allow for longer entries in the system.information column #802

Merged
merged 1 commit into from
Apr 20, 2016
Merged

Allow for longer entries in the system.information column #802

merged 1 commit into from
Apr 20, 2016

Conversation

infracaninophile
Copy link

Switch from VARCHAR(128) to TEXT to allow for longer entries in the
information column. On server registration, this column is typically
loaded with the output of uname -a. That's frequently longer than
128 characters. For instance on the FreeBSD servers I manage, it's
typically in excess of 180 characters:

ox-dell39:~:% uname -a | wc
       1      15     185

Since the length of the data being written to that column is checked,
this results in a failed SQL query at which the ossec-dbd process quits.

Tested with postgresql; equivalent change applied to mysql.schema

Switch from VARCHAR(128) to TEXT to allow for longer entries in the
information column.  On server registration, this column is typically
loaded with the output of ```uname -a```.  That's frequently longer than
128 characters.  For instance on the FreeBSD servers I manage, it's
typically in excess of 180 characters:

```
ox-dell39:~:% uname -a | wc
       1      15     185
```

Since the length of the data being written to that column is not
checked, this results in a failed SQL query at which the ossec-dbd
process quits.

Tested with postgresql; equivalent change applied to mysql.schema
but not tested.
@ddpbsd
Copy link
Member

ddpbsd commented Apr 14, 2016

How does this change affect current installations/upgrades?

@infracaninophile
Copy link
Author

On 04/14/16 13:00, Dan Parriott wrote:

How does this change affect current installations/upgrades?

This should only ever affect new installs. Anyone already using the
original schema successfully has no need to update it.

@ddpbsd ddpbsd merged commit 7a4b0d3 into ossec:master Apr 20, 2016
@infracaninophile infracaninophile deleted the dbschema branch April 20, 2016 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants