Wrong Sys:Syslog usage

Bug #571655 reported by Guillaume Rousse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: Unified Unix Agent
Fix Released
Medium
mortheres

Bug Description

The Syslog backend in ocsinventory-agent is wrong in many ways:
1) it calls setlogsock(), whereas this is discouraged
2) it reopens syslog for every message, instead of keeping it open during the whole agent runtime
3) it uses USER environement variable as a facility name, instead of using standard syslog facility name
4) it doesn't allow to configure used facility

The attached patch fixes the various issues.

I fixed point 2 by using a destructor in Syslog backend to close the logs. An explicit method call could have been used too, as the problem is not specific to this backed. The file backend is also affected

Revision history for this message
Guillaume Rousse (guillaume-rousse) wrote :
mortheres (mortheres)
Changed in ocsinventory-unix-agent:
assignee: nobody → mortheres (mortheres)
importance: Undecided → Medium
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: New → In Progress
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: In Progress → Fix Committed
Frank (frank-bourdeau)
Changed in ocsinventory-unix-agent:
status: Fix Committed → Won't Fix
status: Won't Fix → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.