svn commit: samba r17029 - in trunk/source: . nsswitch param

jerry at samba.org jerry at samba.org
Thu Jul 13 23:34:08 GMT 2006


Author: jerry
Date: 2006-07-13 23:34:06 +0000 (Thu, 13 Jul 2006)
New Revision: 17029

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17029

Log:
Sync my changes to trunk until we get this multiple
branch discussion over with.


Removed:
   trunk/source/smbwrapper/
Modified:
   trunk/source/Makefile.in
   trunk/source/configure.in
   trunk/source/nsswitch/pam_winbind.c
   trunk/source/nsswitch/winbindd_async.c
   trunk/source/nsswitch/winbindd_group.c
   trunk/source/param/loadparm.c


Changeset:
Modified: trunk/source/Makefile.in
===================================================================
--- trunk/source/Makefile.in	2006-07-13 22:14:28 UTC (rev 17028)
+++ trunk/source/Makefile.in	2006-07-13 23:34:06 UTC (rev 17029)
@@ -480,10 +480,6 @@
 	   $(POPT_LIB_OBJ) $(SMBLDAP_OBJ) $(RPC_PARSE_OBJ) $(LIBMSRPC_OBJ) \
            $(PASSCHANGE_OBJ)
 
-SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o \
-            $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(RPC_PARSE_OBJ1) $(LIBSAMBA_OBJ) \
-	    $(DOSERR_OBJ) $(SECRETS_OBJ)
-
 STATUS_OBJ = utils/status.o utils/status_profile.o \
 	     $(LOCKING_OBJ) $(PARAM_OBJ) \
              $(PROFILE_OBJ) $(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) \
@@ -537,18 +533,6 @@
 PAM_WINBIND_OBJ = nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \
 		  lib/replace1.o $(SNPRINTF_OBJ) @BUILD_INIPARSER@
 
-SMBW_OBJ1 = smbwrapper/smbw.o \
-		smbwrapper/smbw_dir.o smbwrapper/smbw_stat.o \
-		smbwrapper/realcalls.o smbwrapper/shared.o \
-		smbwrapper/smbw_cache.o
-
-SMBW_OBJ = $(SMBW_OBJ1) $(LIBSMB_OBJ) $(KRBCLIENT_OBJ) $(PARAM_OBJ) \
-                $(LIB_NONSMBD_OBJ)
-
-SMBWRAPPER_OBJ1 = smbwrapper/wrapped.o
-
-SMBWRAPPER_OBJ = $(SMBW_OBJ) $(SMBWRAPPER_OBJ1)
-
 LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o libsmb/libsmb_compat.o \
 		   libsmb/libsmb_cache.o \
 		   $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \
@@ -804,8 +788,6 @@
 
 pam_winbind : SHOWFLAGS proto_exists bin/pam_winbind. at SHLIBEXT@
 
-smbwrapper : SHOWFLAGS @SMBWRAPPER@
-
 torture : SHOWFLAGS $(TORTURE_PROGS)
 
 smbtorture : SHOWFLAGS bin/smbtorture at EXEEXT@
@@ -1115,20 +1097,6 @@
 	@echo Linking $@
 	@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
 
-bin/smbw_sample at EXEEXT@: $(SMBW_OBJ) utils/smbw_sample.o bin/.dummy
-	@echo Linking $@
-	@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(SMBW_OBJ) utils/smbw_sample.o $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
-
-bin/smbsh at EXEEXT@: $(SMBSH_OBJ) bin/.dummy
-	@echo Linking $@
-	@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(SMBSH_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS)
-
-bin/smbwrapper. at SHLIBEXT@: $(PICOBJS) bin/.dummy
-	@echo Linking shared library $@
-	@$(SHLD) $(LDSHFLAGS) -o $@ $(PICOBJS) $(LIBS) \
-		$(KRB5LIBS) $(LDAP_LIBS) \
-		@SONAMEFLAG@`basename $@`
-
 bin/libsmbclient. at SHLIBEXT@: $(LIBSMBCLIENT_PICOBJS)
 	@echo Linking libsmbclient shared library $@
 	@$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_PICOBJS) $(LDFLAGS) $(LIBS) \

Modified: trunk/source/configure.in
===================================================================
--- trunk/source/configure.in	2006-07-13 22:14:28 UTC (rev 17028)
+++ trunk/source/configure.in	2006-07-13 23:34:06 UTC (rev 17029)
@@ -1375,9 +1375,6 @@
 
 AC_SUBST(LIBUNWIND_PTRACE)
 
