Wrong Sys:Syslog usage
Bug #571655 reported by
Guillaume Rousse
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
Changed in ocsinventory-unix-agent: | |
assignee: | nobody → mortheres (mortheres) |
importance: | Undecided → Medium |
Changed in ocsinventory-unix-agent: | |
status: | New → In Progress |
Changed in ocsinventory-unix-agent: | |
status: | In Progress → Fix Committed |
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.