[PATCH 0/3] git-clone fails when current user is not in /etc/passwd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 10, 2015 at 03:40:35PM -0500, Jeff King wrote:

> > All true.  The adding of "(none)" in add_domainname() I used as an
> > excuse to make the function stop barfing is a symptom coming from
> > the above.  That one should die when asked to do a strict thing
> > (there is a corresponding kludge to do strstr "(none)" to cover it
> > up, which is even uglier X-<).
> 
> Yes, I have always hated that. It seems like we should just be able to
> carry a "strict" flag (both from xgetpwuid() and from the "(none)" hack)
> along with ident_default_*, and barf at the right time if it is not set.

I don't think we want to pass down a "be strict" flag to the low-level
code filling in default_{name,email}. We might be strict in one call,
and non-strict in another within the same program. Worse, we actually
call ident_default_name() even when we don't actually want the name (we
could fix that, too, but it just adds more cases to the code).

So here's my solution, which instead carries the "is it bogus" flag
along with the default strings.

  [1/3]: ident: make xgetpwuid_self() a static local helper
  [2/3]: ident: keep a flag for bogus default_email
  [3/3]: ident: loosen getpwuid error in non-strict mode

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]