summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-02-18 15:31:25 +0000
committerStefan Metzmacher <metze@samba.org>2004-02-18 15:31:25 +0000
commit64cdbddbc1e0f63302aee4f02213d7a771feb315 (patch)
tree49074ca93394af819b6e9e33fa774f75faee0741
parent932026724ff7e8050cfa0412c45168c25ee47e1a (diff)
downloadsamba-64cdbddbc1e0f63302aee4f02213d7a771feb315.tar.gz
samba-64cdbddbc1e0f63302aee4f02213d7a771feb315.tar.bz2
samba-64cdbddbc1e0f63302aee4f02213d7a771feb315.zip
don't inlcude rpc/rpc.h and rpcsvc/*.h anymore
and remove NET_GROUP stuff, this needs to be implemented in a better way if we ever readd this metze (This used to be commit da5f22976fb40ec96160439c7a926a15805fc7f0)
-rw-r--r--source4/build/m4/rewrite.m473
-rw-r--r--source4/include/includes.h39
-rw-r--r--source4/lib/username.c42
-rw-r--r--source4/smb_server/password.c19
4 files changed, 6 insertions, 167 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index 4f8fbdc2ca..e97c5037fb 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -293,7 +293,7 @@ AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(arpa/inet.h sys/select.h fcntl.h sys/fcntl.h sys/time.h)
AC_CHECK_HEADERS(unistd.h utime.h grp.h sys/id.h limits.h memory.h net/if.h)
-AC_CHECK_HEADERS(compat.h rpc/rpc.h rpcsvc/nis.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h)
+AC_CHECK_HEADERS(compat.h)
AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h sys/ipc.h sys/mode.h)
AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h strings.h stdlib.h sys/socket.h)
AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h termio.h)
@@ -1167,77 +1167,6 @@ if test x"$samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES" = x"yes"; then
AC_DEFINE(HAVE_IRIX_SPECIFIC_CAPABILITIES,1,[Whether IRIX specific capabilities are available])
fi
-#
-# Check for int16, uint16, int32 and uint32 in rpc/types.h included from rpc/rpc.h
-# This is *really* broken but some systems (DEC OSF1) do this.... JRA.
-#
-
-AC_CACHE_CHECK([for int16 typedef included by rpc/rpc.h],samba_cv_HAVE_INT16_FROM_RPC_RPC_H,[
-AC_TRY_COMPILE([#include <sys/types.h>
-#if defined(HAVE_RPC_RPC_H)
-#include <rpc/rpc.h>
-#endif],
-[int16 testvar;],
-samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes,samba_cv_HAVE_INT16_FROM_RPC_RPC_H=no)])
-if test x"$samba_cv_HAVE_INT16_FROM_RPC_RPC_H" = x"yes"; then
- AC_DEFINE(HAVE_INT16_FROM_RPC_RPC_H,1,[Whether int16 typedef is included by rpc/rpc.h])
-fi
-
-AC_CACHE_CHECK([for uint16 typedef included by rpc/rpc.h],samba_cv_HAVE_UINT16_FROM_RPC_RPC_H,[
-AC_TRY_COMPILE([#include <sys/types.h>
-#if defined(HAVE_RPC_RPC_H)
-#include <rpc/rpc.h>
-#endif],
-[uint16 testvar;],
-samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes,samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=no)])
-if test x"$samba_cv_HAVE_UINT16_FROM_RPC_RPC_H" = x"yes"; then
- AC_DEFINE(HAVE_UINT16_FROM_RPC_RPC_H,1,[Whether uint16 typedef is included by rpc/rpc.h])
-fi
-
-AC_CACHE_CHECK([for int32 typedef included by rpc/rpc.h],samba_cv_HAVE_INT32_FROM_RPC_RPC_H,[
-AC_TRY_COMPILE([#include <sys/types.h>
-#if defined(HAVE_RPC_RPC_H)
-#include <rpc/rpc.h>
-#endif],
-[int32 testvar;],
-samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes,samba_cv_HAVE_INT32_FROM_RPC_RPC_H=no)])
-if test x"$samba_cv_HAVE_INT32_FROM_RPC_RPC_H" = x"yes"; then
- AC_DEFINE(HAVE_INT32_FROM_RPC_RPC_H,1,[Whether int32 typedef is included by rpc/rpc.h])
-fi
-
-AC_CACHE_CHECK([for uint32 typedef included by rpc/rpc.h],samba_cv_HAVE_UINT32_FROM_RPC_RPC_H,[
-AC_TRY_COMPILE([#include <sys/types.h>
-#if defined(HAVE_RPC_RPC_H)
-#include <rpc/rpc.h>
-#endif],
-[uint32 testvar;],
-samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes,samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=no)])
-if test x"$samba_cv_HAVE_UINT32_FROM_RPC_RPC_H" = x"yes"; then
- AC_DEFINE(HAVE_UINT32_FROM_RPC_RPC_H,1,[Whether uint32 typedef is included by rpc/rpc.h])
-fi
-
-dnl
-dnl Some systems (SCO) have a problem including
-dnl <prot.h> and <rpc/rpc.h> due to AUTH_ERROR being defined
-dnl as a #define in <prot.h> and as part of an enum
-dnl in <rpc/rpc.h>.
-dnl
-
-AC_CACHE_CHECK([for conflicting AUTH_ERROR define in rpc/rpc.h],samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT,[
-AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef HAVE_SYS_SECURITY_H
-#include <sys/security.h>
-#include <prot.h>
-#endif /* HAVE_SYS_SECURITY_H */
-#if defined(HAVE_RPC_RPC_H)
-#include <rpc/rpc.h>
-#endif],
-[int testvar;],
-samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=no,samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT=yes)])
-if test x"$samba_cv_HAVE_RPC_AUTH_ERROR_CONFLICT" = x"yes"; then
- AC_DEFINE(HAVE_RPC_AUTH_ERROR_CONFLICT,1,[Whether there is a conflicting AUTH_ERROR define in rpc/rpc.h])
-fi
-
AC_MSG_CHECKING([for test routines])
AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
AC_MSG_RESULT(yes),
diff --git a/source4/include/includes.h b/source4/include/includes.h
index 71ecaa508e..ec744920ed 100644
--- a/source4/include/includes.h
+++ b/source4/include/includes.h
@@ -355,29 +355,6 @@
#endif
-#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
-#include <rpc/rpc.h>
-#endif
-
-#if defined(HAVE_YP_GET_DEFAULT_DOMAIN) && defined(HAVE_SETNETGRENT) && defined(HAVE_ENDNETGRENT) && defined(HAVE_GETNETGRENT)
-#define HAVE_NETGROUP 1
-#endif
-
-#if defined (HAVE_NETGROUP)
-#if defined(HAVE_RPCSVC_YP_PROT_H)
-#include <rpcsvc/yp_prot.h>
-#endif
-#if defined(HAVE_RPCSVC_YPCLNT_H)
-#include <rpcsvc/ypclnt.h>
-#endif
-#endif /* HAVE_NETGROUP */
-
#if defined(HAVE_SYS_IPC_H)
#include <sys/ipc.h>
#endif /* HAVE_SYS_IPC_H */
@@ -479,7 +456,7 @@ typedef int socklen_t;
#define uint8 unsigned char
#endif
-#if !defined(int16) && !defined(HAVE_INT16_FROM_RPC_RPC_H)
+#if !defined(int16)
#if (SIZEOF_SHORT == 4)
#define int16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
#else /* SIZEOF_SHORT != 4 */
@@ -487,12 +464,8 @@ typedef int socklen_t;
#endif /* SIZEOF_SHORT != 4 */
#endif
-/*
- * Note we duplicate the size tests in the unsigned
- * case as int16 may be a typedef from rpc/rpc.h
- */
-#if !defined(uint16) && !defined(HAVE_UINT16_FROM_RPC_RPC_H)
+#if !defined(uint16)
#if (SIZEOF_SHORT == 4)
#define uint16 __ERROR___CANNOT_DETERMINE_TYPE_FOR_INT16;
#else /* SIZEOF_SHORT != 4 */
@@ -500,7 +473,7 @@ typedef int socklen_t;
#endif /* SIZEOF_SHORT != 4 */
#endif
-#if !defined(int32) && !defined(HAVE_INT32_FROM_RPC_RPC_H)
+#if !defined(int32)
#if (SIZEOF_INT == 4)
#define int32 int
#elif (SIZEOF_LONG == 4)
@@ -513,12 +486,8 @@ typedef int socklen_t;
#endif
#endif
-/*
- * Note we duplicate the size tests in the unsigned
- * case as int32 may be a typedef from rpc/rpc.h
- */
-#if !defined(uint32) && !defined(HAVE_UINT32_FROM_RPC_RPC_H)
+#if !defined(uint32)
#if (SIZEOF_INT == 4)
#define uint32 unsigned int
#elif (SIZEOF_LONG == 4)
diff --git a/source4/lib/username.c b/source4/lib/username.c
index 084d7e0bdb..2d6cd651c5 100644
--- a/source4/lib/username.c
+++ b/source4/lib/username.c
@@ -179,35 +179,6 @@ struct passwd *Get_Pwnam(const char *user)
}
/****************************************************************************
- Check if a user is in a netgroup user list.
-****************************************************************************/
-
-static BOOL user_in_netgroup_list(const char *user, const char *ngname)
-{
-#ifdef HAVE_NETGROUP
- /* static char *mydomain = NULL; */
- /* REWRITE: make thread safe if caching */
- char *mydomain = NULL;
- /*if (mydomain == NULL) */
- yp_get_default_domain(&mydomain);
-
- if(mydomain == NULL) {
- DEBUG(5,("Unable to get default yp domain\n"));
- return False;
- }
-
- DEBUG(5,("looking for user %s of domain %s in netgroup %s\n",
- user, mydomain, ngname));
- DEBUG(5,("innetgr is %s\n", innetgr(ngname, NULL, user, mydomain)
- ? "TRUE" : "FALSE"));
-
- if (innetgr(ngname, NULL, user, mydomain))
- return (True);
-#endif /* HAVE_NETGROUP */
- return False;
-}
-
-/****************************************************************************
Check if a user is in a winbind group.
****************************************************************************/
@@ -398,8 +369,6 @@ BOOL user_in_list(const char *user,const char **list, gid_t *groups, size_t n_gr
* Old behaviour. Check netgroup list
* followed by UNIX list.
*/
- if(user_in_netgroup_list(user, *list +1))
- return True;
if(user_in_group_list(user, *list +1, groups, n_groups))
return True;
} else if (**list == '+') {
@@ -410,9 +379,6 @@ BOOL user_in_list(const char *user,const char **list, gid_t *groups, size_t n_gr
*/
if(user_in_group_list(user, *list +2, groups, n_groups))
return True;
- if(user_in_netgroup_list(user, *list +2))
- return True;
-
} else {
/*
@@ -429,16 +395,8 @@ BOOL user_in_list(const char *user,const char **list, gid_t *groups, size_t n_gr
/*
* Search netgroup list followed by UNIX list.
*/
- if(user_in_netgroup_list(user, *list +2))
- return True;
if(user_in_group_list(user, *list +2, groups, n_groups))
return True;
- } else {
- /*
- * Just search netgroup list.
- */
- if(user_in_netgroup_list(user, *list +1))
- return True;
}
} else if (!name_is_local(*list)) {
/*
diff --git a/source4/smb_server/password.c b/source4/smb_server/password.c
index 53530abf7a..2811a14c21 100644
--- a/source4/smb_server/password.c
+++ b/source4/smb_server/password.c
@@ -309,24 +309,7 @@ BOOL user_ok(const char *user,int snum, gid_t *groups, size_t n_groups)
validate a group username entry. Return the username or NULL
****************************************************************************/
static const char *validate_group(struct server_context *smb, const char *group, DATA_BLOB password,int snum)
-{
-#ifdef HAVE_NETGROUP
- {
- char *host, *user, *domain;
- setnetgrent(group);
- while (getnetgrent(&host, &user, &domain)) {
- if (user) {
- if (user_ok(user, snum, NULL, 0) &&
- password_ok(smb, user,password)) {
- endnetgrent();
- return(user);
- }
- }
- }
- endnetgrent();
- }
-#endif
-
+{
#ifdef HAVE_GETGRENT
{
struct group *gptr;