This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: ssh-host-config script sends /etc/passwd thru awk
- From: Achim Gratz <Stromeko at nexgo dot de>
- To: cygwin at cygwin dot com
- Date: Wed, 18 Feb 2015 14:15:14 +0100
- Subject: Re: ssh-host-config script sends /etc/passwd thru awk
- Authentication-results: sourceware.org; auth=none
- 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>
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