* [PATCH 1/3 v3] Cygwin: accounts: Unify nsswitch.conf db_* defaults
@ 2020-04-21 18:31 David Macek
2020-04-22 7:36 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: David Macek @ 2020-04-21 18:31 UTC (permalink / raw)
To: cygwin-patches
Signed-off-by: David Macek <david.macek.0@gmail.com>
---
winsup/cygwin/uinfo.cc | 11 +----------
winsup/doc/ntsec.xml | 21 ++++++++++-----------
2 files changed, 11 insertions(+), 21 deletions(-)
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 57d90189d3..2d5fc488bb 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -626,15 +626,12 @@ cygheap_pwdgrp::init ()
grp_cache.cygserver.init_grp ();
grp_cache.file.init_grp ();
grp_cache.win.init_grp ();
- /* Default settings:
+ /* Default settings (excluding fallbacks):
passwd: files db
group: files db
db_prefix: auto DISABLED
db_separator: + DISABLED
- db_home: cygwin desc
- db_shell: cygwin desc
- db_gecos: cygwin desc
db_enum: cache builtin
*/
pwd_src = (NSS_SRC_FILES | NSS_SRC_DB);
@@ -831,12 +828,6 @@ cygheap_pwdgrp::nss_init_line (const char *line)
c += strspn (c, " \t");
++idx;
}
- /* If nothing has been set, revert to default. */
- if (scheme[0].method == NSS_SCHEME_FALLBACK)
- {
- scheme[0].method = NSS_SCHEME_CYGWIN;
- scheme[1].method = NSS_SCHEME_DESC;
- }
}
}
break;
diff --git a/winsup/doc/ntsec.xml b/winsup/doc/ntsec.xml
index 5287845686..a4c253098d 100644
--- a/winsup/doc/ntsec.xml
+++ b/winsup/doc/ntsec.xml
@@ -1507,19 +1507,16 @@ of each schema when used with <literal>db_home:</literal>
</variablelist>
<para>
-As has been briefly mentioned before, the default setting for
-<literal>db_home:</literal> is
+<literal>db_home:</literal> defines no default schemata. If this setting is not
+present in <filename>/etc/nsswitch.conf</filename>, the aforementioned fallback
+takes over, which is equivalent to a <filename>/etc/nsswitch.conf</filename>
+settting of
</para>
<screen>
db_home: /home/%U
</screen>
-<para>
-So by default, Cygwin just sets the home dir to
-<filename>/home/$USERNAME</filename>.
-</para>
-
</sect4>
<sect4 id="ntsec-mapping-nsswitch-shell">
@@ -1590,8 +1587,10 @@ when used with <literal>db_shell:</literal>
</variablelist>
<para>
-As for <literal>db_home:</literal>, the default setting for
-<literal>db_shell:</literal> is pretty much a constant
+<literal>db_shell:</literal> defines no default schemata. If this setting is
+not present in <filename>/etc/nsswitch.conf</filename>, the aforementioned
+fallback takes over, which is equivalent to a
+<filename>/etc/nsswitch.conf</filename> settting of
</para>
<screen>
@@ -1664,13 +1663,13 @@ The following list describes the meaning of each schema when used with
<varlistentry>
<term>Fallback</term>
<listitem>If none of the schemes given for <literal>db_gecos:</literal>
- define a non-empty pathname, nothing is added to
+ define a non-empty string, nothing is added to
<literal>pw_gecos</literal>.</listitem>
</varlistentry>
</variablelist>
<para>
-The default setting for <literal>db_gecos:</literal> is the empty string.
+<literal>db_gecos:</literal> defines no default schemata.
</para>
</sect4>
--
2.26.1.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3 v3] Cygwin: accounts: Unify nsswitch.conf db_* defaults
2020-04-21 18:31 [PATCH 1/3 v3] Cygwin: accounts: Unify nsswitch.conf db_* defaults David Macek
@ 2020-04-22 7:36 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2020-04-22 7:36 UTC (permalink / raw)
To: cygwin-patches
On Apr 21 20:31, David Macek via Cygwin-patches wrote:
> Signed-off-by: David Macek <david.macek.0@gmail.com>
> ---
> winsup/cygwin/uinfo.cc | 11 +----------
> winsup/doc/ntsec.xml | 21 ++++++++++-----------
> 2 files changed, 11 insertions(+), 21 deletions(-)
Thanks, all patches pushed.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-22 7:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 18:31 [PATCH 1/3 v3] Cygwin: accounts: Unify nsswitch.conf db_* defaults David Macek
2020-04-22 7:36 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).