Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-11 Thread Ahmed S. Darwish
Hi Pavel, On Nov 11, 2007 2:44 PM, Pavel Machek <[EMAIL PROTECTED]> wrote: > Hi! > > > > A Smack Rule in an "egrep" format is: > > > > > > "^[:space:]*Subject[:space:]+Object[:space:]+[rwxaRWXA-]+[:space:]*\n" > > Perhaps you should make it space, not 'space or tab', and only allow > lowercase

Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-11 Thread Pavel Machek
Hi! > > A Smack Rule in an "egrep" format is: > > > > "^[:space:]*Subject[:space:]+Object[:space:]+[rwxaRWXA-]+[:space:]*\n" Perhaps you should make it space, not 'space or tab', and only allow lowercase permissions? That way, parser will be slightly simpler, and you'll still have a chance to

Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-11 Thread Pavel Machek
Hi! A Smack Rule in an egrep format is: ^[:space:]*Subject[:space:]+Object[:space:]+[rwxaRWXA-]+[:space:]*\n Perhaps you should make it space, not 'space or tab', and only allow lowercase permissions? That way, parser will be slightly simpler, and you'll still have a chance to use 'R' as

Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-11 Thread Ahmed S. Darwish
Hi Pavel, On Nov 11, 2007 2:44 PM, Pavel Machek [EMAIL PROTECTED] wrote: Hi! A Smack Rule in an egrep format is: ^[:space:]*Subject[:space:]+Object[:space:]+[rwxaRWXA-]+[:space:]*\n Perhaps you should make it space, not 'space or tab', and only allow lowercase permissions? That way,

Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-10 Thread Ahmed S. Darwish
On Nov 10, 2007 7:05 PM, Jakob Oestergaard <[EMAIL PROTECTED]> wrote: > ... > > I've double-checked the code for any possible off-by-one/overflow > > errors. > ... > > Two things caught my eye. > > ... > > + case bol: > > + case subject: > > + if

Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-10 Thread Jakob Oestergaard
... > I've double-checked the code for any possible off-by-one/overflow > errors. ... Two things caught my eye. ... > + case bol: > + case subject: > + if (*label_len >= SMK_MAXLEN) > + goto out; > +

Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-10 Thread Jakob Oestergaard
... I've double-checked the code for any possible off-by-one/overflow errors. ... Two things caught my eye. ... + case bol: + case subject: + if (*label_len = SMK_MAXLEN) + goto out; +

Re: [PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-10 Thread Ahmed S. Darwish
On Nov 10, 2007 7:05 PM, Jakob Oestergaard [EMAIL PROTECTED] wrote: ... I've double-checked the code for any possible off-by-one/overflow errors. ... Two things caught my eye. ... + case bol: + case subject: + if (*label_len = SMK_MAXLEN)

[PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-04 Thread Ahmed S. Darwish
On Sat, Nov 03, 2007 at 06:43:06PM +0200, Ahmed S. Darwish wrote: > On Fri, Nov 02, 2007 at 01:50:55PM -0700, Casey Schaufler wrote: > > > > Still to come: > > > > - Final cleanup of smack_load_write and smack_cipso_write. > > Hi All, > > After agreeing with Casey on the "load" input grammar

[PATCH] Smackv10: Smack rules grammar + their stateful parser(2)

2007-11-04 Thread Ahmed S. Darwish
On Sat, Nov 03, 2007 at 06:43:06PM +0200, Ahmed S. Darwish wrote: On Fri, Nov 02, 2007 at 01:50:55PM -0700, Casey Schaufler wrote: Still to come: - Final cleanup of smack_load_write and smack_cipso_write. Hi All, After agreeing with Casey on the load input grammar yesterday,