delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT 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 AT nexgo DOT de> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: ssh-host-config script sends /etc/passwd thru awk |
References: | <4C148215-468D-469D-8060-B2010DF5E9A9 AT etr-usa DOT com> <20150217230230 DOT GH8493 AT calimero DOT vinschen DOT de> <62DA4A6B-8BA1-4676-B88F-42F6A3707AAD AT etr-usa DOT com> <20150218100809 DOT GK8493 AT calimero DOT vinschen DOT de> <87k2zf1lbc DOT fsf AT Rainer DOT invalid> <20150218130152 DOT GO8493 AT calimero DOT vinschen DOT 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 |
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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |