[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Thu Jun 23 21:02:01 MDT 2011


The branch, master has been updated
       via  877de9f s3-build Require fully defined symbols in ALL libraries by default
       via  52255f4 s3-build: Require fully defined symbols for all public libraries
       via  9554fd6 s3-build: Remove SECRETS3 as a samba3core dep
       via  b332743 s3-param Remove %(DomainSID) support
      from  5d7d52c Fix bug #8254 - "acl check permissions = no" does not work in all cases

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


- Log -----------------------------------------------------------------
commit 877de9fee773b3f6b5a95afe1d01001e0b1b4ff2
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Fri Jun 24 11:47:45 2011 +1000

    s3-build Require fully defined symbols in ALL libraries by default
    
    The only exception here is libsmbregistry, which needs further work to
    resolve the library loop caused by the registry based smb.conf
    loading.
    
    Andrew Bartlett
    
    Autobuild-User: Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date: Fri Jun 24 05:01:38 CEST 2011 on sn-devel-104

commit 52255f4eb50866cb2eceb92308c9a5ab49c04f7c
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Wed May 25 16:05:23 2011 +1000

    s3-build: Require fully defined symbols for all public libraries

commit 9554fd6e2ff12760d463c9464f72cf6b51b7363d
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Jun 23 17:33:04 2011 +1000

    s3-build: Remove SECRETS3 as a samba3core dep
    
    This resolves the the library loop between libsmbconf and
    SECRETS3/passdb, and allows the next commit to require fully defined
    symbols in public libraries.
    
    Andrew Bartlett

commit b332743ddb13e2ce83c7686780c004d638a1b16f
Author: Andrew Bartlett <abartlet at samba.org>
Date:   Thu Jun 23 17:32:07 2011 +1000

    s3-param Remove %(DomainSID) support
    
    This also removes the now unused longvar support.  This experiment
    never took off.
    
    Fixing this allows me to resolve the the library loop between libsmbconf
    and SECRETS3/passdb.
    
    Andreas correctly points out that this loop originally comes from my
    patch to obtain the domain sid from passdb
    (25cfa29e29bdbb6c84bd85ea02ec542228ae585f), but as I would prefer to
    keep that feature, I'm hoping to break the loop here instead.
    
    Andrew Bartlett

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

Summary of changes:
 buildtools/wafsamba/samba3.py |    2 -
 source3/lib/substitute.c      |  102 -----------------------------------------
 source3/wscript_build         |   94 +++++++++++++++-----------------------
 3 files changed, 37 insertions(+), 161 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba3.py b/buildtools/wafsamba/samba3.py
index c11e7d8..d77cd4d 100644
--- a/buildtools/wafsamba/samba3.py
+++ b/buildtools/wafsamba/samba3.py
@@ -93,8 +93,6 @@ def s3_fix_kwargs(bld, kwargs):
 
 def SAMBA3_LIBRARY(bld, name, *args, **kwargs):
 	s3_fix_kwargs(bld, kwargs)
-        if not 'allow_undefined_symbols' in kwargs:
-            kwargs['allow_undefined_symbols'] = True
 	return bld.SAMBA_LIBRARY(name, *args, **kwargs)
 Build.BuildContext.SAMBA3_LIBRARY = SAMBA3_LIBRARY
 
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index 38fdc40..df217bc 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -324,105 +324,6 @@ static char * realloc_expand_env_var(char *str, char *p)
 }
 
 /*******************************************************************
-*******************************************************************/
-
-static char *longvar_domainsid( void )
-{
-	struct dom_sid sid;
-	fstring tmp;
-	char *sid_string;
-
-	if ( !secrets_fetch_domain_sid( lp_workgroup(), &sid ) ) {
-		return NULL;
-	}
-
-	sid_string = SMB_STRDUP( sid_to_fstring( tmp, &sid ) );
-
-	if ( !sid_string ) {
-		DEBUG(0,("longvar_domainsid: failed to dup SID string!\n"));
-	}
-
-	return sid_string;
-}
-
-/*******************************************************************
-*******************************************************************/
-
-struct api_longvar {
-	const char *name;
-	char* (*fn)( void );
-};
-
-static struct api_longvar longvar_table[] = {
-	{ "DomainSID",		longvar_domainsid },
-	{ NULL, 		NULL }
-};
-
-static char *get_longvar_val( const char *varname )
-{
-	int i;
-
-	DEBUG(7,("get_longvar_val: expanding variable [%s]\n", varname));
-
-	for ( i=0; longvar_table[i].name; i++ ) {
-		if ( strequal( longvar_table[i].name, varname ) ) {
-			return longvar_table[i].fn();
-		}
-	}
-
-	return NULL;
-}
-
-/*******************************************************************
- Expand the long smb.conf variable names given a pointer to a %(NAME).
- Return the number of characters by which the pointer should be advanced.
- When this is called p points at the '%' character.
-********************************************************************/
-
-static char *realloc_expand_longvar(char *str, char *p)
-{
-	fstring varname;
-	char *value;
-	char *q, *r;
-	int copylen;
-
-	if ( p[0] != '%' || p[1] != '(' ) {
-		return str;
-	}
-
-	/* Look for the terminating ')'.*/
-
-	if ((q = strchr_m(p,')')) == NULL) {
-		DEBUG(0,("realloc_expand_longvar: Unterminated environment variable [%s]\n", p));
-		return str;
-	}
-
-	/* Extract the name from within the %(NAME) string.*/
-
-	r = p+2;
-	copylen = MIN( (q-r), (sizeof(varname)-1) );
-	strncpy(varname, r, copylen);
-	varname[copylen] = '\0';
-
-	if ((value = get_longvar_val(varname)) == NULL) {
-		DEBUG(0,("realloc_expand_longvar: Variable [%s] not set.  Skipping\n", varname));
-		return str;
-	}
-
-	/* Copy the full %(NAME) into envname so it can be replaced.*/
-
-	copylen = MIN( (q+1-p),(sizeof(varname)-1) );
-	strncpy( varname, p, copylen );
-	varname[copylen] = '\0';
-	r = realloc_string_sub(str, varname, value);
-	SAFE_FREE( value );
-
-	/* skip over the %(varname) */
-
-	return r;
-}
-
-/*******************************************************************
  Patch from jkf at soton.ac.uk
  Added this to implement %p (NIS auto-map version of %H)
 *******************************************************************/
