ossec/ossec-hids — pull request #298 by awiddersheim (2014-09-14 13:49:31+00:00)
Title: Do not truncate OS information in agent_control

When getting agent information from agent_control it provides really useful OS information about the agent it is running on. Unfortunately, that information gets truncated both when displaying in it's normal mode and when CSV output is chosen.

At the very least the CSV output should show this data without getting truncated. My guess is the data was originally truncated to make the display nicer. That isn't a concern with CSV output.

I think we should consider removing this truncation entirely. The truncation doesn't really make the display of data that much nicer and it is cleaner. If enough people agree I can close this pull request and re-open with the appropriate changes.

Some examples of the output:

```
OSSEC HIDS agent_control. Agent information:
Agent ID: 045
Agent Name: example-agent
IP address: 1.2.3.4
Status: Active

Operating system: Microsoft Windows Server 2012 Standard Edition (Build 9200)
Client version: OSSEC HIDS v2.8
Last keep alive: Sun Sep 14 09:42:57 2014

Syscheck last started at: Sun Sep 14 08:38:16 2014
Rootcheck last started at: Sun Sep 14 07:32:57 2014
```

```
OSSEC HIDS agent_control. Agent information:
Agent ID: 000 (local instance)
Agent Name: example-master
IP address: 127.0.0.1
Status: Active/Local

Operating system: Linux example-master 2.6.32-431.23.3.el6.x86_64 #1 SMP Wed Jul 16 06:12:23 EDT 2014 x86_64
Client version: OSSEC HIDS v2.8
Last keep alive: Not available

Syscheck last started at: Sun Sep 14 04:19:20 2014
Rootcheck last started at: Sun Sep 14 02:06:29 2014
```

As you can see, the second listing is a big longer but not really all that bad. I can't imagine where that OS information gets any longer than that but I'm sure it is possible. At the very least we can truncate at a higher level of chars.