Open-AudIT

What's on your network?
It is currently Wed Jan 24, 2018 5:25 pm

All times are UTC + 10 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Tue Oct 11, 2016 1:33 am 
Offline
Newbie

Joined: Sat Jun 04, 2016 3:26 am
Posts: 9
Hello - I originally created THIS THREADwhen I had a problem with the upgrade to 1.12.8. I see a lot of work has been done to figure out why a few different installs have failed in a similar way. Unfortunately I've been unable to work for the last month or so, and I missed a lot of the conversation. My apologies.

My current issue is, I believe, fallout from my failed install and restore from backup. I was able to recover all of the backed up files that the install created, as well as restore my database from backup in order to get open-audit functioning back at version 1.12.16; however I just noticed that I am receiving an error when trying to submit audit results via HTTP. The script produces this error:

Quote:
...
Audit Generated in 26 seconds.
Submitting audit online
Error with http request(2). Audit not submitted.
Total Execution Time: 27 seconds.


When trying to go to the submission URL on the server, I get this error:

Quote:
A Database Error Occurred

Error Number: 1305

FUNCTION openaudit.cidr_to_mask does not exist

/* M_oa_config::check_blessed */ SELECT COUNT(id) AS count FROM networks WHERE (-1 << (33 - INSTR(BIN(INET_ATON(cidr_to_mask(SUBSTR(name, LOCATE('/', name)+1)))), '0'))) & INET_ATON('172.33.17.18') = INET_ATON(SUBSTR(name, 1, LOCATE('/', name)-1))

Filename: models/m_oa_config.php

Line Number: 431


I'm not clear on if this is an error with the database, or if there is something wrong with the open-audit site files. Can anyone please point me in a direction to resolve this?

Thanks for the assistance.


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 11, 2016 1:47 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1229
The cidr_to_mask function is created in the default MySQL database and not the OpenAudit database so it didn't get restored.

You'll need to recreate the function. This should do it.

Code:
mysql -u openaudit -popenauditpassword -e "CREATE FUNCTION cidr_to_mask (cidr INT(2)) RETURNS CHAR(15) DETERMINISTIC RETURN INET_NTOA(CONV(CONCAT(REPEAT(1,cidr),REPEAT(0,32-cidr)),2,10))";


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 11, 2016 2:51 am 
Offline
Newbie

Joined: Sat Jun 04, 2016 3:26 am
Posts: 9
Thanks so much. This was exactly the fix I needed. I DID need to drop in a -Dopenaudit into your posted command above, however.

Thanks again!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group