Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread William Roberts
On Wed, May 17, 2017 at 10:00 AM, Sebastien Buisson wrote: > 2017-05-17 18:04 GMT+02:00 William Roberts : >> I'm assuming in the Lustre code you're going to call security_policy_brief(), >> how would the caller know how big that buffer is going to be? > > We can determine it at configure time for

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread Sebastien Buisson
2017-05-17 18:04 GMT+02:00 William Roberts : > I'm assuming in the Lustre code you're going to call security_policy_brief(), > how would the caller know how big that buffer is going to be? We can determine it at configure time for instance, given that len as an output parameter would give the size

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread William Roberts
On Wed, May 17, 2017 at 9:04 AM, William Roberts wrote: > On Wed, May 17, 2017 at 8:43 AM, Sebastien Buisson > wrote: >> 2017-05-17 17:34 GMT+02:00 William Roberts : >>> Is there a particular reason to not just return policybrief_len here as >>> well, for consistency in the interface? Ho

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread William Roberts
On Wed, May 17, 2017 at 8:43 AM, Sebastien Buisson wrote: > 2017-05-17 17:34 GMT+02:00 William Roberts : >> Is there a particular reason to not just return policybrief_len here as >> well, for consistency in the interface? How do you intend to use this >> value in the caller? > >>

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread Sebastien Buisson
2017-05-17 17:34 GMT+02:00 William Roberts : > Is there a particular reason to not just return policybrief_len here as > well, for consistency in the interface? How do you intend to use this > value in the caller? As called in the other patch to expose policy brief via selinu

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread Stephen Smalley
On Wed, 2017-05-17 at 16:59 +0200, Sebastien Buisson wrote: > 2017-05-16 22:40 GMT+02:00 Stephen Smalley : > > > + strcpy(*brief, policydb.policybrief); > > > + /* *len is the length of the output string */ > > > + *len = policybrief_len - 1; > > > > Is there a particular reason to not

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread William Roberts
On Wed, May 17, 2017 at 8:24 AM, Sebastien Buisson wrote: > 2017-05-17 17:09 GMT+02:00 William Roberts : >> On Wed, May 17, 2017 at 7:59 AM, Sebastien Buisson >> wrote: >>> 2017-05-16 22:40 GMT+02:00 Stephen Smalley : > + strcpy(*brief, policydb.policybrief); > + /* *len is the le

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread Sebastien Buisson
2017-05-17 17:09 GMT+02:00 William Roberts : > On Wed, May 17, 2017 at 7:59 AM, Sebastien Buisson > wrote: >> 2017-05-16 22:40 GMT+02:00 Stephen Smalley : + strcpy(*brief, policydb.policybrief); + /* *len is the length of the output string */ + *len = policybrief_len - 1

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread William Roberts
On Wed, May 17, 2017 at 7:59 AM, Sebastien Buisson wrote: > 2017-05-16 22:40 GMT+02:00 Stephen Smalley : >>> + strcpy(*brief, policydb.policybrief); >>> + /* *len is the length of the output string */ >>> + *len = policybrief_len - 1; >> >> Is there a particular reason to not just retu

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-17 Thread Sebastien Buisson
2017-05-16 22:40 GMT+02:00 Stephen Smalley : >> + strcpy(*brief, policydb.policybrief); >> + /* *len is the length of the output string */ >> + *len = policybrief_len - 1; > > Is there a particular reason to not just return policybrief_len here as > well, for consistency in the interfac

Re: [PATCH v5 1/2] selinux: add brief info to policydb

2017-05-16 Thread Stephen Smalley
On Tue, 2017-05-16 at 18:51 +0900, Sebastien Buisson wrote: > Add policybrief field to struct policydb. It holds a brief info > of the policydb, made of colon separated name and value pairs > that give information about how the policy is applied in the > security module(s). > Note that the ordering

[PATCH v5 1/2] selinux: add brief info to policydb

2017-05-16 Thread Sebastien Buisson
Add policybrief field to struct policydb. It holds a brief info of the policydb, made of colon separated name and value pairs that give information about how the policy is applied in the security module(s). Note that the ordering of the fields in the string may change. Policy brief is computed eve