X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:references:date:in-reply-to
	:message-id:mime-version:content-type:content-transfer-encoding;
	 q=dns; s=default; b=VaQTYn7g1xl3evSNAhbUL/A/2d5j9qIW0vvzhZ82bv3
	eBG7CLkaib5zBOJ43MDTYDgg3PqSlBmgXDjePI/GVUrfPaqr7rNHGGt4Xjcy1228
	0A3Yz5MN9vhEBBTsCfdG2vDsgfVSeR+8m/RqUMzTTdbTGMXNyC+0KLo/Cq/+GDc8
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:from:to:subject:references:date:in-reply-to
	:message-id:mime-version:content-type:content-transfer-encoding;
	 s=default; bh=MbVc58BTBkN7764PwhIt6hoR1QI=; b=Rm486s40B9Syc0kki
	W6v98ChGfcptTIGMPuXBA/QvPIVUdIeAriUKyD3KCDJXvfoAgeU/5H6L9mkB0I2H
	CsssAnM/3d/4wEdswY7fhEhUK39N5in6Z1YXo4XVz5KQjVbJb9r5IudYhiPFZG1m
	0M5D9imlHhyvrVfTYWseuN6fXA=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-in-10.arcor-online.net
X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-14.arcor-online.net 3knKKZ5wVsz4nSC
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin@cygwin.com
Subject: Re: ssh-host-config script sends /etc/passwd thru awk
References: <4C148215-468D-469D-8060-B2010DF5E9A9@etr-usa.com>	<20150217230230.GH8493@calimero.vinschen.de>	<62DA4A6B-8BA1-4676-B88F-42F6A3707AAD@etr-usa.com>	<20150218100809.GK8493@calimero.vinschen.de>	<87k2zf1lbc.fsf@Rainer.invalid>	<20150218130152.GO8493@calimero.vinschen.de>
Date: Wed, 18 Feb 2015 14:15:14 +0100
In-Reply-To: <20150218130152.GO8493@calimero.vinschen.de> (Corinna Vinschen's	message of "Wed, 18 Feb 2015 14:01:52 +0100")
Message-ID: <8761az1hul.fsf@Rainer.invalid>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t1IDFVMH008145

Corinna Vinschen writes:
>> +  csih_old_cygwin ; use_file=$?
>>    if [ ${use_file} -ne 0 -a -f /etc/nsswitch.conf ]
>>    then
>> -    grep -Eq "^${file}:[^#]*\<db\>" /etc/nsswitch.conf || use_file=0
>> +    grep -Eq "^${file}:" /etc/nsswitch.conf &&
>> +      grep -Eq "^${file}:[^#]*\<db\>" /etc/nsswitch.conf ||
>> +       use_file=0
>
> And here, the test for the version is moved into the csih_old_cygwin
> function.  So far, so good, but... in how far does this change the
> result of csih_use_file_etc?!?  Assuming the expression has a bug,
> wouldn't this still be the case, and the mkpasswd calls in
> csih_create_privileged_user and csih_create_unprivileged_user
> would still write the entry to /etc/passwd?
>
> Can you explain what I'm missing?

The old test wrote to /etc/{passwd,group} when use_file!=1,
/etc/nsswitch.conf existed and did not have a line for either passwd or
group or if that line had no "db" on it.  If the line is missing
altogether, then files should still not be used since the default is
"files db", only when the line exists and omits "db".  I think…


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


