public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: "cedric.hombourger@siemens.com" <cedric.hombourger@siemens.com>,
	"isar-users@googlegroups.com" <isar-users@googlegroups.com>
Subject: Re: build failing with default umask changed from 0022 to 0077
Date: Fri, 27 Oct 2023 11:45:51 +0300	[thread overview]
Message-ID: <39eed26c97d9a6d426e6c5263f28ebba968431b5.camel@ilbers.de> (raw)
In-Reply-To: <PAWPR10MB71747431E98CC2544009EFE0FBDDA@PAWPR10MB7174.EURPRD10.PROD.OUTLOOK.COM>

On Thu, 2023-10-26 at 11:49 +0000, 'cedric.hombourger@siemens.com' via
isar-users wrote:
> Hello,
> 
> Some security measures require the default umask to be changed from
> 0022 to 0077
> 
> This causes Isar builds to fail as we often create files with default
> (unspecified) permissions and are switching between privileged (sudo)
> and regular accounts ($USER)
> 
> Would you like us to be fixing such problems?
> Should we instead recommend the user to umask 0022 prior to starting
> his build?
> 
> Thanks
> Cedric
> 

We were able to reproduce the issue. 

```
./kas/kas-container menu
./kas/kas-container shell
bitbake -v cowsay
```

I happens at least in two places:

1. When building any package packages (in sbuild internals):

```
...
W: Download is performed unsandboxed as root as file
'/var/lib/apt/lists/partial/_build_cowsay-DwkTEa_resolver-
fVeyau_apt%5farchive_._InRelease' couldn't be accessed by user '_apt'.
- pkgAcquire::Run (13: Permission denied)
...
dpkg-checkbuilddeps: error: cannot open /var/lib/dpkg/status:
Permission denied
dpkg-buildpackage: warning: (Use -d flag to override.)
...
```

2. When building the target image (do_copy_boot_files):
```
+ do_copy_boot_files
+ realpath -q /build/tmp/work/debian-bookworm-amd64/isar-image-base-
qemuamd64/1.0-r0/rootfs/vmlinu[xz]
WARNING: exit code 1 from a shell command.
```

These probably can be fixed, but I'm wondering if settings "0077" umask
is correct in general. Won't we receive some output image where some
dirs/files (that should be readable for all users) are not readable?




      reply	other threads:[~2023-10-27  8:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 11:49 cedric.hombourger
2023-10-27  8:45 ` Uladzimir Bely [this message]

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=39eed26c97d9a6d426e6c5263f28ebba968431b5.camel@ilbers.de \
    --to=ubely@ilbers.de \
    --cc=cedric.hombourger@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox