Re: [PATCH] selinux: declare read-only parameters const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 30, 2022 at 11:53 AM Christian Göttsche
<cgzones@xxxxxxxxxxxxxx> wrote:
>
> Declare ebitmap, mls_level and mls_context parameters const where they
> are only read from.  This allows callers to supply pointers to const
> as arguments and increases readability.
>
> Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
> ---
> This patch is similar to userspace commits ("libsepol: mark read-only
> parameters of ebitmap interfaces const") [1] and ("libsepol: mark
> immutable mls and context parameter const") [2].
> Pointers to const are for example used in the (for now userspace only)
> policy validation code.
>
> [1]: https://github.com/SELinuxProject/selinux/commit/390ec54d278a14d9c29b80cc4fc5cb9ba504ed13
> [2]: https://github.com/SELinuxProject/selinux/commit/6359946633507db1d98b24638cf22eb5afdcd272
> ---
>  security/selinux/ss/context.h   | 17 +++++++++--------
>  security/selinux/ss/ebitmap.c   | 21 +++++++++++----------
>  security/selinux/ss/ebitmap.h   | 18 +++++++++---------
>  security/selinux/ss/mls_types.h |  4 ++--
>  4 files changed, 31 insertions(+), 29 deletions(-)

Merged into selinux/next, thanks!

-- 
paul-moore.com




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux