This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ssh-host-config script sends /etc/passwd thru awk


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]