[PATCH 1/2] cygheap_pwdgrp: Don't invent undocumented defaults in nsswitch.conf

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH 1/2] cygheap_pwdgrp: Don't invent undocumented defaults in nsswitch.conf

cygwin-patches mailing list
---
 winsup/cygwin/uinfo.cc | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 57d90189d3..227faa4248 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -831,12 +831,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;
--
2.26.1.windows.1

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH 1/2] cygheap_pwdgrp: Don't invent undocumented defaults in nsswitch.conf

Corinna Vinschen-2
On Apr 17 11:30, David Macek via Cygwin-patches wrote:

> ---
>  winsup/cygwin/uinfo.cc | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
> index 57d90189d3..227faa4248 100644
> --- a/winsup/cygwin/uinfo.cc
> +++ b/winsup/cygwin/uinfo.cc
> @@ -831,12 +831,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;
> --
> 2.26.1.windows.1
The defaults are not undocumented, see at least the source, uinfo.cc
line 629ff.  If I screwed that up somehow, the right patch is to make
sure the defaults are set right in cygheap_pwdgrp::init, rather than
removing the defaults altogether.  If it's really important, we can also
add the exact default settings to the docs.


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Maintainer

signature.asc (849 bytes) Download Attachment