From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] ptxd_install_resolve_usr_grp: skip empty params.
Date: Thu, 25 Oct 2018 18:09:07 +0200 [thread overview]
Message-ID: <20181025160907.f2m2l3gofskajqxq@pengutronix.de> (raw)
In-Reply-To: <4e870bff-4260-b2a3-308a-5214faca6081@wago.com>
Hi,
On Thu, Oct 25, 2018 at 10:00:26AM +0000, Andrej.Gantvorg@wago.com wrote:
> just wanted to ask whether you have already had an opportunity to have a
> look at this one?
It fell through the cracks on my end. Thanks for the reminder.
> Am 05.10.2018 um 11:26 schrieb Andrej.Gantvorg@wago.com:
> > Empty parameters may be passed i.e. when calling install_archive with
> > UID/GID set to '-'. According to documentation this should preserve the
> > owner/group stored in the archive. Without this patch, empty strings are
> > mapped to the first entry in /etc/{passwd,group} (usually 0) instead,
> > thus breaking the documented behaviour.
> >
> > Signed-off-by: Andrej Gantvorg <andrej.gantvorg@wago.com>
> > ---
The white-spaces are broken in this patch, so it does not apply. Maybe send
it as an attachment instead.
> > scripts/lib/ptxd_make_xpkg_pkg.sh | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh
> > b/scripts/lib/ptxd_make_xpkg_pkg.sh
> > index b3f2f20f3..0ec1c9b2a 100644
> > --- a/scripts/lib/ptxd_make_xpkg_pkg.sh
> > +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
> > @@ -79,12 +79,12 @@ export -f ptxd_install_getent_id
> > # convert usr/grp that contain names into numeric values
> > #
> > ptxd_install_resolve_usr_grp() {
> > - if ! [ 0 -le $usr ] 2>/dev/null; then
> > + if ! [ 0 -le "$usr" ] 2>/dev/null && ! [ -z "$usr" ] ; then
if [ -n "$usr" ] && ...
> > ptxd_install_getent_id usr || return
> > else
> > unset usr_name
> > fi
> > - if ! [ 0 -le $grp ] 2>/dev/null; then
> > + if ! [ 0 -le "$grp" ] 2>/dev/null && ! [ -z "$grp" ] ; then
same here.
Michael
> > ptxd_install_getent_id grp || return
> > else
> > unset grp_name
> >
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2018-10-25 16:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 9:26 [ptxdist] [PTXDIST] " Andrej.Gantvorg
2018-10-25 10:00 ` [ptxdist] " Andrej.Gantvorg
2018-10-25 16:09 ` Michael Olbrich [this message]
2018-10-26 9:34 ` Andrej.Gantvorg
2018-10-26 9:43 ` Michael Olbrich
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=20181025160907.f2m2l3gofskajqxq@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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