SELinux Archive on lore.kernel.org
 help / Atom feed
* [PATCH] python/sepolicy: search() also for dontaudit rules
@ 2018-12-12 15:28 Petr Lautrbach
  2018-12-15 15:28 ` Nicolas Iooss
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Lautrbach @ 2018-12-12 15:28 UTC (permalink / raw)
  To: selinux; +Cc: Petr Lautrbach

dontaudit rules were accidentally dropped during rewrite to SETools 4 API in
97d5f6a2

Fixes:
>>> import sepolicy
>>> sepolicy.search(['dontaudit'])
[]

Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
---

Same patch as https://lore.kernel.org/selinux/20180918134401.22956-1-plautrba@redhat.com/
but with a slightly reworded commit message

 python/sepolicy/sepolicy/__init__.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py
index cd7af7cf..fbeb731d 100644
--- a/python/sepolicy/sepolicy/__init__.py
+++ b/python/sepolicy/sepolicy/__init__.py
@@ -344,6 +344,8 @@ def search(types, seinfo=None):
         tertypes.append(NEVERALLOW)
     if AUDITALLOW in types:
         tertypes.append(AUDITALLOW)
+    if DONTAUDIT in types:
+        tertypes.append(DONTAUDIT)
 
     if len(tertypes) > 0:
         q = setools.TERuleQuery(_pol,
-- 
2.19.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] python/sepolicy: search() also for dontaudit rules
  2018-12-12 15:28 [PATCH] python/sepolicy: search() also for dontaudit rules Petr Lautrbach
@ 2018-12-15 15:28 ` Nicolas Iooss
  2018-12-18 12:24   ` Petr Lautrbach
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Iooss @ 2018-12-15 15:28 UTC (permalink / raw)
  To: Petr Lautrbach; +Cc: selinux

On Wed, Dec 12, 2018 at 4:28 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>
> dontaudit rules were accidentally dropped during rewrite to SETools 4 API in
> 97d5f6a2
>
> Fixes:
> >>> import sepolicy
> >>> sepolicy.search(['dontaudit'])
> []
>
> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>

Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>

> ---
>
> Same patch as https://lore.kernel.org/selinux/20180918134401.22956-1-plautrba@redhat.com/
> but with a slightly reworded commit message
>
>  python/sepolicy/sepolicy/__init__.py | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py
> index cd7af7cf..fbeb731d 100644
> --- a/python/sepolicy/sepolicy/__init__.py
> +++ b/python/sepolicy/sepolicy/__init__.py
> @@ -344,6 +344,8 @@ def search(types, seinfo=None):
>          tertypes.append(NEVERALLOW)
>      if AUDITALLOW in types:
>          tertypes.append(AUDITALLOW)
> +    if DONTAUDIT in types:
> +        tertypes.append(DONTAUDIT)
>
>      if len(tertypes) > 0:
>          q = setools.TERuleQuery(_pol,
> --
> 2.19.2
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] python/sepolicy: search() also for dontaudit rules
  2018-12-15 15:28 ` Nicolas Iooss
@ 2018-12-18 12:24   ` Petr Lautrbach
  0 siblings, 0 replies; 3+ messages in thread
From: Petr Lautrbach @ 2018-12-18 12:24 UTC (permalink / raw)
  To: Nicolas Iooss; +Cc: selinux

Nicolas Iooss <nicolas.iooss@m4x.org> writes:

> On Wed, Dec 12, 2018 at 4:28 PM Petr Lautrbach <plautrba@redhat.com> wrote:
>>
>> dontaudit rules were accidentally dropped during rewrite to SETools 4 API in
>> 97d5f6a2
>>
>> Fixes:
>> >>> import sepolicy
>> >>> sepolicy.search(['dontaudit'])
>> []
>>
>> Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
>
> Acked-by: Nicolas Iooss <nicolas.iooss@m4x.org>
>

Merged.

>> ---
>>
>> Same patch as https://lore.kernel.org/selinux/20180918134401.22956-1-plautrba@redhat.com/
>> but with a slightly reworded commit message
>>
>>  python/sepolicy/sepolicy/__init__.py | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/python/sepolicy/sepolicy/__init__.py b/python/sepolicy/sepolicy/__init__.py
>> index cd7af7cf..fbeb731d 100644
>> --- a/python/sepolicy/sepolicy/__init__.py
>> +++ b/python/sepolicy/sepolicy/__init__.py
>> @@ -344,6 +344,8 @@ def search(types, seinfo=None):
>>          tertypes.append(NEVERALLOW)
>>      if AUDITALLOW in types:
>>          tertypes.append(AUDITALLOW)
>> +    if DONTAUDIT in types:
>> +        tertypes.append(DONTAUDIT)
>>
>>      if len(tertypes) > 0:
>>          q = setools.TERuleQuery(_pol,
>> --
>> 2.19.2
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-12 15:28 [PATCH] python/sepolicy: search() also for dontaudit rules Petr Lautrbach
2018-12-15 15:28 ` Nicolas Iooss
2018-12-18 12:24   ` Petr Lautrbach

SELinux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux/0 selinux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux selinux/ https://lore.kernel.org/selinux \
		selinux@vger.kernel.org selinux@archiver.kernel.org
	public-inbox-index selinux


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux


AGPL code for this site: git clone https://public-inbox.org/ public-inbox