-# syscall() is needed for smbwrapper.
-AC_CHECK_FUNCS(syscall)
-
 AC_CHECK_FUNCS(_dup _dup2 _opendir _readdir _seekdir _telldir _closedir)
 AC_CHECK_FUNCS(__dup __dup2 __opendir __readdir __seekdir __telldir __closedir)
 AC_CHECK_FUNCS(__getcwd _getcwd)
@@ -1650,8 +1647,8 @@
 SHLIBEXT="so"
 
 if test "$enable_shared" = "yes"; then
-  # this bit needs to be modified for each OS that is suported by
-  # smbwrapper. You need to specify how to create a shared library and
+  # this bit needs to be modified for each OS that supports share libs
+  # You need to specify how to create a shared library and
   # how to compile C code to produce PIC object files
 
   AC_MSG_CHECKING([ability to build shared libraries])
@@ -2980,47 +2977,6 @@
 fi
 
 #################################################
-# check for smbwrapper support
-AC_MSG_CHECKING(whether to use smbwrapper)
-AC_ARG_WITH(smbwrapper,
-[  --with-smbwrapper       Include SMB wrapper support (default=no) ],
-[ case "$withval" in
-  yes)
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_SMBWRAPPER,1,[Whether to include smbwrapper support])
-	WRAPPROG="bin/smbsh\$(EXEEXT)"
-	WRAP="bin/smbwrapper.$SHLIBEXT"
-	WRAP_OBJS="\$(SMBW_OBJ1) \$(SMBWRAPPER_OBJ1)"
-	WRAP_INC="-I\$(srcdir)/smbwrapper"
-
-# Conditions under which smbwrapper should not be built.
-
-	if test x"$PICFLAGS" = x; then
-	   echo No support for PIC code - disabling smbwrapper and smbsh
-	   WRAPPROG=""
-	   WRAP=""
-	   WRAP_OBJS=""
-	   WRAP_INC=""
-	elif test x$ac_cv_func_syscall = xno; then
-	   AC_MSG_RESULT([No syscall() -- disabling smbwrapper and smbsh])
-	   WRAPPROG=""
-	   WRAP=""
-	   WRAP_OBJS=""
-	   WRAP_INC=""
-	fi
-	EXTRA_ALL_TARGETS="$EXTRA_ALL_TARGETS $WRAPPROG $WRAP"
-	SMBWRAPPER="$WRAPPROG $WRAP"
-	SMBWRAP_OBJS="$WRAP_OBJS"
-	SMBWRAP_INC="$WRAP_INC"
-    ;;
-  *)
-    AC_MSG_RESULT(no)
-    ;;
-  esac ],
-  AC_MSG_RESULT(no)
-)
-
-#################################################
 # check for AFS clear-text auth support
 samba_cv_WITH_AFS=no
 AC_MSG_CHECKING(whether to use AFS clear-text auth)
