Re: [PATCH 2/2] libsepol: port str_read from kernel

2016-08-19 Thread Stephen Smalley
On 08/19/2016 10:54 AM, William Roberts wrote: > On Aug 19, 2016 06:12, "Stephen Smalley" > wrote: >> >> On 08/18/2016 04:54 PM, william.c.robe...@intel.com > wrote: >> > From: William Roberts

Re: [PATCH 2/2] libsepol: port str_read from kernel

2016-08-19 Thread William Roberts
On Aug 19, 2016 06:12, "Stephen Smalley" wrote: > > On 08/18/2016 04:54 PM, william.c.robe...@intel.com wrote: > > From: William Roberts > > > > Rather than duplicating the following sequence: > > 1. Read len from file > > 2. alloc up space based

Re: [PATCH 2/2] libsepol: port str_read from kernel

2016-08-19 Thread Stephen Smalley
On 08/18/2016 04:54 PM, william.c.robe...@intel.com wrote: > From: William Roberts > > Rather than duplicating the following sequence: > 1. Read len from file > 2. alloc up space based on 1 > 3. read the contents into the buffer from 2 > 4. null terminate the buffer

[PATCH 2/2] libsepol: port str_read from kernel

2016-08-18 Thread william . c . roberts
From: William Roberts Rather than duplicating the following sequence: 1. Read len from file 2. alloc up space based on 1 3. read the contents into the buffer from 2 4. null terminate the buffer from 2 Use the str_read() function that is in the kernel, which