All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dorinda" <dorindabassey@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] sanity.bbclass: verify that user isn't building in PSEUDO_IGNORE_PATHS
Date: Tue, 26 Jan 2021 00:00:48 +0100	[thread overview]
Message-ID: <CAJSnhzvCCAO+Km+Gr91s8wXBxeoP0axUE3Y0+66VESTRPq79+g@mail.gmail.com> (raw)
In-Reply-To: <20210125224808.20434-1-dorindabassey@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]

Apologies please disregard this code, the update I made against this patch
didn't reflect.

On Jan 25, 2021 23:48, "dorindabassey" <dorindabassey@gmail.com> wrote:

> added a check to ensure that a user isn't building in PSEUDO_IGNORE_PATHS
>
> Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
> ---
>  meta/classes/sanity.bbclass | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 2040b48595..78c0343f0d 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -703,6 +703,13 @@ def check_sanity_version_change(status, d):
>      if (tmpdirmode & stat.S_ISUID):
>          status.addresult("TMPDIR is setuid, please don't build in a
> setuid directory")
>
> +    # Check that user isn't building in PSEUDO_IGNORE_PATHS
> +    pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS',
> expand=True).split(",")
> +    workdir = d.getVar('WORKDIR', expand=True)
> +    for i in pseudoignorepaths:
> +        if workdir.startswith(i):
> +            status.addresult("you are building in a path under
> PSEUDO_IGNORE_PATHS, please remove this" + str(i) + "directory in \nParsed
> WORKDIR: " + str(workdir) + "\n")
> +
>      # Some third-party software apparently relies on chmod etc. being
> suid root (!!)
>      import stat
>      suid_check_bins = "chown chmod mknod".split()
> --
> 2.17.1
>
>

[-- Attachment #2: Type: text/html, Size: 1959 bytes --]

  reply	other threads:[~2021-01-25 23:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 22:48 [PATCH] sanity.bbclass: verify that user isn't building in PSEUDO_IGNORE_PATHS Dorinda
2021-01-25 23:00 ` Dorinda [this message]
2021-01-25 23:08 Dorinda
2021-01-26  0:53 Dorinda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJSnhzvCCAO+Km+Gr91s8wXBxeoP0axUE3Y0+66VESTRPq79+g@mail.gmail.com \
    --to=dorindabassey@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.