From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 5A63C3870841; Wed, 22 Apr 2020 07:35:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5A63C3870841 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: accounts: Unify nsswitch.conf db_* defaults X-Act-Checkin: newlib-cygwin X-Git-Author: David Macek via Cygwin-patches X-Git-Refname: refs/heads/master X-Git-Oldrev: f47347716ceb3149321f941411e3abaf1b12970f X-Git-Newrev: d5add9ee5e5e6e5dca97bc6061f427407c006de0 Message-Id: <20200422073518.5A63C3870841@sourceware.org> Date: Wed, 22 Apr 2020 07:35:18 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 07:35:18 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d5add9ee5e5e6e5dca97bc6061f427407c006de0 commit d5add9ee5e5e6e5dca97bc6061f427407c006de0 Author: David Macek via Cygwin-patches Date: Tue Apr 21 20:31:09 2020 +0200 Cygwin: accounts: Unify nsswitch.conf db_* defaults Signed-off-by: David Macek Diff: --- 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 57d90189d..2d5fc488b 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 528784568..a4c253098 100644 --- a/winsup/doc/ntsec.xml +++ b/winsup/doc/ntsec.xml @@ -1507,19 +1507,16 @@ of each schema when used with db_home: -As has been briefly mentioned before, the default setting for -db_home: is +db_home: defines no default schemata. If this setting is not +present in /etc/nsswitch.conf, the aforementioned fallback +takes over, which is equivalent to a /etc/nsswitch.conf +settting of db_home: /home/%U - -So by default, Cygwin just sets the home dir to -/home/$USERNAME. - - @@ -1590,8 +1587,10 @@ when used with db_shell: -As for db_home:, the default setting for -db_shell: is pretty much a constant +db_shell: defines no default schemata. If this setting is +not present in /etc/nsswitch.conf, the aforementioned +fallback takes over, which is equivalent to a +/etc/nsswitch.conf settting of @@ -1664,13 +1663,13 @@ The following list describes the meaning of each schema when used with Fallback If none of the schemes given for db_gecos: - define a non-empty pathname, nothing is added to + define a non-empty string, nothing is added to pw_gecos. -The default setting for db_gecos: is the empty string. +db_gecos: defines no default schemata.