- **status**: review --> fixed
- **assigned_to**: Vu Minh Nguyen -->  nobody 
- **Comment**:

changeset:   7027:e5d2ce98fd31
tag:         tip
parent:      7023:a0ab1cd371d5
user:        Vu Minh Nguyen <[email protected]>
date:        Tue Oct 13 09:50:07 2015 +0100
summary:     log: incorrect verification the string length of 
saLogStreamFileName value [#1493]

rev: e5d2ce98fd31acac496c8d427f78b56617844955

changeset:   7026:d6c92b2bdb93
branch:      opensaf-4.7.x
parent:      7022:70f35e8b053b
user:        Vu Minh Nguyen <[email protected]>
date:        Tue Oct 13 09:50:07 2015 +0100
summary:     log: incorrect verification the string length of 
saLogStreamFileName value [#1493]

rev: d6c92b2bdb938b9df58918942c53237f8ea6f65f

changeset:   7025:677617e23ea3
branch:      opensaf-4.6.x
parent:      7021:4fa4e1782c11
user:        Vu Minh Nguyen <[email protected]>
date:        Wed Oct 21 16:25:17 2015 +0700
summary:     log: incorrect verification the string length of 
saLogStreamFileName value [#1493]

rev: 677617e23ea357820c2b30b7f9fb0e38096c26b6

changeset:   7024:ff502f273eae
branch:      opensaf-4.5.x
parent:      7020:320a26fa590d
user:        Vu Minh Nguyen <[email protected]>
date:        Wed Oct 21 16:25:17 2015 +0700
summary:     log: incorrect verification the string length of 
saLogStreamFileName value [#1493]

rev: ff502f273eaed3396aa3048266d23f51902a5889



---

** [tickets:#1493] log: incorrect verification the string length of 
saLogStreamFileName value**

**Status:** fixed
**Milestone:** 4.5.2
**Created:** Mon Sep 21, 2015 08:39 AM UTC by Vu Minh Nguyen
**Last Updated:** Fri Oct 09, 2015 08:32 AM UTC
**Owner:** nobody


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 [email protected] 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to