All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maurizio Macrina <mmacrina@catchpoint.com>
To: "jonas.brich@bmw.de" <jonas.brich@bmw.de>,
	"yocto@lists.yoctoproject.org" <yocto@lists.yoctoproject.org>
Subject: Re: [yocto] meta-selinux: dunfell: libselinux: 0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch fails to apply
Date: Mon, 8 Nov 2021 13:13:00 +0000	[thread overview]
Message-ID: <CO6PR04MB777946FE72300248A7CAF659B2919@CO6PR04MB7779.namprd04.prod.outlook.com> (raw)
In-Reply-To: <CO6PR04MB7779052FDF100E8648E231DDB2919@CO6PR04MB7779.namprd04.prod.outlook.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 3184 bytes --]

Hello Jonas,
I’ve also recently hit an error during the do_patch task of libselinux.
001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch has been recently added to the dunfell branch but fails to apply:

ERROR: Applying patch '0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch' on target directory '/yocto/c2100-catchpoint-system-image/poky/build/tmp/work/core2-64-poky-linux/libselinux/3.0-r0/libselinux-3.0'
Command Error: 'quilt --quiltrc /yocto/c2100-catchpoint-system-image/poky/build/tmp/work/core2-64-poky-linux/libselinux/3.0-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0  Output:
Applying patch 0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch
can't find file to patch at input line 22
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|From 08f5e30177218fae7ce9f5c8d6856690126b2b30 Mon Sep 17 00:00:00 2001
|From: Ji Qin <jiqin.ji@huawei.com>
|Date: Sun, 14 Jun 2020 21:20:23 -0400
|Subject: [PATCH] libselinux: Fix NULL pointer use in
| selinux_restorecon_set_sehandle
|
|error occur when selinux_restorecon_default_handle return NULL in
|restorecon_init.
|
|fixes: https://github.com/SELinuxProject/selinux/issues/249
|
|Signed-off-by: Ji Qin <jiqin.ji@huawei.com>
|Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com>
|---
| libselinux/src/selinux_restorecon.c | 2 ++
| 1 file changed, 2 insertions(+)
|
|diff --git a/libselinux/src/selinux_restorecon.c b/libselinux/src/selinux_restorecon.c
|index d1ce830c5..6993be6fd 100644
|--- a/libselinux/src/selinux_restorecon.c
|+++ b/libselinux/src/selinux_restorecon.c
--------------------------
No file to patch.  Skipping patch.
1 out of 1 hunk ignored
Patch 0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch does not apply (enforce with -f)
DEBUG: Python function patch_do_patch finished
DEBUG: Python function do_patch finished

I’ve attached the corresponding log.

What would be the suggested fix for this?
I don’t think the leading a/b in the path is the issue here, other patch files have the same path.

Thanks.

Regards.

Maurizio Macrina
Senior Software Engineer  | Catchpoint
P:  +39 3472458541
E:  mmacrina@catchpoint.com<mailto:mmacrina@catchpoint.com>
www.catchpoint.com<https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.catchpoint.com%2F&data=04%7C01%7Cmmacrina%40catchpoint.com%7C98c1d709680945f4f57608d97cfbfa25%7C0c927d7e38e74a3fa4f2e746ec8a0842%7C0%7C0%7C637678243963406272%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2BSEn3zXyaFsuKgWdv%2F4Z8KLoARCfg8DWsQ6LNoWh%2F%2Bk%3D&reserved=0>

[cid464070800*image001.png@01D7AF12.EF411150]<https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.catchpoint.com%2Fsignature&data=04%7C01%7Cmmacrina%40catchpoint.com%7C98c1d709680945f4f57608d97cfbfa25%7C0c927d7e38e74a3fa4f2e746ec8a0842%7C0%7C0%7C637678243963416231%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=exWPtVUWOEYmXAFIm0F2uOvy2tO6wBDxRpz5cORxWpQ%3D&reserved=0>

[-- Attachment #1.1.2: Type: text/html, Size: 12574 bytes --]

[-- Attachment #1.2: image001.png --]
[-- Type: image/png, Size: 22092 bytes --]

[-- Attachment #2: log.tgz --]
[-- Type: application/x-compressed, Size: 1702 bytes --]

       reply	other threads:[~2021-11-08 13:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CO6PR04MB7779842C1CFE7614B311F0CAB2919@CO6PR04MB7779.namprd04.prod.outlook.com>
     [not found] ` <CO6PR04MB7779052FDF100E8648E231DDB2919@CO6PR04MB7779.namprd04.prod.outlook.com>
2021-11-08 13:13   ` Maurizio Macrina [this message]
2021-11-08 17:26     ` [yocto] meta-selinux: dunfell: libselinux: 0001-Fix-NULL-pointer-use-in-selinux_restorecon_set_sehandle.patch fails to apply Maurizio Macrina

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=CO6PR04MB777946FE72300248A7CAF659B2919@CO6PR04MB7779.namprd04.prod.outlook.com \
    --to=mmacrina@catchpoint.com \
    --cc=jonas.brich@bmw.de \
    --cc=yocto@lists.yoctoproject.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.