Junio C Hamano wrote:
Later exchanges between you and HPA appeared to me that we would
need a chroot environment which has "enough stuff" and that this
patch may not help him very much. Am I mistaken?
Well, building a chroot environment which supports execing is a bit of a
pain, but it's fully doable. mount --bind especially makes that quite
feasible. It's just more work.
I think resolving user and group to numeric before you do
chroot() might make the setting up of chrooted environment a
little simpler; no need for supporting getpwnam and getgrnam
there. On the other hand it may not matter -- you can always
give numeric uid/gid to begin with.
Yes, resolve the username first.
-hpa