- **status**: accepted --> review
---
** [tickets:#1493] log: incorrect verification the string length of
saLogStreamFileName value**
**Status:** review
**Milestone:** 4.5.2
**Created:** Mon Sep 21, 2015 08:39 AM UTC by Vu Minh Nguyen
**Last Updated:** Mon Sep 21, 2015 08:40 AM UTC
**Owner:** Vu Minh Nguyen
AIS defines the log file naming rule is:
`<filename>_<createtime>_<closetime>.log`
And the linux supports the maximum length of a file name is up to NAME_MAX =
255 characters (or bytes)
Logsv exposes an attribute `saLogStreamFileName` to users, so that users can
configure the `<filename>` they want, and log service will do append
`_<createtime>_<closetime>.log` to the <filename> in some cases.
The problem is that, log service allows the users passing a <filename> with the
length up to 255 characters.
Therefore, when log service appends the `_<createtime>_<closetime>.log`, the
length of file name could be over (> 255 bytes). And it causes troubles – logsv
terminated.
Here is an example: If I pass a file name, with length = 240 bytes (allowed),
active logsv will be crashed.
> immcfg -a
> saLogStreamFileName="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
> safLgStrCfg=saLogAlarm,safApp=safLogService
> reboot: Restarting system
---
Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets