From: Dave Chinner <david@fromorbit.com>
To: b19537@freescale.com
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] xfsprogs: use uid/gid instead of actual name to fix install issue
Date: Fri, 23 Dec 2011 21:01:35 +1100 [thread overview]
Message-ID: <20111223100135.GA12731@dastard> (raw)
In-Reply-To: <1324623173-32707-1-git-send-email-b19537@freescale.com>
On Fri, Dec 23, 2011 at 02:52:53PM +0800, b19537@freescale.com wrote:
> From: Zhenhua Luo <b19537@freescale.com>
>
> > when running install-sh during the install process, following
> error might appear:
> > ../../install-sh -o bj -g bj -m 644 -T so_dot_version libhandle.lai /lib; ../../install-sh -o bj -g bj -T so_dot_current libhandle.lai /lib
> > chown: invalid user: `bj:bj'
> > chown: invalid user: `bj:bj'
> > Installing libdisk-install
> > make[1]: Nothing to be done for `install'.
> > Installing copy-install
> > ../install-sh -o bj -g bj -m 755 -d /usr/sbin
> > chown: invalid user: `bj:bj'
> > make[1]: *** [install] Error 1
> > make: *** [copy-install] Error 2
>
> Signed-off-by: Zhenhua Luo <b19537@freescale.com>
> ---
> include/install-sh | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/install-sh b/include/install-sh
> index 18c051f..9d8ff06 100755
> --- a/include/install-sh
> +++ b/include/install-sh
> @@ -105,10 +105,10 @@ do
> c)
> ;;
> g)
> - GROUP=$OPTARG
> + GROUP=`id -g $OPTARG`
> ;;
> o)
> - OWNER=$OPTARG
> + OWNER=`id -u $OPTARG`
> ;;
> m)
> DIRMODE=`expr $OPTARG`
How does this fix the the problem that the user/group "bj" does
not exist?
$ id -g bj
id: bj: No such user
$ id -g bj 2> /dev/null
$
All this patch does is result in a OWNER/GROUP variable that is
empty when an invalid user/group is specified. Hence it will make
the install complete with a different user to the one specified in
the install command line. It should error out (like it does now) if
a user/group does not exist, not install as some other (unknown)
user.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-12-23 10:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-23 6:52 [PATCH] xfsprogs: use uid/gid instead of actual name to fix install issue b19537
2011-12-23 10:01 ` Dave Chinner [this message]
2011-12-23 14:20 ` Luo Zhenhua-B19537
2011-12-23 21:08 ` Dave Chinner
2011-12-26 3:39 ` Luo Zhenhua-B19537
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=20111223100135.GA12731@dastard \
--to=david@fromorbit.com \
--cc=b19537@freescale.com \
--cc=xfs@oss.sgi.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 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.