[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Thu Apr 22 18:49:01 UTC 2021


The branch, master has been updated
       via  993ae77fba4 Fix sigsegv in check_stream in smbtorture smb2.streams.io
       via  a72bc3e15d3 docs-xml: Update documentation for removal of NIS support
       via  29229021907 lib:replace: Remove NIS support
       via  edda7a329e5 s3:smbd: Remove NIS support
       via  622e84cfca4 s3:lib: Remove NIS support from substitute
       via  620de975f14 lib:util: Remove NIS support from string_match()
       via  e1a321e8a4e lib:texpect: Do not link against nsl
      from  34a6575ab95 samba-tool: Use s3 net join for member join

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 993ae77fba40f3758f0c1a66af687268c6e67e8c
Author: Gordon Ross <gordon.ross at tintri.com>
Date:   Mon Apr 19 18:31:13 2021 -0400

    Fix sigsegv in check_stream in smbtorture smb2.streams.io
    
    torture_comment calls need a struct torture_context arg,
    not its mem_ctx child.  Use talloc_parent().  Also
    need to call torture_result somewhere on failure.
    
    Signed-off-by: Gordon Ross <gordon.ross at tintri.com>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: David Mulder <dmulder at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Apr 22 18:48:30 UTC 2021 on sn-devel-184

commit a72bc3e15d3ed62e9ad2c0a97ce5d6d653abb048
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Apr 21 10:30:56 2021 +0200

    docs-xml: Update documentation for removal of NIS support
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 292290219072224e3c5a8a9294688c90d77a1dc3
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Apr 20 18:01:02 2021 +0200

    lib:replace: Remove NIS support
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit edda7a329e5bed442418de9782cec9f567092aae
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Apr 20 17:59:34 2021 +0200

    s3:smbd: Remove NIS support
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 622e84cfca474181960cc24163faa85aa71257c3
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Apr 21 10:22:29 2021 +0200

    s3:lib: Remove NIS support from substitute
    
    %N is often used to get the netbios name (local machine name). So we
    need to keep it.
    
    This is covered by samba.tests.s3passdb.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 620de975f147ac9427b51ea0e1e3eabda443d4b6
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Apr 20 17:53:49 2021 +0200

    lib:util: Remove NIS support from string_match()
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit e1a321e8a4ef4ebee3f01350173e71cd98e2d352
Author: Andreas Schneider <asn at samba.org>
Date:   Tue Apr 20 18:00:11 2021 +0200

    lib:texpect: Do not link against nsl
    
    I do not see what would use that in texpect.
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages/smb.conf.5.xml                   |  12 +-
 docs-xml/smbdotconf/misc/homedirmap.xml            |  28 ----
 docs-xml/smbdotconf/misc/nishomedir.xml            |  32 ----
 docs-xml/smbdotconf/protocol/nameresolveorder.xml  |   2 +-
 docs-xml/smbdotconf/security/hostsallow.xml        |   7 -
 docs-xml/smbdotconf/security/invalidusers.xml      |  15 +-
 docs-xml/smbdotconf/security/passwdchat.xml        |   7 +-
 docs-xml/smbdotconf/security/usernamemap.xml       |   5 -
 docs-xml/smbdotconf/security/usernamemapscript.xml |   2 +-
 docs-xml/smbdotconf/security/validusers.xml        |   7 +-
 docs-xml/smbdotconf/winbind/winbindseparator.xml   |   4 +-
 lib/replace/system/nis.h                           |  55 -------
 lib/replace/wscript                                |  11 --
 lib/texpect/wscript                                |   2 +-
 lib/util/access.c                                  |  54 -------
 lib/util/wscript_build                             |   2 +-
 selftest/target/Samba3.pm                          |   4 -
 source3/auth/user_util.c                           | 154 +++----------------
 source3/auth/wscript_build                         |   2 +-
 source3/include/includes.h                         |   4 -
 source3/lib/substitute.c                           | 133 ++---------------
 source3/lib/util.c                                 | 164 ---------------------
 source3/param/loadparm.c                           |   9 --
 source3/script/tests/test_smbclient_s3.sh          |  13 --
 source3/smbd/share_access.c                        |  21 +--
 source3/wscript                                    |   4 -
 source4/torture/smb2/streams.c                     |  43 ++++--
 27 files changed, 83 insertions(+), 713 deletions(-)
 delete mode 100644 docs-xml/smbdotconf/misc/homedirmap.xml
 delete mode 100644 docs-xml/smbdotconf/misc/nishomedir.xml
 delete mode 100644 lib/replace/system/nis.h


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/smb.conf.5.xml b/docs-xml/manpages/smb.conf.5.xml
index c4387187ecc..eb4bcba3ee5 100644
--- a/docs-xml/manpages/smb.conf.5.xml
+++ b/docs-xml/manpages/smb.conf.5.xml
@@ -625,17 +625,7 @@ chmod 1770 /usr/local/samba/lib/usershares
 
 		<varlistentry>
 		<term>%N</term>
-		<listitem><para>
-			the name of your NIS home directory server.  This is obtained from your NIS auto.map entry. 
-			If you have not compiled Samba with the <emphasis>--with-automount</emphasis> option, this
-			value will be the same as %L.</para></listitem>
-		</varlistentry>
-	
-		<varlistentry>
-		<term>%p</term>
-		<listitem><para>
-			the path of the service's home directory, obtained from your NIS auto.map entry. The NIS
-			auto.map entry is split up as <literal>%N:%p</literal>.</para></listitem>
+		<listitem><para>This value is the same as %L.</para></listitem>
 		</varlistentry>
 	</variablelist>
 	
diff --git a/docs-xml/smbdotconf/misc/homedirmap.xml b/docs-xml/smbdotconf/misc/homedirmap.xml
deleted file mode 100644
index ba70730860a..00000000000
--- a/docs-xml/smbdotconf/misc/homedirmap.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<samba:parameter name="homedir map"
-                 context="G"
-                 type="string"
-                 substitution="1"
-                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
- <description>
-	<para>
-	If <smbconfoption name="nis homedir"/> is <constant>yes</constant>, and <citerefentry><refentrytitle>smbd</refentrytitle>
-	<manvolnum>8</manvolnum></citerefentry> is also acting 	as a Win95/98 <parameter moreinfo="none">logon server</parameter> 
-	then this parameter specifies the NIS (or YP) map from which the server for the user's 	home directory should be extracted.  
-	At present, only the Sun auto.home map format is understood. The form of the map is:
-<programlisting>
-<command moreinfo="none">username server:/some/file/system</command>
-</programlisting>
-	and the program will extract the servername from before the first ':'.  There should probably be a better parsing system 
-	that copes with different map formats and also Amd (another automounter) maps.
-	</para>
-		
-	<note><para>
-	A working NIS client is required on the system for this option to work.
-	</para></note>
-</description>
-<related>nis homedir</related>
-<related>domain logons</related>
-
-<value type="default"></value>
-<value type="example">amd.homedir</value>
-</samba:parameter>
diff --git a/docs-xml/smbdotconf/misc/nishomedir.xml b/docs-xml/smbdotconf/misc/nishomedir.xml
deleted file mode 100644
index ace84759fb2..00000000000
--- a/docs-xml/smbdotconf/misc/nishomedir.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<samba:parameter name="NIS homedir"
-                 context="G"
-                 type="boolean"
-                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
-<description>
-	<para>Get the home share server from a NIS map. For 
-	UNIX systems that use an automounter, the user's home directory 
-	will often be mounted on a workstation on demand from a remote 
-	server. </para>
-
-	<para>When the Samba logon server is not the actual home directory 
-	server, but is mounting the home directories via NFS then two 
-	network hops would be required to access the users home directory 
-	if the logon server told the client to use itself as the SMB server 
-	for home directories (one over SMB and one over NFS). This can 
-	be very slow.</para>
-
-	<para>This option allows Samba to return the home share as 
-	being on a different server to the logon server and as 
-	long as a Samba daemon is running on the home directory server, 
-	it will be mounted on the Samba client directly from the directory 
-	server. When Samba is returning the home share to the client, it 
-	will consult the NIS map specified in
-	<smbconfoption name="homedir map"/> and return the server 
-	listed there.</para>
-
-	<para>Note that for this option to work there must be a working 
-	NIS system and the Samba server with this option must also 
-	be a logon server.</para>
-</description>
-<value type="default">no</value>
-</samba:parameter>
diff --git a/docs-xml/smbdotconf/protocol/nameresolveorder.xml b/docs-xml/smbdotconf/protocol/nameresolveorder.xml
index e29eabb87df..b85d060e7ce 100644
--- a/docs-xml/smbdotconf/protocol/nameresolveorder.xml
+++ b/docs-xml/smbdotconf/protocol/nameresolveorder.xml
@@ -26,7 +26,7 @@
 	<listitem>
 	    <para>
 		<constant>host</constant> : Do a standard host name to IP address resolution, using the system
-		<filename moreinfo="none">/etc/hosts </filename>, NIS, or DNS lookups. This method of name resolution is
+		<filename moreinfo="none">/etc/hosts </filename> or DNS lookups. This method of name resolution is
 		operating system depended for instance on IRIX or Solaris this may be controlled by the <filename
 		moreinfo="none">/etc/nsswitch.conf</filename> file.  Note that this method is used only if the NetBIOS name
 		type being queried is the 0x20 (server) name type or 0x1c (domain controllers).  The latter case is only
diff --git a/docs-xml/smbdotconf/security/hostsallow.xml b/docs-xml/smbdotconf/security/hostsallow.xml
index 8b4b62268a3..a052e7f79cd 100644
--- a/docs-xml/smbdotconf/security/hostsallow.xml
+++ b/docs-xml/smbdotconf/security/hostsallow.xml
@@ -41,13 +41,6 @@
 
     <para><command moreinfo="none">hosts allow = lapland, arvidsjaur</command></para>
 
-    <para>Example 4: allow only hosts in NIS netgroup "foonet", but 
-    deny access from one particular host</para>
-
-    <para><command moreinfo="none">hosts allow = @foonet</command></para>
-
-    <para><command moreinfo="none">hosts deny = pirate</command></para>
-
     <note><para>Note that access still requires suitable user-level passwords.</para></note>
 
     <para>See <citerefentry><refentrytitle>testparm</refentrytitle>
diff --git a/docs-xml/smbdotconf/security/invalidusers.xml b/docs-xml/smbdotconf/security/invalidusers.xml
index b2fb2b9d293..268cdfad560 100644
--- a/docs-xml/smbdotconf/security/invalidusers.xml
+++ b/docs-xml/smbdotconf/security/invalidusers.xml
@@ -7,21 +7,8 @@
     to login to this service. This is really a <emphasis>paranoid</emphasis> 
     check to absolutely ensure an improper setting does not breach 
     your security.</para>
-		
-    <para>A name starting with a '@' is interpreted as an NIS 
-    netgroup first (if your system supports NIS), and then as a UNIX 
-    group if the name was not found in the NIS netgroup database.</para>
 
-    <para>A name starting with '+' is interpreted only 
-    by looking in the UNIX group database via the NSS getgrnam() interface. A name starting with 
-    '&' is interpreted only by looking in the NIS netgroup database 
-    (this requires NIS to be working on your system). The characters 
-    '+' and '&' may be used at the start of the name in either order 
-    so the value <parameter moreinfo="none">+&group</parameter> means check the 
-    UNIX group database, followed by the NIS netgroup database, and 
-    the value <parameter moreinfo="none">&+group</parameter> means check the NIS
-    netgroup database, followed by the UNIX group database (the 
-    same as the '@' prefix).</para>
+    <para>A name starting with a '@' is interpreted UNIX group.</para>
 
     <para>The current servicename is substituted for <parameter moreinfo="none">%S</parameter>. 
 		This is useful in the [homes] section.</para>
diff --git a/docs-xml/smbdotconf/security/passwdchat.xml b/docs-xml/smbdotconf/security/passwdchat.xml
index 23f8e6e1570..a04fc62fdf6 100644
--- a/docs-xml/smbdotconf/security/passwdchat.xml
+++ b/docs-xml/smbdotconf/security/passwdchat.xml
@@ -14,17 +14,14 @@
     received then the password is not changed.</para>
 
     <para>This chat sequence is often quite site specific, depending 
-    on what local methods are used for password control (such as NIS 
-    etc).</para>
+    on what local methods are used for password control.</para>
 
     <para>Note that this parameter only is used if the <smbconfoption
     name="unix password sync"/> parameter is set  to <constant>yes</constant>. This sequence is 
     then called <emphasis>AS ROOT</emphasis> when the SMB password  in the 
     smbpasswd file is being changed, without access to the old password
     cleartext. This means that root must be able to reset the user's password without
-    knowing the text of the previous password. In the presence of
-    NIS/YP,  this means that the <smbconfoption name="passwd program"/> must
-    be executed on the NIS master.
+    knowing the text of the previous password.
     </para>
 
     <para>The string can contain the macro <parameter
diff --git a/docs-xml/smbdotconf/security/usernamemap.xml b/docs-xml/smbdotconf/security/usernamemap.xml
index 809a54c1e2f..eab72bb8672 100644
--- a/docs-xml/smbdotconf/security/usernamemap.xml
+++ b/docs-xml/smbdotconf/security/usernamemap.xml
@@ -58,11 +58,6 @@
 	</para>
 
 
-    <para>
-	If your system supports the NIS NETGROUP option then the netgroup database is checked before the <filename
-	moreinfo="none">/etc/group </filename> database for matching groups.
-	</para>
-
     <para>
 	You can map Windows usernames that have spaces in them by using double quotes around the name. For example:
 <programlisting>
diff --git a/docs-xml/smbdotconf/security/usernamemapscript.xml b/docs-xml/smbdotconf/security/usernamemapscript.xml
index 86118f305bc..7b797cbae1c 100644
--- a/docs-xml/smbdotconf/security/usernamemapscript.xml
+++ b/docs-xml/smbdotconf/security/usernamemapscript.xml
@@ -10,7 +10,7 @@
 	command line option (the username transmitted in the authentication
 	request) and return a line on standard output (the name to which
 	the account should mapped).  In this way, it is possible to store
-	username map tables in an LDAP or NIS directory services.
+	username map tables in an LDAP directory services.
 	</para>
 </description>
 
diff --git a/docs-xml/smbdotconf/security/validusers.xml b/docs-xml/smbdotconf/security/validusers.xml
index 0b681a1fef5..6b0bacfd78a 100644
--- a/docs-xml/smbdotconf/security/validusers.xml
+++ b/docs-xml/smbdotconf/security/validusers.xml
@@ -4,9 +4,10 @@
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
     <para>
-    This is a list of users that should be allowed to login to this service. Names starting with 
-    '@', '+' and  '&' are interpreted using the same rules as described in the 
-    <parameter moreinfo="none">invalid users</parameter> parameter.
+        This is a list of users that should be allowed to login to this service.
+        Names starting with an '@' are interpreted using the same rules as
+        described in the
+        <parameter moreinfo="none">invalid users</parameter> parameter.
     </para>
 
     <para>
diff --git a/docs-xml/smbdotconf/winbind/winbindseparator.xml b/docs-xml/smbdotconf/winbind/winbindseparator.xml
index eda14f4e03a..9be46109cd6 100644
--- a/docs-xml/smbdotconf/winbind/winbindseparator.xml
+++ b/docs-xml/smbdotconf/winbind/winbindseparator.xml
@@ -10,9 +10,9 @@
 	and <filename moreinfo="none">nss_winbind.so</filename> modules for UNIX services.
 	</para>
 
-	<para>Please note that setting this parameter to + causes problems
+	<para>Please note that setting this parameter to + can cause problems
 	with group membership at least on glibc systems, as the character +
-	is used as a special character for NIS in /etc/group.</para>
+	was used as a special character for NIS in /etc/group.</para>
 </description>
 
 <value type="default">\</value>
diff --git a/lib/replace/system/nis.h b/lib/replace/system/nis.h
deleted file mode 100644
index 7213b1550b3..00000000000
--- a/lib/replace/system/nis.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-   Unix SMB/CIFS implementation.
-
-   nis system include wrappers
-
-   Copyright (C) Andrew Tridgell 2004
-
-     ** NOTE! The following LGPL license applies to the replace
-     ** library. This does NOT imply that all of Samba is released
-     ** under the LGPL
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 3 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this library; if not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef _nis_passwd_h
-#define _nis_passwd_h
-
-#if defined(HAVE_RPC_RPC_H)
-/*
- * Check for AUTH_ERROR define conflict with rpc/rpc.h in prot.h.
- */
-#if defined(HAVE_SYS_SECURITY_H) && defined(HAVE_RPC_AUTH_ERROR_CONFLICT)
-#undef AUTH_ERROR
-#endif /* HAVE_SYS_SECURITY_H && HAVE_RPC_AUTH_ERROR_CONFLICT */
-
-#include <rpc/rpc.h>
-#endif /* HAVE_RPC_RPC_H */
-
-
-#if defined (HAVE_NETGROUP)
-
-#if defined(HAVE_RPCSVC_YP_PROT_H)
-
-#include <rpcsvc/yp_prot.h>
-
-#endif /* HAVE_RPCSVC_YP_PROT_H */
-
-#if defined(HAVE_RPCSVC_YPCLNT_H)
-#include <rpcsvc/ypclnt.h>
-#endif /* HAVE_RPCSVC_YPCLNT_H */
-
-#endif /* HAVE_NETGROUP */
-
-#endif /* _nis_passwd_h */
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 21b29bb9b90..dac3042bb65 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -95,17 +95,6 @@ def configure(conf):
     if not conf.CONFIG_SET('HAVE_RPC_RPC_H'):
             Logs.warn('No rpc/rpc.h header found, tirpc or libntirpc missing?')
 
-    if not conf.CHECK_LIB('nsl'):
-        conf.SET_TARGET_TYPE('nsl', 'EMPTY')
-    conf.CHECK_HEADERS('rpc/rpc.h rpcsvc/yp_prot.h', lib='tirpc')
-    if not conf.CONFIG_SET('HAVE_RPCSVC_YP_PROT_H'):
-        if conf.CHECK_CFG(package='libnsl', args='--cflags --libs',
-                          msg='Checking for libnsl',
-                          uselib_store='NSL'):
-            conf.SET_TARGET_TYPE('nsl', 'SYSLIB')
-            conf.CHECK_HEADERS('rpc/rpc.h rpcsvc/yp_prot.h', lib='tirpc nsl')
-    conf.CHECK_HEADERS('rpcsvc/nis.h rpcsvc/ypclnt.h', lib='tirpc nsl')
-
     # This file is decprecated with glibc >= 2.30 so we need to check if it
     # includes a deprecation warning:
     # #warning "The <sys/sysctl.h> header is deprecated and will be removed."
diff --git a/lib/texpect/wscript b/lib/texpect/wscript
index 82f6b25df90..44f92a85136 100644
--- a/lib/texpect/wscript
+++ b/lib/texpect/wscript
@@ -6,5 +6,5 @@ def configure(conf):
 def build(bld):
     bld.SAMBA_BINARY('texpect',
                      'texpect.c',
-                     deps='popt util replace sys_rw nsl',
+                     deps='popt util replace sys_rw',
                      for_selftest=True)
diff --git a/lib/util/access.c b/lib/util/access.c
index e02117fa23e..5b53894b2ce 100644
--- a/lib/util/access.c
+++ b/lib/util/access.c
@@ -23,10 +23,6 @@
 #include "lib/util/unix_match.h"
 #include "lib/util/smb_strtox.h"
 
-#if defined(HAVE_NETGROUP)
-#include "system/nis.h"
-#endif
-
 #define NAME_INDEX 0
 #define ADDR_INDEX 1
 
@@ -118,56 +114,6 @@ static bool string_match(const char *tok,const char *s)
 		    && strequal_m(tok, s + str_len - tok_len)) {
 			return true;
 		}
