Re: [PATCH 1/3] libsepol: validate default type of transition is not an attribute

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

 



On Wed, Nov 1, 2023 at 12:39 PM Christian Göttsche
<cgzones@xxxxxxxxxxxxxx> wrote:
>
> The default type of a type transition must be a regular type, not an
> attribute.
>
> Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx>
> ---
>  libsepol/src/policydb_validate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libsepol/src/policydb_validate.c b/libsepol/src/policydb_validate.c
> index 892a0ffd..d214bf09 100644
> --- a/libsepol/src/policydb_validate.c
> +++ b/libsepol/src/policydb_validate.c
> @@ -1105,7 +1105,7 @@ static int validate_filename_trans(hashtab_key_t k, hashtab_datum_t d, void *arg
>         for (; ftd; ftd = ftd->next) {
>                 if (validate_ebitmap(&ftd->stypes, &flavors[SYM_TYPES]))
>                         goto bad;
> -               if (validate_value(ftd->otype, &flavors[SYM_TYPES]))
> +               if (validate_simpletype(ftd->otype, &flavors[SYM_TYPES]))

You are missing an argument. validate_simpletype() takes three
arguments. The 2nd one should be the policydb.
Making the policydb available here is going to take a bit of work.

Jim



>                         goto bad;
>         }
>
> --
> 2.42.0
>




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

  Powered by Linux