@@ -4324,7 +4280,7 @@
 
 AC_CACHE_CHECK([whether the old quota support works],samba_cv_QUOTA_WORKS,[
 SAVE_CPPFLAGS="$CPPFLAGS"
-CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I. -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/nsswitch -I${srcdir-.}/smbwrapper"
+CPPFLAGS="$CPPFLAGS -I${srcdir-.}/ -I. -I${srcdir-.}/include -I${srcdir-.}/ubiqx -I${srcdir-.}/popt -I${srcdir-.}/nsswitch"
 AC_TRY_COMPILE([
 #include "confdefs.h"
 #define NO_PROTO_H 1

Modified: trunk/source/nsswitch/pam_winbind.c
===================================================================
--- trunk/source/nsswitch/pam_winbind.c	2006-07-13 22:14:28 UTC (rev 17028)
+++ trunk/source/nsswitch/pam_winbind.c	2006-07-13 23:34:06 UTC (rev 17029)
@@ -47,15 +47,17 @@
 {
 	int ctrl = 0;
 	const char *config_file = NULL;
+	int i;
+	const char **v;
 
 	if (d == NULL) {
 		goto config_from_pam;
 	}
 
-	for (; argc-- > 0; ++argv) {
-		if (!strncasecmp(*argv, "config", strlen("config"))) {
+	for (i=argc,v=argv; i-- > 0; ++v) {
+		if (!strncasecmp(*v, "config", strlen("config"))) {
 			ctrl |= WINBIND_CONFIG_FILE;
-			config_file = argv[argc];
+			config_file = v[i];
 			break;
 		}
 	}
@@ -92,31 +94,31 @@
 
 config_from_pam:
 	/* step through arguments */
-	for (; argc-- > 0; ++argv) {
+	for (i=argc,v=argv; i-- > 0; ++v) {
 
 		/* generic options */
-		if (!strcmp(*argv,"debug"))
+		if (!strcmp(*v,"debug"))
 			ctrl |= WINBIND_DEBUG_ARG;
-		else if (!strcasecmp(*argv, "use_authtok"))
+		else if (!strcasecmp(*v, "use_authtok"))
 			ctrl |= WINBIND_USE_AUTHTOK_ARG;
-		else if (!strcasecmp(*argv, "use_first_pass"))
+		else if (!strcasecmp(*v, "use_first_pass"))
 			ctrl |= WINBIND_USE_FIRST_PASS_ARG;
-		else if (!strcasecmp(*argv, "try_first_pass"))
+		else if (!strcasecmp(*v, "try_first_pass"))
 			ctrl |= WINBIND_TRY_FIRST_PASS_ARG;
-		else if (!strcasecmp(*argv, "unknown_ok"))
+		else if (!strcasecmp(*v, "unknown_ok"))
 			ctrl |= WINBIND_UNKNOWN_OK_ARG;
-		else if (!strncasecmp(*argv, "require_membership_of", strlen("require_membership_of")))
+		else if (!strncasecmp(*v, "require_membership_of", strlen("require_membership_of")))
 			ctrl |= WINBIND_REQUIRED_MEMBERSHIP;
-		else if (!strncasecmp(*argv, "require-membership-of", strlen("require-membership-of")))
+		else if (!strncasecmp(*v, "require-membership-of", strlen("require-membership-of")))
 			ctrl |= WINBIND_REQUIRED_MEMBERSHIP;
-		else if (!strcasecmp(*argv, "krb5_auth"))
+		else if (!strcasecmp(*v, "krb5_auth"))
 			ctrl |= WINBIND_KRB5_AUTH;
-		else if (!strncasecmp(*argv, "krb5_ccache_type", strlen("krb5_ccache_type")))
+		else if (!strncasecmp(*v, "krb5_ccache_type", strlen("krb5_ccache_type")))
 			ctrl |= WINBIND_KRB5_CCACHE_TYPE;
-		else if (!strcasecmp(*argv, "cached_login"))
+		else if (!strcasecmp(*v, "cached_login"))
 			ctrl |= WINBIND_CACHED_LOGIN;
 		else {
-			_pam_log(LOG_ERR, "pam_parse: unknown option; %s", *argv);
+			_pam_log(LOG_ERR, "pam_parse: unknown option; %s", *v);
 		}
 
 	}

Modified: trunk/source/nsswitch/winbindd_async.c
===================================================================
--- trunk/source/nsswitch/winbindd_async.c	2006-07-13 22:14:28 UTC (rev 17028)
+++ trunk/source/nsswitch/winbindd_async.c	2006-07-13 23:34:06 UTC (rev 17029)
@@ -4,7 +4,7 @@
    Async helpers for blocking functions
 
    Copyright (C) Volker Lendecke 2005
-   Copyright (C) Volker Lendecke 2006
+   Copyright (C) Gerald Carter 2006
    
    The helpers always consist of three functions: 
 

Modified: trunk/source/nsswitch/winbindd_group.c
===================================================================
--- trunk/source/nsswitch/winbindd_group.c	2006-07-13 22:14:28 UTC (rev 17028)
+++ trunk/source/nsswitch/winbindd_group.c	2006-07-13 23:34:06 UTC (rev 17029)
@@ -41,9 +41,16 @@
 		       const char *gr_name, gid_t unix_gid)
 {
 	fstring full_group_name;
+	BOOL can_assume = False;
 
-	fill_domain_username( full_group_name, dom_name, gr_name, False);
+	/* I *hate* winbind use default domain!!!! Somehow I will figure out 
+	   how to remove this parameter.    -jerry */
 
+	if ( (lp_server_role() == ROLE_DOMAIN_MEMBER) && strequal(dom_name, lp_workgroup() ) )
+		can_assume = True;
+
+	fill_domain_username( full_group_name, dom_name, gr_name, can_assume);
+
 	gr->gr_gid = unix_gid;
     
 	/* Group name and password */

Modified: trunk/source/param/loadparm.c
===================================================================
--- trunk/source/param/loadparm.c	2006-07-13 22:14:28 UTC (rev 17028)
+++ trunk/source/param/loadparm.c	2006-07-13 23:34:06 UTC (rev 17029)
@@ -4199,7 +4199,8 @@
 		case SEC_SERVER:
 			if (lp_domain_logons())
 				DEBUG(0, ("Server's Role (logon server) conflicts with server-level security\n"));
-			server_role = ROLE_DOMAIN_MEMBER;
+			/* this used to be considered ROLE_DOMAIN_MEMBER but that's just wrong */
+			server_role = ROLE_STANDALONE;
 			break;
 		case SEC_DOMAIN:
 			if (lp_domain_logons()) {



More information about the samba-cvs mailing list