-	} else if (tok[0] == '@') { /* netgroup: look it up */
-#ifdef	HAVE_NETGROUP
-		DATA_BLOB tmp;
-		char *mydomain = NULL;
-		char *hostname = NULL;
-		bool netgroup_ok = false;
-
-		if (memcache_lookup(
-			    NULL, SINGLETON_CACHE,
-			    data_blob_string_const_null("yp_default_domain"),
-			    &tmp)) {
-
-			SMB_ASSERT(tmp.length > 0);
-			mydomain = (tmp.data[0] == '\0')
-				? NULL : (char *)tmp.data;
-		}
-		else {
-			yp_get_default_domain(&mydomain);
-
-			memcache_add(
-				NULL, SINGLETON_CACHE,
-				data_blob_string_const_null("yp_default_domain"),
-				data_blob_string_const_null(mydomain?mydomain:""));
-		}
-
-		if (!mydomain) {
-			DEBUG(0,("Unable to get default yp domain. "
-				"Try without it.\n"));
-		}
-		if (!(hostname = smb_xstrdup(s))) {
-			DEBUG(1,("out of memory for strdup!\n"));
-			return false;
-		}
-
-		netgroup_ok = innetgr(tok + 1, hostname, (char *) 0, mydomain);
-
-		DBG_INFO("%s %s of domain %s in netgroup %s\n",
-			 netgroup_ok ? "Found" : "Could not find",
-			 hostname,
-			 mydomain?mydomain:"(ANY)",
-			 tok+1);
-
-		SAFE_FREE(hostname);
-
-		if (netgroup_ok)
-			return true;
-#else
-		DEBUG(0,("access: netgroup support is not configured\n"));
-		return false;
-#endif
 	} else if (strequal_m(tok, "ALL")) {	/* all: match any */
 		return true;
 	} else if (strequal_m(tok, "FAIL")) {	/* fail: match any */
diff --git a/lib/util/wscript_build b/lib/util/wscript_build
index 460661e9a63..2a99e212c5c 100644
--- a/lib/util/wscript_build
+++ b/lib/util/wscript_build
@@ -290,7 +290,7 @@ else:
 
     bld.SAMBA_SUBSYSTEM('access',
                         source='access.c',
-                        deps='interfaces samba-util tirpc nsl',
+                        deps='interfaces samba-util',
                         local_include=False)
 
     bld.SAMBA_SUBSYSTEM('util_str_escape',
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 48ca3bf4688..39a67377d19 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -736,10 +736,6 @@ sub provision_ad_member
     path = $share_dir
     valid users = \"+$dcvars->{DOMAIN}/domain users\"
 
-[valid_users_nis_group]
-    path = $share_dir
-    valid users = \"&$dcvars->{DOMAIN}/domain users\"
-
 [valid_users_unix_nis_group]
     path = $share_dir
     valid users = \"+&$dcvars->{DOMAIN}/domain users\"
diff --git a/source3/auth/user_util.c b/source3/auth/user_util.c
index f4bdd2d323e..70b4f320c5e 100644
--- a/source3/auth/user_util.c
+++ b/source3/auth/user_util.c
@@ -24,19 +24,6 @@
 #include "auth.h"
 #include "lib/gencache.h"
 
-#ifdef HAVE_NETGROUP
-/* rpc/xdr.h uses TRUE and FALSE */
-#ifdef TRUE
-#undef TRUE
-#endif
-
-#ifdef FALSE
-#undef FALSE
-#endif
-
-#include "system/nis.h"
-#endif
-
 /*******************************************************************
  Map a username from a dos name to a unix name by looking in the username
  map. Note that this modifies the name in place.
@@ -142,141 +129,44 @@ static void store_map_in_gencache(TALLOC_CTX *ctx, const char *from, const char
 }
 
 /****************************************************************************
- Check if a user is in a netgroup user list. If at first we don't succeed,
- try lower case.
-****************************************************************************/
-
-bool user_in_netgroup(TALLOC_CTX *ctx, const char *user, const char *ngname)
-{
-#ifdef HAVE_NETGROUP
-	static char *my_yp_domain = NULL;
-	char *lowercase_user = NULL;
+ Check if a user is in a user list
 
-	if (my_yp_domain == NULL) {
-		yp_get_default_domain(&my_yp_domain);
-	}
-
-	if (my_yp_domain == NULL) {
-		DEBUG(5,("Unable to get default yp domain, "
-			"let's try without specifying it\n"));
-	}
-
-	DEBUG(5,("looking for user %s of domain %s in netgroup %s\n",
-		user, my_yp_domain?my_yp_domain:"(ANY)", ngname));
-
-	if (innetgr(ngname, NULL, user, my_yp_domain)) {
-		DEBUG(5,("user_in_netgroup: Found\n"));
-		return true;
-	}
-
-	/*
-	 * Ok, innetgr is case sensitive. Try once more with lowercase
-	 * just in case. Attempt to fix #703. JRA.
-	 */
-	lowercase_user = talloc_strdup(ctx, user);
-	if (!lowercase_user) {
-		return false;
-	}
-	if (!strlower_m(lowercase_user)) {
-		return false;


-- 
Samba Shared Repository



More information about the samba-cvs mailing list