@@ -680,9 +581,6 @@ static char *alloc_sub_basic(const char *smb_name, const char *domain_name,
 		case '$' :
 			a_string = realloc_expand_env_var(a_string, p); /* Expand environment variables */
 			break;
-		case '(':
-			a_string = realloc_expand_longvar( a_string, p );
-			break;
 		case 'V' :
 			slprintf(vnnstr,sizeof(vnnstr)-1, "%u", get_my_vnn());
 			a_string = realloc_string_sub(a_string, "%V", vnnstr);
diff --git a/source3/wscript_build b/source3/wscript_build
index 53c412e..624fcc8 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -72,7 +72,7 @@ LIB_SRC = '''
           lib/wins_srv.c
           lib/util_sid.c
           lib/util_file.c
-          lib/util.c lib/util_cmdline.c
+          lib/util.c
           lib/util_sock.c lib/sock_exec.c
           lib/substitute.c lib/substitute_generic.c
           lib/ms_fnmatch.c
@@ -649,17 +649,10 @@ if not bld.env.toplevel_build:
 
 ######################## SUBSYSTEMS #################################
 
-# A grouping library to get various helper rpc clients in a library
-bld.SAMBA3_LIBRARY('rpc_client',
-                   source='',
-                   deps='RPC_CLIENT_SCHANNEL INIT_LSA INIT_NETLOGON INIT_SAMR LIBCLI_SAMR LIBCLI_LSA3 LIBRPCCLI_NETLOGON LIBCLI_SPOOLSS LIBCLI_WINREG',
-                   private_library=True,
-                   grouping_library=True)
-
 bld.SAMBA3_LIBRARY('netapi',
                     source=LIBNETAPI_SRC,
                     public_deps='''talloc tdb_compat cap wbclient smbd_shim LIBSMB KRBCLIENT
-                    passdb SMBLDAP PARAM_WITHOUT_REG samba-util
+                    passdb SMBLDAP param samba-util
                     LIBMSRPC_GEN msrpc3 ads LIBNET DCUTIL NDR_LIBNETAPI
                     RPC_CLIENT_SCHANNEL smbconf REG_SMBCONF TOKEN_UTIL
                     LIBCLI_SAMR LIBCLI_LSA3 LIBRPCCLI_NETLOGON
@@ -728,7 +721,6 @@ bld.SAMBA3_LIBRARY('passdb',
                    source=PASSDB_SRC,
                    deps='SECRETS3 SMBLDAP GROUPDB pdb wbclient LIBCLI_AUTH flag_mapping',
                    private_library=True,
-                   allow_undefined_symbols=False,
                    vars=locals())
 
 bld.SAMBA3_SUBSYSTEM('PARAM_UTIL',
@@ -738,18 +730,12 @@ bld.SAMBA3_SUBSYSTEM('PARAM_UTIL',
 if bld.env.toplevel_build:
     bld.SAMBA3_SUBSYSTEM('LOADPARM_CTX',
                          source='param/loadparm_ctx.c',
-                         deps='''s3_param_h PARAM_WITHOUT_REG''',
+                         deps='''s3_param_h param''',
                          vars=locals())
 
-bld.SAMBA3_SUBSYSTEM('PARAM_WITHOUT_REG',
-                    source=PARAM_WITHOUT_REG_SRC,
-                    deps='''PARAM_UTIL smbd_conn ldap lber LOADPARM_CTX''',
-                    vars=locals())
-
 bld.SAMBA3_SUBSYSTEM('param',
-                     source='',
-                     deps='PARAM_WITHOUT_REG samba-util smbconf',
-                     vars=locals())
+                   source=PARAM_WITHOUT_REG_SRC,
+                   deps='samba-util PARAM_UTIL smbd_conn ldap lber LOADPARM_CTX samba3core smbconf''')
 
 bld.SAMBA3_SUBSYSTEM('param_service',
                      source='param/service.c',
@@ -769,8 +755,9 @@ bld.SAMBA3_LIBRARY('smbregistry',
                    source=REG_BASE_SRC,
                    deps='''smbd_shim tdb-wrap3 NDR_SECURITY UTIL_TDB talloc
                    replace util_reg samba-util security
-                   errors3 adt_tree dbwrap_util util_str util_sec''',
+                   errors3 adt_tree dbwrap_util util_str util_sec util_malloc''',
                    vars=locals(),
+                   allow_undefined_symbols=True,
                    private_library=True)
 
 bld.SAMBA3_SUBSYSTEM('REG_SMBCONF',
@@ -785,10 +772,15 @@ bld.SAMBA3_SUBSYSTEM('REG_FULL',
 
 bld.SAMBA3_LIBRARY('POPT_SAMBA3',
                    source=POPT_LIB_SRC,
-                   deps='popt samba-util',
+                   deps='popt samba-util UTIL_CMDLINE',
                    vars=locals(),
                    private_library=True)
 
+bld.SAMBA3_LIBRARY('UTIL_CMDLINE',
+                   source='lib/util_cmdline.c',
+                   deps='SECRETS3',
+                   private_library=True)
+
 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
                     source=KRBCLIENT_SRC,
                     public_deps='KRB5_WRAP k5crypto',
@@ -796,13 +788,12 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
 
 bld.SAMBA3_SUBSYSTEM('samba3core',
                    source=LIB_SRC,
-                   deps='LIBCRYPTO ndr security NDR_SECURITY samba-util NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 UTIL_TDB UTIL_PW SAMBA_VERSION KRB5_WRAP flag_mapping util_reg PTHREADPOOL interfaces cap string_init param util_str CHARSET3 namearray SECRETS3 dbwrap_util util_sec util_malloc memcache ccan',
+                   deps='LIBCRYPTO ndr security NDR_SECURITY samba-util NDR_MESSAGING LIBASYNC_REQ tdb-wrap3 UTIL_TDB UTIL_PW SAMBA_VERSION KRB5_WRAP flag_mapping util_reg PTHREADPOOL interfaces cap string_init param util_str CHARSET3 namearray dbwrap_util util_sec util_malloc memcache ccan errors3',
                    vars=locals())
 
 bld.SAMBA3_LIBRARY('smbd_shim',
                    source='''lib/smbd_shim.c''', 
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_SUBSYSTEM('LIBSMB_ERR',
                     source='',
@@ -816,7 +807,7 @@ bld.SAMBA3_SUBSYSTEM('LIBNTLMSSP',
 
 bld.SAMBA3_LIBRARY('LIBSMB',
                    source=LIBSMB_SRC,
-                   deps='LIBNTLMSSP CLDAP LIBNMB LIBNBT LIBDRSUAPI SPNEGO_PARSE LIBTSOCKET KRBCLIENT LIBCLI_SMB_COMMON',
+                   deps='LIBNTLMSSP CLDAP LIBNMB LIBNBT LIBDRSUAPI SPNEGO_PARSE LIBTSOCKET KRBCLIENT LIBCLI_SMB_COMMON UTIL_CMDLINE',
                    vars=locals(),
                    private_library=True)
 
@@ -843,7 +834,7 @@ bld.SAMBA3_SUBSYSTEM('SMBLDAP',
 
 bld.SAMBA3_LIBRARY('ads',
                    source=LIBADS_SRC,
-                   deps='cli-ldap-common KRB5_WRAP ldap lber',
+                   deps='cli-ldap-common KRB5_WRAP ldap lber KRBCLIENT param LIBNTLMSSP LIBNMB LIBSMB DCUTIL',
                    private_library=True,
                    vars=locals())
 
@@ -869,7 +860,7 @@ bld.SAMBA3_SUBSYSTEM('LIBAFS_SETTOKEN',
 
 bld.SAMBA3_LIBRARY('smbconf',
                    source=LIB_SMBCONF_SRC,
-                   deps='''LIBSMBCONF smbregistry REG_SMBCONF talloc PARAM_WITHOUT_REG
+                   deps='''LIBSMBCONF smbregistry REG_SMBCONF talloc param
                    util_reg samba-util errors3 CHARSET SAMBA_VERSION''',
                    public_headers='../lib/smbconf/smbconf.h',
                    vnum='0')
@@ -877,14 +868,13 @@ bld.SAMBA3_LIBRARY('smbconf',
 bld.SAMBA3_LIBRARY('smbd_conn',
                    source='smbd/conn.c',
                    deps='string_init bitmap namearray',
-                   allow_undefined_symbols=False,
                    private_library=True)
 
 bld.SAMBA3_LIBRARY('smbd_base',
                     source=SMBD_SRC_BASE,
                     deps='''tdb_compat tevent dl krb5 ldap gssapi gssapi_krb5
                     samba-util wbclient crypt nsl cups cap z passdb
-                    PARAM_WITHOUT_REG samba3core LIBSMB POPT_SAMBA3 KRBCLIENT AVAHI
+                    param samba3core LIBSMB POPT_SAMBA3 KRBCLIENT AVAHI
                     LIBMSRPC_GEN msrpc3 ads LIBADS_SERVER LIBADS_PRINTER
                     vfs vfs_default vfs_posixacl auth rpc LOCKING LIBAFS LIBAFS_SETTOKEN PROFILE
                     PRINTING PRINTBACKEND NDR_XATTR NDR_NOTIFY REGFIO
@@ -895,7 +885,6 @@ bld.SAMBA3_LIBRARY('smbd_base',
                     smbd_shim
                     ''',
                     private_library=True,
-                   allow_undefined_symbols=False,
                     vars=locals())
 
 bld.SAMBA3_SUBSYSTEM('LOCKING',
@@ -990,7 +979,7 @@ bld.SAMBA3_SUBSYSTEM('SLCACHE',
 
 bld.SAMBA3_SUBSYSTEM('DCUTIL',
                     source=DCUTIL_SRC,
-                     deps='ads',
+                     deps='ads LIBRPCCLI_NETLOGON msrpc3 LIBCLI_LSA3 INIT_NETLOGON',
                     vars=locals())
 
 bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
@@ -1001,63 +990,53 @@ bld.SAMBA3_SUBSYSTEM('tdb-wrap3',
 bld.SAMBA3_LIBRARY('dbwrap_util',
                    source='lib/dbwrap_util.c lib/dbwrap_rbt.c',
                    deps='samba-util UTIL_TDB errors',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_LIBRARY('util_malloc',
                    source='''lib/util_malloc.c''',
                    deps='samba-util',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_LIBRARY('string_init',
                    source='''lib/string_init.c''',
                    deps='samba-util',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_LIBRARY('util_str',
                    source='''lib/util_str.c''',
                    deps='samba-util CHARSET',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_LIBRARY('util_sec',
                    source='''lib/util_sec.c''',
                    deps='samba-util',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_LIBRARY('bitmap',
                    source='lib/bitmap.c',
                    deps='samba-util',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_LIBRARY('namearray',
                    source='lib/namearray.c',
                    deps='samba-util',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_LIBRARY('adt_tree',
                    source='lib/adt_tree.c',
                    deps='samba-util',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_LIBRARY('memcache',
                    source='lib/memcache.c',
                    deps='samba-util util_malloc',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_LIBRARY('CHARSET3',
                     source='''lib/charcnv.c lib/fstring.c''',
                     public_deps='ICONV_WRAPPER CHARSET',
                     deps='samba-util util_str',
-                   private_library=True,
-                   allow_undefined_symbols=False)
+                   private_library=True)
 
 bld.SAMBA3_SUBSYSTEM('ldb3',
                     source='lib/ldb_compat.c',
@@ -1071,9 +1050,10 @@ bld.SAMBA3_SUBSYSTEM('LIBCLI_SAMR',
                     source=LIBCLI_SAMR_SRC,
                     deps='RPC_NDR_SAMR')
 
-bld.SAMBA3_SUBSYSTEM('LIBCLI_LSA3',
-                    source=LIBCLI_LSA_SRC,
-                    deps='RPC_NDR_LSA INIT_LSA')
+bld.SAMBA3_LIBRARY('LIBCLI_LSA3',
+                   source=LIBCLI_LSA_SRC,
+                   deps='RPC_NDR_LSA INIT_LSA', 
+                   private_library=True)
 
 bld.SAMBA3_SUBSYSTEM('LIBRPCCLI_NETLOGON',
                     source=LIBRPCCLI_NETLOGON_SRC,
@@ -1150,7 +1130,7 @@ bld.SAMBA3_BINARY('web/swat',
 bld.SAMBA3_BINARY('rpcclient/rpcclient',
                  source=RPCCLIENT_SRC,
                  deps='''talloc tdb_compat cap POPT_SAMBA3 passdb LIBSMB smbd_shim
-                 PARAM_WITHOUT_REG wbclient param KRBCLIENT LIBMSRPC_GEN msrpc3
+                 param wbclient param KRBCLIENT LIBMSRPC_GEN msrpc3
                  ads SMBREADLINE DCUTIL RPC_NDR_WINREG RPC_NDR_ECHO
                  RPC_CLIENT_SCHANNEL
                  LIBCLI_SAMR LIBCLI_LSA3 LIBRPCCLI_NETLOGON LIBCLI_SPOOLSS
@@ -1163,7 +1143,7 @@ bld.SAMBA3_BINARY('rpcclient/rpcclient',
 bld.SAMBA3_BINARY('client/smbclient' + bld.env.suffix3,
                  source=CLIENT_SRC,
                  deps='''talloc tdb_compat cap POPT_SAMBA3 passdb LIBSMB smbd_shim
-                 PARAM_WITHOUT_REG wbclient param KRBCLIENT LIBMSRPC_GEN
+                 param wbclient param KRBCLIENT LIBMSRPC_GEN
                  msrpc3 SMBREADLINE libsmb/smbclient RPC_NDR_SRVSVC INIT_LSA
                  LIBCLI_SMB_COMMON''',
                  vars=locals())
@@ -1171,7 +1151,7 @@ bld.SAMBA3_BINARY('client/smbclient' + bld.env.suffix3,
 bld.SAMBA3_BINARY('net',
                  source=NET_SRC,
                  deps='''talloc tdb_compat netapi addns cap intl POPT_SAMBA3 passdb LIBSMB smbd_shim
-                 PARAM_WITHOUT_REG wbclient param KRBCLIENT LIBMSRPC_GEN msrpc3 LIBGPO ads LIBADS_SERVER LIBADS_PRINTER
+                 param wbclient param KRBCLIENT LIBMSRPC_GEN msrpc3 LIBGPO ads LIBADS_SERVER LIBADS_PRINTER
                  LIBAFS LIBAFS_SETTOKEN SMBREADLINE PASSWD_UTIL LIBNET
                  LIBNET_DSSYNC LIBNET_SAMSYNC LIBEVENTLOG DCUTIL
                  REGFIO NDR_NTPRINTING RPC_NDR_WINREG


-- 
Samba Shared Repository


More information about the samba-cvs mailing list