Subject: Re: Unpriviledged installs (was Re: CVS commit: sharesrc)
To: Michael Richardson <>
From: Simon Burge <>
List: tech-install
Date: 08/16/1999 11:58:48
Michael Richardson wrote:

> >>>>> "Simon" == Simon Burge <> writes:
>     Simon> In and "${INSTALL} ${RENAME} ${PRESERVE}" has
>     Simon> changed to "${INSTALL} ${PRESERVE}".  Is there a reason for this?  The
>     Simon> other files seem ok.
>   This is a mistake. What is the intended purpose of ${RENAME}, btw.
>     Simon> That said, wouldn't it be easier to use the -U option of install?  I'm
>     Simon> pretty sure that -U came well after PR #3563.  From the install(1)
>     Simon> manpage:
>   This is new. Yes, it would be better. As such, I withdraw my patches.
>     Simon>      -U      Indicate that install is running unpriviledged, and that it
>     Simon>              should not try to change the owner or the group of the destina-
>     Simon>              tion.  A future version of this file may log the owner/group in-
>     Simon>              formation elsewhere; currently, it's just discarded.
>     Simon> Then we could just stick
>     Simon> 	UNPRIVILEDGED?=
>     Simon> in and use that on all the install commands...
>   Yes, please!
>   Do you want me to do these patches?

I think there's a slightly better way of doing this.  In bsd.README:

	UNPRIVILEDGED   If defined, don't set the owner/group/mode when installing
			files or directories (incomplete).

and then in <>

	.if defined(UNPRIVILEDGED)
	INSTPRIV?=      -U

and use ${INSTPRIV} in the ${INSTALL} lines.  This was UNPRIVILEDGED can
be used to tweak a class of things (mtree comes to mind - I'll look at
that next).

Sound good?