Open-AudIT

What's on your network?
It is currently Tue Jan 23, 2018 6:14 pm

All times are UTC + 10 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Apr 04, 2012 5:55 pm 
Offline
Newbie

Joined: Mon Apr 02, 2012 11:48 pm
Posts: 4
I just realized when looking into the result for a user on a machine, that OAv2 writes "True", "False", "Wahr", "Falsch" into sys_sw_user.user_password_changeable depending on the language the system which was audited is running.

That is surely no bug but perhaps something to improve because it would make evaluating the results via sql quite easier if boolean values would appear all in the same language (english)

Is there a way to improve the script that it already sends true or false via xml or if not

perhaps a function which converts expected Boolean Values into an english string could make sense. Perhaps something like:
Code:
function convertboolStringToEnglish ($input)
   {
      $fsReturn = $input;
      if (strtolower($input)=="wahr")
      {
         $fsReturn = "True";
      }
      if (strtolower($input) == "falsch")
      {
         $fsReturn = "False";
      }      
      
      return $fsreturn;
   }


and then modifying the insert commands
Code:
$sql = "INSERT INTO
               sys_sw_user (   
               system_id,
               user_name,
               user_caption,
               user_sid,
               user_domain,
               user_disabled,
               user_full_name,
               user_password_changeable,
               user_password_expires,
               user_password_required,
               user_status,
               user_type,
               timestamp,
               first_timestamp )
            VALUES ( ?,?,?,?,?,?,?,?,?,?,?,?,?,? )";
         $data = array("$details->system_id",
               "$input->user_name",
               "$input->user_caption",
               "$input->user_sid",
               "$input->user_domain",
               "$input->user_disabled",
               "$input->user_full_name",
               "$this->convertboolStringToEnglish($input->user_password_changeable)",
               "$input->user_password_expires",
               "$input->user_password_required",
               "$input->user_status",
               "$input->user_type",
               "$details->timestamp",
               "$details->timestamp");


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

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 5 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