[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Mon Oct 17 09:40:02 MDT 2011


The branch, master has been updated
       via  b96a9e1 s3-waf: make sure we always build example pdb modules with --enable-developer.
       via  bc536d4 s3-passdb: fix the build of example pdb test module.
       via  234f06e s3-auth: remove dead prototype.
       via  235f78a s3-waf: make sure we always build example auth modules with --enable-developer.
       via  329c4d1 s3-auth: fix the build of skel auth example module.
      from  ebcf45b s4:dlz_bind9: add no memory checks

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


- Log -----------------------------------------------------------------
commit b96a9e1c5b23271f42734a8045e4d95a42e8e33f
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 17 16:08:50 2011 +0200

    s3-waf: make sure we always build example pdb modules with --enable-developer.
    
    Guenther
    
    Autobuild-User: Günther Deschner <gd at samba.org>
    Autobuild-Date: Mon Oct 17 17:39:36 CEST 2011 on sn-devel-104

commit bc536d4893678eec2a3fbba40fb133a24761992a
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 17 16:08:04 2011 +0200

    s3-passdb: fix the build of example pdb test module.
    
    Guenther

commit 234f06eae1a05a232ec1d09250badd6706b8beb2
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 17 15:56:08 2011 +0200

    s3-auth: remove dead prototype.
    
    Guenther

commit 235f78aa955084c87fbc9f3bc9f556a9811a71c4
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 17 15:54:17 2011 +0200

    s3-waf: make sure we always build example auth modules with --enable-developer.
    
    Guenther

commit 329c4d12f9a08d9499f9982076bdd9e614fbdd63
Author: Günther Deschner <gd at samba.org>
Date:   Mon Oct 17 15:53:19 2011 +0200

    s3-auth: fix the build of skel auth example module.
    
    Guenther

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

Summary of changes:
 examples/auth/auth_skel.c   |   25 ++++++++++++++++++++-----
 examples/auth/wscript_build |    9 +++++++++
 examples/pdb/test.c         |   33 +--------------------------------
 examples/pdb/wscript_build  |   10 ++++++++++
 source3/auth/proto.h        |    1 -
 source3/wscript             |    1 +
 source3/wscript_build       |    2 ++
 7 files changed, 43 insertions(+), 38 deletions(-)
 create mode 100644 examples/auth/wscript_build
 create mode 100644 examples/pdb/wscript_build


Changeset truncated at 500 lines:

diff --git a/examples/auth/auth_skel.c b/examples/auth/auth_skel.c
index e6cbd73..4352251 100644
--- a/examples/auth/auth_skel.c
+++ b/examples/auth/auth_skel.c
@@ -19,6 +19,7 @@
 */
 
 #include "includes.h"
+#include "auth.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
@@ -26,8 +27,8 @@
 static NTSTATUS check_skel_security(const struct auth_context *auth_context,
 					 void *my_private_data, 
 					 TALLOC_CTX *mem_ctx,
-					 const auth_usersupplied_info *user_info, 
-					 auth_serversupplied_info **server_info)
+					 const struct auth_usersupplied_info *user_info,
+					 struct auth_serversupplied_info **server_info)
 {
 	if (!user_info || !auth_context) {
 		return NT_STATUS_LOGON_FAILURE;
@@ -43,12 +44,26 @@ static NTSTATUS check_skel_security(const struct auth_context *auth_context,
 /* module initialisation */
 NTSTATUS auth_init_skel(struct auth_context *auth_context, const char *param, auth_methods **auth_method) 
 {
-	if (!make_auth_methods(auth_context, auth_method)) {
+	struct auth_methods *result;
+
+	result = talloc_zero(auth_context, struct auth_methods);
+	if (result == NULL) {
 		return NT_STATUS_NO_MEMORY;
 	}
+	result->name = "skel";
+	result->auth = check_skel_security;
+
+	if (param && *param) {
+		/* we load the 'fallback' module - if skel isn't here, call this
+		   module */
+		auth_methods *priv;
+		if (!load_auth_module(auth_context, param, &priv)) {
+			return NT_STATUS_UNSUCCESSFUL;
+		}
+		result->private_data = (void *)priv;
+	}
 
-	(*auth_method)->auth = check_skel_security;
-	(*auth_method)->name = "skel";
+        *auth_method = result;
 	return NT_STATUS_OK;
 }
 
diff --git a/examples/auth/wscript_build b/examples/auth/wscript_build
new file mode 100644
index 0000000..91f5302
--- /dev/null
+++ b/examples/auth/wscript_build
@@ -0,0 +1,9 @@
+#!/usr/bin/env python
+
+bld.SAMBA3_MODULE('auth_skel',
+                 subsystem='auth',
+                 source='auth_skel.c',
+                 deps='samba-util',
+                 init_function='',
+                 internal_module=bld.SAMBA3_IS_STATIC_MODULE('auth_skel'),
+                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('auth_skel'))
diff --git a/examples/pdb/test.c b/examples/pdb/test.c
index 568b448..fb7806f 100644
--- a/examples/pdb/test.c
+++ b/examples/pdb/test.c
@@ -18,41 +18,13 @@
 
 
 #include "includes.h"
+#include "passdb.h"
 
 static int testsam_debug_level = DBGC_ALL;
 
 #undef DBGC_CLASS
 #define DBGC_CLASS testsam_debug_level
 
-/***************************************************************
- Start enumeration of the passwd list.
-****************************************************************/
-
-static NTSTATUS testsam_setsampwent(struct pdb_methods *methods, BOOL update, uint32 acb_mask)
-{
-	DEBUG(10, ("testsam_setsampwent called\n"));
-	return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-/***************************************************************
- End enumeration of the passwd list.
-****************************************************************/
-
-static void testsam_endsampwent(struct pdb_methods *methods)
-{
-	DEBUG(10, ("testsam_endsampwent called\n"));
-}
-
-/*****************************************************************
- Get one struct samu from the list (next in line)
-*****************************************************************/
-
-static NTSTATUS testsam_getsampwent(struct pdb_methods *methods, struct samu *user)
-{
-	DEBUG(10, ("testsam_getsampwent called\n"));
-	return NT_STATUS_NOT_IMPLEMENTED;
-}
-
 /******************************************************************
  Lookup a name in the SAM database
 ******************************************************************/
@@ -116,9 +88,6 @@ NTSTATUS testsam_init(struct pdb_methods **pdb_method, const char *location)
 	/* Functions your pdb module doesn't provide should not be
 	   set, make_pdb_methods() already provide suitable defaults for missing functions */
 
-	(*pdb_method)->setsampwent = testsam_setsampwent;
-	(*pdb_method)->endsampwent = testsam_endsampwent;
-	(*pdb_method)->getsampwent = testsam_getsampwent;
 	(*pdb_method)->getsampwnam = testsam_getsampwnam;
 	(*pdb_method)->getsampwsid = testsam_getsampwsid;
 	(*pdb_method)->add_sam_account = testsam_add_sam_account;
diff --git a/examples/pdb/wscript_build b/examples/pdb/wscript_build
new file mode 100644
index 0000000..11d00ba
--- /dev/null
+++ b/examples/pdb/wscript_build
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+bld.SAMBA3_MODULE('pdb_test',
+                 subsystem='pdb',
+                 source='test.c',
+                 deps='samba-util',
+                 init_function='',
+                 internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_test'),
+                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_test'))
+
diff --git a/source3/auth/proto.h b/source3/auth/proto.h
index 5dded14..a7266d6 100644
--- a/source3/auth/proto.h
+++ b/source3/auth/proto.h
@@ -199,7 +199,6 @@ NTSTATUS make_server_info_wbcAuthUserInfo(TALLOC_CTX *mem_ctx,
 					  const struct wbcAuthUserInfo *info,
 					  struct auth_serversupplied_info **server_info);
 void free_user_info(struct auth_usersupplied_info **user_info);
-bool make_auth_methods(struct auth_context *auth_context, auth_methods **auth_method) ;
 bool is_trusted_domain(const char* dom_name);
 
 /* The following definitions come from auth/user_info.c  */
diff --git a/source3/wscript b/source3/wscript
index 6717852..5746533 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1639,6 +1639,7 @@ main() {
         default_static_modules.extend(TO_LIST('pdb_ads auth_netlogond charset_weird'))
         default_shared_modules.extend(TO_LIST('perfcount_test'))
         default_shared_modules.extend(TO_LIST('vfs_skel_opaque vfs_skel_transparent vfs_shadow_copy_test'))
+        default_shared_modules.extend(TO_LIST('auth_skel pdb_test'))
 
     default_static_modules.extend(TO_LIST('pdb_samba4 auth_samba4 vfs_dfs_samba4'))
 
diff --git a/source3/wscript_build b/source3/wscript_build
index 0e5de86..6c27ecd 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -1406,6 +1406,8 @@ bld.RECURSE('pam_smbpass')
 bld.RECURSE('passdb')
 bld.RECURSE('rpc_server')
 bld.RECURSE('winbindd')
+bld.RECURSE('../examples/auth')
+bld.RECURSE('../examples/pdb')
 bld.RECURSE('../examples/VFS')
 
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list