[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-400-g467cc69

2009-03-16 Thread Andrew Tridgell
The branch, master has been updated
   via  467cc6927f57e36ce9b97131e72b79ef6e39a668 (commit)
   via  a1ebb850209289734b12ea966b01d295d8fc436d (commit)
  from  382d8069adcc49e351eef63d86036ae553b119a2 (commit)

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


- Log -
commit 467cc6927f57e36ce9b97131e72b79ef6e39a668
Merge: a1ebb850209289734b12ea966b01d295d8fc436d 
382d8069adcc49e351eef63d86036ae553b119a2
Author: Andrew Tridgell 
Date:   Tue Mar 17 14:19:25 2009 +1100

Merge branch 'master' of ssh://git.samba.org/data/git/samba

commit a1ebb850209289734b12ea966b01d295d8fc436d
Author: Andrew Tridgell 
Date:   Tue Mar 17 14:18:53 2009 +1100

added support for parentGUID

This is made up of 4 parts:

  1) change our schema to include the parentGUID attribute type

  2) in the add hook in the objectclass module, get the objectGUID of
  the parent and add it to the message as parentGUID

  3) in the rename hook in the objectclass module, get the objectGUID
  of the new parent, and insert an async modify request after the
  renmam is done

  4) added a simple test suite

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/objectclass.c |   89 --
 source4/lib/ldb/tests/python/ldap.py |   30 +
 source4/setup/schema.ldif|   15 
 3 files changed, 129 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c 
b/source4/dsdb/samdb/ldb_modules/objectclass.c
index 898d913..7883bcc 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -414,6 +414,7 @@ static int objectclass_add(struct ldb_module *module, 
struct ldb_request *req)
struct oc_context *ac;
struct ldb_dn *parent_dn;
int ret;
+   static const char * const parent_attrs[] = { "objectGUID", NULL };
 
ldb = ldb_module_get_ctx(module);
 
@@ -449,7 +450,7 @@ static int objectclass_add(struct ldb_module *module, 
struct ldb_request *req)
 
ret = ldb_build_search_req(&search_req, ldb,
   ac, parent_dn, LDB_SCOPE_BASE,
-  "(objectClass=*)", NULL,
+  "(objectClass=*)", parent_attrs,
   NULL,
   ac, get_search_callback,
   req);
@@ -500,7 +501,8 @@ static int objectclass_do_add(struct oc_context *ac)
return LDB_ERR_UNWILLING_TO_PERFORM;
}
} else {
-   
+   const struct ldb_val *parent_guid;
+
/* Fix up the DN to be in the standard form, taking particular 
care to match the parent DN */
ret = fix_dn(msg, 
 ac->req->op.add.message->dn,
@@ -514,10 +516,24 @@ static int objectclass_do_add(struct oc_context *ac)
return ret;
}
 
+   parent_guid = ldb_msg_find_ldb_val(ac->search_res->message, 
"objectGUID");
+   if (parent_guid == NULL) {
+   ldb_asprintf_errstring(ldb, "objectclass: Cannot add 
%s, parent does not have an objectGUID!", 
+  ldb_dn_get_linearized(msg->dn));
+   talloc_free(mem_ctx);
+   return LDB_ERR_UNWILLING_TO_PERFORM;
+   }
+
/* TODO: Check this is a valid child to this parent,
 * by reading the allowedChildClasses and
 * allowedChildClasssesEffective attributes */
-
+   ret = ldb_msg_add_steal_value(msg, "parentGUID", 
discard_const(parent_guid));
+   if (ret != LDB_SUCCESS) {
+   ldb_asprintf_errstring(ldb, "objectclass: Cannot add 
%s, failed to add parentGUID", 
+  ldb_dn_get_linearized(msg->dn));
+   talloc_free(mem_ctx);
+   return LDB_ERR_UNWILLING_TO_PERFORM;

+   }
}
 
if (schema) {
@@ -974,7 +990,7 @@ static int objectclass_do_rename(struct oc_context *ac);
 
 static int objectclass_rename(struct ldb_module *module, struct ldb_request 
*req)
 {
-   static const char * const attrs[] = { NULL };
+   static const char * const attrs[] = { "objectGUID", NULL };
struct ldb_context *ldb;
struct ldb_request *search_req;
struct oc_context *ac;
@@ -1007,6 +1023,9 @@ static int objectclass_rename(struct ldb_module *module, 
struct ldb_request *req
ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;

Build status as of Tue Mar 17 00:00:02 2009

2009-03-16 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-03-16 
00:00:19.0 +
+++ /home/build/master/cache/broken_results.txt 2009-03-17 00:00:24.0 
+
@@ -1,23 +1,23 @@
-Build status as of Mon Mar 16 00:00:02 2009
+Build status as of Tue Mar 17 00:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   25 5  0 
+ccache   28 5  0 
 ctdb 0  0  0 
 distcc   0  0  0 
-ldb  27 27 0 
-libreplace   28 9  0 
+ldb  28 28 0 
+libreplace   27 9  0 
 lorikeet-heimdal 25 12 0 
 pidl 20 2  0 
 ppp  13 0  0 
 rsync28 8  0 
 samba-docs   0  0  0 
 samba-gtk5  5  0 
-samba_3_X_devel 27 24 0 
+samba_3_X_devel 27 27 0 
 samba_3_X_test 26 24 0 
 samba_4_0_test 28 27 0 
 smb-build27 4  0 
-talloc   27 27 0 
-tdb  27 8  0 
+talloc   28 28 0 
+tdb  28 9  0 
 


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-398-g382d806

2009-03-16 Thread Jeremy Allison
The branch, master has been updated
   via  382d8069adcc49e351eef63d86036ae553b119a2 (commit)
  from  8a2b7b3e56230c46df9ae3820578a2f3e765d32d (commit)

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


- Log -
commit 382d8069adcc49e351eef63d86036ae553b119a2
Author: Jeremy Allison 
Date:   Mon Mar 16 16:38:15 2009 -0700

Add some appropriate const.
Jeremy.

---

Summary of changes:
 source3/include/proto.h |   16 
 source3/lib/util.c  |   16 
 2 files changed, 16 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 36aad98..6016ae7 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1072,26 +1072,26 @@ const char *my_netbios_names(int i);
 bool set_netbios_aliases(const char **str_array);
 bool init_names(void);
 struct user_auth_info *user_auth_info_init(TALLOC_CTX *mem_ctx);
-const char *get_cmdline_auth_info_username(struct user_auth_info *auth_info);
+const char *get_cmdline_auth_info_username(const struct user_auth_info 
*auth_info);
 void set_cmdline_auth_info_username(struct user_auth_info *auth_info,
const char *username);
 void set_cmdline_auth_info_password(struct user_auth_info *auth_info,
const char *password);
-const char *get_cmdline_auth_info_password(struct user_auth_info *auth_info);
+const char *get_cmdline_auth_info_password(const struct user_auth_info 
*auth_info);
 bool set_cmdline_auth_info_signing_state(struct user_auth_info *auth_info,
 const char *arg);
-int get_cmdline_auth_info_signing_state(struct user_auth_info *auth_info);
+int get_cmdline_auth_info_signing_state(const struct user_auth_info 
*auth_info);
 void set_cmdline_auth_info_use_kerberos(struct user_auth_info *auth_info,
bool b);
-bool get_cmdline_auth_info_use_kerberos(struct user_auth_info *auth_info);
+bool get_cmdline_auth_info_use_kerberos(const struct user_auth_info 
*auth_info);
 void set_cmdline_auth_info_use_krb5_ticket(struct user_auth_info *auth_info);
 void set_cmdline_auth_info_smb_encrypt(struct user_auth_info *auth_info);
 void set_cmdline_auth_info_use_machine_account(struct user_auth_info 
*auth_info);
-bool get_cmdline_auth_info_got_pass(struct user_auth_info *auth_info);
-bool get_cmdline_auth_info_smb_encrypt(struct user_auth_info *auth_info);
-bool get_cmdline_auth_info_use_machine_account(struct user_auth_info 
*auth_info);
+bool get_cmdline_auth_info_got_pass(const struct user_auth_info *auth_info);
+bool get_cmdline_auth_info_smb_encrypt(const struct user_auth_info *auth_info);
+bool get_cmdline_auth_info_use_machine_account(const struct user_auth_info 
*auth_info);
 struct user_auth_info *get_cmdline_auth_info_copy(TALLOC_CTX *mem_ctx,
-struct user_auth_info *info);
+const struct user_auth_info 
*info);
 bool set_cmdline_auth_info_machine_account_creds(struct user_auth_info 
*auth_info);
 bool add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
 gid_t **gids, size_t *num_gids);
diff --git a/source3/lib/util.c b/source3/lib/util.c
index ec794ca..613cc1e 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -290,7 +290,7 @@ struct user_auth_info *user_auth_info_init(TALLOC_CTX 
*mem_ctx)
return result;
 }
 
-const char *get_cmdline_auth_info_username(struct user_auth_info *auth_info)
+const char *get_cmdline_auth_info_username(const struct user_auth_info 
*auth_info)
 {
if (!auth_info->username) {
return "";
@@ -308,7 +308,7 @@ void set_cmdline_auth_info_username(struct user_auth_info 
*auth_info,
}
 }
 
-const char *get_cmdline_auth_info_password(struct user_auth_info *auth_info)
+const char *get_cmdline_auth_info_password(const struct user_auth_info 
*auth_info)
 {
if (!auth_info->password) {
return "";
@@ -346,7 +346,7 @@ bool set_cmdline_auth_info_signing_state(struct 
user_auth_info *auth_info,
return true;
 }
 
-int get_cmdline_auth_info_signing_state(struct user_auth_info *auth_info)
+int get_cmdline_auth_info_signing_state(const struct user_auth_info *auth_info)
 {
return auth_info->signing_state;
 }
@@ -357,7 +357,7 @@ void set_cmdline_auth_info_use_kerberos(struct 
user_auth_info *auth_info,
 auth_info->use_kerberos = b;
 }
 
-bool get_cmdline_auth_info_use_kerberos(struct user_auth_info *auth_info)
+bool get_cmdline_auth_info_use_kerberos(const struct user_auth_info *auth_info)
 {
return auth_info->use_kerberos;
 }
@@ -380,23 +380,23 @@ void set_cmdline_auth_info_use_machine_account(struct 
user_auth_info *auth_info)

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-371-gda2cd75

2009-03-16 Thread Volker Lendecke
The branch, v3-4-test has been updated
   via  da2cd75615f72b1e3d138e0d374fea0998800355 (commit)
  from  7a5f973b2cfde4d696b2c54f6a701062e57a547b (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -
commit da2cd75615f72b1e3d138e0d374fea0998800355
Author: Volker Lendecke 
Date:   Mon Mar 16 21:02:26 2009 +0100

Remove unused async_req references from wb_reqtrans.c

---

Summary of changes:
 source3/include/wbc_async.h |2 --
 source3/lib/wb_reqtrans.c   |   37 -
 2 files changed, 0 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h
index 37f500e..eaec0d1 100644
--- a/source3/include/wbc_async.h
+++ b/source3/include/wbc_async.h
@@ -33,9 +33,7 @@ wbcErr wb_trans_recv(struct tevent_req *req, TALLOC_CTX 
*mem_ctx,
 struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx);
 
 /* Definitions from wb_reqtrans.c */
-bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err);
 wbcErr map_wbc_err_from_errno(int error);
-wbcErr async_req_simple_recv_wbcerr(struct async_req *req);
 
 bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err);
 wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req);
diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c
index e1c6749..dbea8b6 100644
--- a/source3/lib/wb_reqtrans.c
+++ b/source3/lib/wb_reqtrans.c
@@ -25,32 +25,6 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 
-bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err)
-{
-   enum async_req_state state;
-   uint64_t error;
-   if (!async_req_is_error(req, &state, &error)) {
-   *pwbc_err = WBC_ERR_SUCCESS;
-   return false;
-   }
-
-   switch (state) {
-   case ASYNC_REQ_USER_ERROR:
-   *pwbc_err = error;
-   break;
-   case ASYNC_REQ_TIMED_OUT:
-   *pwbc_err = WBC_ERR_UNKNOWN_FAILURE;
-   break;
-   case ASYNC_REQ_NO_MEMORY:
-   *pwbc_err = WBC_ERR_NO_MEMORY;
-   break;
-   default:
-   *pwbc_err = WBC_ERR_UNKNOWN_FAILURE;
-   break;
-   }
-   return true;
-}
-
 wbcErr map_wbc_err_from_errno(int error)
 {
switch(error) {
@@ -65,17 +39,6 @@ wbcErr map_wbc_err_from_errno(int error)
}
 }
 
-wbcErr async_req_simple_recv_wbcerr(struct async_req *req)
-{
-   wbcErr wbc_err;
-
-   if (async_req_is_wbcerr(req, &wbc_err)) {
-   return wbc_err;
-   }
-
-   return WBC_ERR_SUCCESS;
-}
-
 bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err)
 {
enum tevent_req_state state;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-397-g8a2b7b3

2009-03-16 Thread Volker Lendecke
The branch, master has been updated
   via  8a2b7b3e56230c46df9ae3820578a2f3e765d32d (commit)
  from  05b49fd4c8aaf779b98eb2eabb860295dc1300b9 (commit)

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


- Log -
commit 8a2b7b3e56230c46df9ae3820578a2f3e765d32d
Author: Volker Lendecke 
Date:   Mon Mar 16 21:02:26 2009 +0100

Remove unused async_req references from wb_reqtrans.c

---

Summary of changes:
 source3/include/wbc_async.h |2 --
 source3/lib/wb_reqtrans.c   |   37 -
 2 files changed, 0 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h
index 37f500e..eaec0d1 100644
--- a/source3/include/wbc_async.h
+++ b/source3/include/wbc_async.h
@@ -33,9 +33,7 @@ wbcErr wb_trans_recv(struct tevent_req *req, TALLOC_CTX 
*mem_ctx,
 struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx);
 
 /* Definitions from wb_reqtrans.c */
-bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err);
 wbcErr map_wbc_err_from_errno(int error);
-wbcErr async_req_simple_recv_wbcerr(struct async_req *req);
 
 bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err);
 wbcErr tevent_req_simple_recv_wbcerr(struct tevent_req *req);
diff --git a/source3/lib/wb_reqtrans.c b/source3/lib/wb_reqtrans.c
index e1c6749..dbea8b6 100644
--- a/source3/lib/wb_reqtrans.c
+++ b/source3/lib/wb_reqtrans.c
@@ -25,32 +25,6 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
 
-bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err)
-{
-   enum async_req_state state;
-   uint64_t error;
-   if (!async_req_is_error(req, &state, &error)) {
-   *pwbc_err = WBC_ERR_SUCCESS;
-   return false;
-   }
-
-   switch (state) {
-   case ASYNC_REQ_USER_ERROR:
-   *pwbc_err = error;
-   break;
-   case ASYNC_REQ_TIMED_OUT:
-   *pwbc_err = WBC_ERR_UNKNOWN_FAILURE;
-   break;
-   case ASYNC_REQ_NO_MEMORY:
-   *pwbc_err = WBC_ERR_NO_MEMORY;
-   break;
-   default:
-   *pwbc_err = WBC_ERR_UNKNOWN_FAILURE;
-   break;
-   }
-   return true;
-}
-
 wbcErr map_wbc_err_from_errno(int error)
 {
switch(error) {
@@ -65,17 +39,6 @@ wbcErr map_wbc_err_from_errno(int error)
}
 }
 
-wbcErr async_req_simple_recv_wbcerr(struct async_req *req)
-{
-   wbcErr wbc_err;
-
-   if (async_req_is_wbcerr(req, &wbc_err)) {
-   return wbc_err;
-   }
-
-   return WBC_ERR_SUCCESS;
-}
-
 bool tevent_req_is_wbcerr(struct tevent_req *req, wbcErr *pwbc_err)
 {
enum tevent_req_state state;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-370-g7a5f973

2009-03-16 Thread Volker Lendecke
The branch, v3-4-test has been updated
   via  7a5f973b2cfde4d696b2c54f6a701062e57a547b (commit)
   via  f60b259c0805d4fd1129ad620da18ea8d7c29202 (commit)
   via  16def87b5e6271c8c5aee09781414455f1eaa7d1 (commit)
   via  157f0dc5e1385f019a159e996b3a7b5875361101 (commit)
   via  5123011f5ceb5f58db6fdade69a2c382cf5ba966 (commit)
  from  1e08799f3c5bb7059f6d355b99f8617461c31d1a (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -
commit 7a5f973b2cfde4d696b2c54f6a701062e57a547b
Author: Volker Lendecke 
Date:   Mon Mar 16 20:38:11 2009 +0100

Convert wb_trans to tevent_req

commit f60b259c0805d4fd1129ad620da18ea8d7c29202
Author: Volker Lendecke 
Date:   Mon Mar 16 20:25:25 2009 +0100

Remove an unnecessary variable

commit 16def87b5e6271c8c5aee09781414455f1eaa7d1
Author: Volker Lendecke 
Date:   Mon Mar 16 20:23:37 2009 +0100

Make struct wb_context private to wbclient.c

commit 157f0dc5e1385f019a159e996b3a7b5875361101
Author: Volker Lendecke 
Date:   Mon Mar 16 20:17:45 2009 +0100

Remove some unused code from async_req.[ch]

commit 5123011f5ceb5f58db6fdade69a2c382cf5ba966
Author: Volker Lendecke 
Date:   Mon Mar 16 20:15:23 2009 +0100

Use tevent_wakeup_send in wb_trans

---

Summary of changes:
 lib/async_req/async_req.c   |   42 
 lib/async_req/async_req.h   |9 ---
 source3/include/wbc_async.h |   17 ++---
 source3/lib/wbclient.c  |  145 ---
 source3/torture/torture.c   |9 +--
 5 files changed, 78 insertions(+), 144 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/async_req/async_req.c b/lib/async_req/async_req.c
index 054c9f9..4dfe809 100644
--- a/lib/async_req/async_req.c
+++ b/lib/async_req/async_req.c
@@ -194,48 +194,6 @@ bool async_req_is_error(struct async_req *req, enum 
async_req_state *state,
return true;
 }
 
-static void async_req_timedout(struct tevent_context *ev,
-  struct tevent_timer *te,
-  struct timeval now,
-  void *priv)
-{
-   struct async_req *req = talloc_get_type_abort(priv, struct async_req);
-   TALLOC_FREE(te);
-   async_req_finish(req, ASYNC_REQ_TIMED_OUT);
-}
-
-bool async_req_set_timeout(struct async_req *req, struct tevent_context *ev,
-  struct timeval to)
-{
-   return (tevent_add_timer(
-   ev, req,
-   tevent_timeval_current_ofs(to.tv_sec, to.tv_usec),
-   async_req_timedout, req)
-   != NULL);
-}
-
-struct async_req *async_wait_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct timeval to)
-{
-   struct async_req *result;
-
-   result = async_req_new(mem_ctx);
-   if (result == NULL) {
-   return result;
-   }
-   if (!async_req_set_timeout(result, ev, to)) {
-   TALLOC_FREE(result);
-   return NULL;
-   }
-   return result;
-}
-
-bool async_wait_recv(struct async_req *req)
-{
-   return true;
-}
-
 struct async_queue_entry {
struct async_queue_entry *prev, *next;
struct async_req_queue *queue;
diff --git a/lib/async_req/async_req.h b/lib/async_req/async_req.h
index fc84988..fdec1b7 100644
--- a/lib/async_req/async_req.h
+++ b/lib/async_req/async_req.h
@@ -139,15 +139,6 @@ bool async_post_error(struct async_req *req, struct 
tevent_context *ev,
 bool async_req_is_error(struct async_req *req, enum async_req_state *state,
uint64_t *error);
 
-bool async_req_set_timeout(struct async_req *req, struct tevent_context *ev,
-  struct timeval to);
-
-struct async_req *async_wait_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct timeval to);
-
-bool async_wait_recv(struct async_req *req);
-
 struct async_req_queue;
 
 struct async_req_queue *async_req_queue_init(TALLOC_CTX *mem_ctx);
diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h
index fd9b669..37f500e 100644
--- a/source3/include/wbc_async.h
+++ b/source3/include/wbc_async.h
@@ -22,16 +22,13 @@
 
 #include "nsswitch/libwbclient/wbclient.h"
 
-struct wb_context {
-   struct async_req_queue *queue;
-   int fd;
-   bool is_priv;
-};
+struct wb_context;
 
-struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-   struct wb_context *wb_ctx, bool need_priv,
-   struct winbindd_request *wb_req);
-wbcErr wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+struct tevent_req *wb_trans_send(TALLOC_CTX *mem_ctx,
+struct tevent

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-396-g05b49fd

2009-03-16 Thread Volker Lendecke
The branch, master has been updated
   via  05b49fd4c8aaf779b98eb2eabb860295dc1300b9 (commit)
   via  1624b58beb4b3278acf7de721392ccc7dda65013 (commit)
   via  a58eccfee742bcecbd4a2e5662305c5077024244 (commit)
   via  54b9ad4f1fd07506445386142904bfc266b54075 (commit)
   via  5c848e47cc89f5b6658c2de2d742540e56db29dc (commit)
  from  20cee26a3dbd231672eec9133c6e84641def298d (commit)

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


- Log -
commit 05b49fd4c8aaf779b98eb2eabb860295dc1300b9
Author: Volker Lendecke 
Date:   Mon Mar 16 20:38:11 2009 +0100

Convert wb_trans to tevent_req

commit 1624b58beb4b3278acf7de721392ccc7dda65013
Author: Volker Lendecke 
Date:   Mon Mar 16 20:25:25 2009 +0100

Remove an unnecessary variable

commit a58eccfee742bcecbd4a2e5662305c5077024244
Author: Volker Lendecke 
Date:   Mon Mar 16 20:23:37 2009 +0100

Make struct wb_context private to wbclient.c

commit 54b9ad4f1fd07506445386142904bfc266b54075
Author: Volker Lendecke 
Date:   Mon Mar 16 20:17:45 2009 +0100

Remove some unused code from async_req.[ch]

commit 5c848e47cc89f5b6658c2de2d742540e56db29dc
Author: Volker Lendecke 
Date:   Mon Mar 16 20:15:23 2009 +0100

Use tevent_wakeup_send in wb_trans

---

Summary of changes:
 lib/async_req/async_req.c   |   42 
 lib/async_req/async_req.h   |9 ---
 source3/include/wbc_async.h |   17 ++---
 source3/lib/wbclient.c  |  145 ---
 source3/torture/torture.c   |9 +--
 5 files changed, 78 insertions(+), 144 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/async_req/async_req.c b/lib/async_req/async_req.c
index 054c9f9..4dfe809 100644
--- a/lib/async_req/async_req.c
+++ b/lib/async_req/async_req.c
@@ -194,48 +194,6 @@ bool async_req_is_error(struct async_req *req, enum 
async_req_state *state,
return true;
 }
 
-static void async_req_timedout(struct tevent_context *ev,
-  struct tevent_timer *te,
-  struct timeval now,
-  void *priv)
-{
-   struct async_req *req = talloc_get_type_abort(priv, struct async_req);
-   TALLOC_FREE(te);
-   async_req_finish(req, ASYNC_REQ_TIMED_OUT);
-}
-
-bool async_req_set_timeout(struct async_req *req, struct tevent_context *ev,
-  struct timeval to)
-{
-   return (tevent_add_timer(
-   ev, req,
-   tevent_timeval_current_ofs(to.tv_sec, to.tv_usec),
-   async_req_timedout, req)
-   != NULL);
-}
-
-struct async_req *async_wait_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct timeval to)
-{
-   struct async_req *result;
-
-   result = async_req_new(mem_ctx);
-   if (result == NULL) {
-   return result;
-   }
-   if (!async_req_set_timeout(result, ev, to)) {
-   TALLOC_FREE(result);
-   return NULL;
-   }
-   return result;
-}
-
-bool async_wait_recv(struct async_req *req)
-{
-   return true;
-}
-
 struct async_queue_entry {
struct async_queue_entry *prev, *next;
struct async_req_queue *queue;
diff --git a/lib/async_req/async_req.h b/lib/async_req/async_req.h
index fc84988..fdec1b7 100644
--- a/lib/async_req/async_req.h
+++ b/lib/async_req/async_req.h
@@ -139,15 +139,6 @@ bool async_post_error(struct async_req *req, struct 
tevent_context *ev,
 bool async_req_is_error(struct async_req *req, enum async_req_state *state,
uint64_t *error);
 
-bool async_req_set_timeout(struct async_req *req, struct tevent_context *ev,
-  struct timeval to);
-
-struct async_req *async_wait_send(TALLOC_CTX *mem_ctx,
- struct tevent_context *ev,
- struct timeval to);
-
-bool async_wait_recv(struct async_req *req);
-
 struct async_req_queue;
 
 struct async_req_queue *async_req_queue_init(TALLOC_CTX *mem_ctx);
diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h
index fd9b669..37f500e 100644
--- a/source3/include/wbc_async.h
+++ b/source3/include/wbc_async.h
@@ -22,16 +22,13 @@
 
 #include "nsswitch/libwbclient/wbclient.h"
 
-struct wb_context {
-   struct async_req_queue *queue;
-   int fd;
-   bool is_priv;
-};
+struct wb_context;
 
-struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-   struct wb_context *wb_ctx, bool need_priv,
-   struct winbindd_request *wb_req);
-wbcErr wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+struct tevent_req *wb_trans_send(TALLOC_CTX *mem_ctx,
+struct tevent_conte

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-365-g1e08799

2009-03-16 Thread Volker Lendecke
The branch, v3-4-test has been updated
   via  1e08799f3c5bb7059f6d355b99f8617461c31d1a (commit)
  from  e848f3a079ebb2f125aa2b4e7c6917d82af7b3f0 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -
commit 1e08799f3c5bb7059f6d355b99f8617461c31d1a
Author: Volker Lendecke 
Date:   Mon Mar 16 19:15:26 2009 +0100

Convert open_socket_out_defer to tevent_req
(cherry picked from commit 20cee26a3dbd231672eec9133c6e84641def298d)

---

Summary of changes:
 source3/include/proto.h |   14 +-
 source3/lib/util_sock.c |   58 +-
 source3/libsmb/cliconnect.c |   59 +++
 3 files changed, 73 insertions(+), 58 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index f992f06..36aad98 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1396,13 +1396,13 @@ struct tevent_req *open_socket_out_send(TALLOC_CTX 
*mem_ctx,
uint16_t port,
int timeout);
 NTSTATUS open_socket_out_recv(struct tevent_req *req, int *pfd);
-struct async_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
-struct event_context *ev,
-struct timeval wait_time,
-const struct sockaddr_storage *pss,
-uint16_t port,
-int timeout);
-NTSTATUS open_socket_out_defer_recv(struct async_req *req, int *pfd);
+struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct timeval wait_time,
+ const struct sockaddr_storage 
*pss,
+ uint16_t port,
+ int timeout);
+NTSTATUS open_socket_out_defer_recv(struct tevent_req *req, int *pfd);
 bool open_any_socket_out(struct sockaddr_storage *addrs, int num_addrs,
 int timeout, int *fd_index, int *fd);
 int open_udp_socket(const char *host, int port);
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 499fc73..de5b232 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -1155,19 +1155,19 @@ struct open_socket_out_defer_state {
 static void open_socket_out_defer_waited(struct tevent_req *subreq);
 static void open_socket_out_defer_connected(struct tevent_req *subreq);
 
-struct async_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
-struct event_context *ev,
-struct timeval wait_time,
-const struct sockaddr_storage *pss,
-uint16_t port,
-int timeout)
+struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct timeval wait_time,
+ const struct sockaddr_storage 
*pss,
+ uint16_t port,
+ int timeout)
 {
-   struct async_req *result;
-   struct tevent_req *subreq;
+   struct tevent_req *req, *subreq;
struct open_socket_out_defer_state *state;
 
-   if (!async_req_setup(mem_ctx, &result, &state,
-struct open_socket_out_defer_state)) {
+   req = tevent_req_create(mem_ctx, &state,
+   struct open_socket_out_defer_state);
+   if (req == NULL) {
return NULL;
}
state->ev = ev;
@@ -1181,31 +1181,31 @@ struct async_req *open_socket_out_defer_send(TALLOC_CTX 
*mem_ctx,
if (subreq == NULL) {
goto fail;
}
-   tevent_req_set_callback(subreq, open_socket_out_defer_waited, result);
-   return result;
+   tevent_req_set_callback(subreq, open_socket_out_defer_waited, req);
+   return req;
  fail:
-   TALLOC_FREE(result);
+   TALLOC_FREE(req);
return NULL;
 }
 
 static void open_socket_out_defer_waited(struct tevent_req *subreq)
 {
-   struct async_req *req = tevent_req_callback_data(
-   subreq, struct async_req);
-   struct open_socket_out_defer_state *state = talloc_get_type_abort(
-   req->private_data, struct open_socket_out_defer_state);
+   struct tevent_req *req = tevent_req_callback_data(
+  

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-391-g20cee26

2009-03-16 Thread Volker Lendecke
The branch, master has been updated
   via  20cee26a3dbd231672eec9133c6e84641def298d (commit)
  from  cb9effdc636731c1eba1101798d30f114fc83e19 (commit)

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


- Log -
commit 20cee26a3dbd231672eec9133c6e84641def298d
Author: Volker Lendecke 
Date:   Mon Mar 16 19:15:26 2009 +0100

Convert open_socket_out_defer to tevent_req

---

Summary of changes:
 source3/include/proto.h |   14 +-
 source3/lib/util_sock.c |   58 +-
 source3/libsmb/cliconnect.c |   59 +++
 3 files changed, 73 insertions(+), 58 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index f992f06..36aad98 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1396,13 +1396,13 @@ struct tevent_req *open_socket_out_send(TALLOC_CTX 
*mem_ctx,
uint16_t port,
int timeout);
 NTSTATUS open_socket_out_recv(struct tevent_req *req, int *pfd);
-struct async_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
-struct event_context *ev,
-struct timeval wait_time,
-const struct sockaddr_storage *pss,
-uint16_t port,
-int timeout);
-NTSTATUS open_socket_out_defer_recv(struct async_req *req, int *pfd);
+struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct timeval wait_time,
+ const struct sockaddr_storage 
*pss,
+ uint16_t port,
+ int timeout);
+NTSTATUS open_socket_out_defer_recv(struct tevent_req *req, int *pfd);
 bool open_any_socket_out(struct sockaddr_storage *addrs, int num_addrs,
 int timeout, int *fd_index, int *fd);
 int open_udp_socket(const char *host, int port);
diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 499fc73..de5b232 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -1155,19 +1155,19 @@ struct open_socket_out_defer_state {
 static void open_socket_out_defer_waited(struct tevent_req *subreq);
 static void open_socket_out_defer_connected(struct tevent_req *subreq);
 
-struct async_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
-struct event_context *ev,
-struct timeval wait_time,
-const struct sockaddr_storage *pss,
-uint16_t port,
-int timeout)
+struct tevent_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
+ struct event_context *ev,
+ struct timeval wait_time,
+ const struct sockaddr_storage 
*pss,
+ uint16_t port,
+ int timeout)
 {
-   struct async_req *result;
-   struct tevent_req *subreq;
+   struct tevent_req *req, *subreq;
struct open_socket_out_defer_state *state;
 
-   if (!async_req_setup(mem_ctx, &result, &state,
-struct open_socket_out_defer_state)) {
+   req = tevent_req_create(mem_ctx, &state,
+   struct open_socket_out_defer_state);
+   if (req == NULL) {
return NULL;
}
state->ev = ev;
@@ -1181,31 +1181,31 @@ struct async_req *open_socket_out_defer_send(TALLOC_CTX 
*mem_ctx,
if (subreq == NULL) {
goto fail;
}
-   tevent_req_set_callback(subreq, open_socket_out_defer_waited, result);
-   return result;
+   tevent_req_set_callback(subreq, open_socket_out_defer_waited, req);
+   return req;
  fail:
-   TALLOC_FREE(result);
+   TALLOC_FREE(req);
return NULL;
 }
 
 static void open_socket_out_defer_waited(struct tevent_req *subreq)
 {
-   struct async_req *req = tevent_req_callback_data(
-   subreq, struct async_req);
-   struct open_socket_out_defer_state *state = talloc_get_type_abort(
-   req->private_data, struct open_socket_out_defer_state);
+   struct tevent_req *req = tevent_req_callback_data(
+   subreq, struct tevent_req);
+   struct open_socket_out_defer_state

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-364-ge848f3a

2009-03-16 Thread Volker Lendecke
The branch, v3-4-test has been updated
   via  e848f3a079ebb2f125aa2b4e7c6917d82af7b3f0 (commit)
  from  ae4bd4116c9c2e85d02f0475aa3a9a4b6d3afc18 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -
commit e848f3a079ebb2f125aa2b4e7c6917d82af7b3f0
Author: Volker Lendecke 
Date:   Mon Mar 16 18:43:57 2009 +0100

Use tevent_wakeup_send in open_socket_out_defer
(cherry picked from commit cb9effdc636731c1eba1101798d30f114fc83e19)

---

Summary of changes:
 source3/lib/util_sock.c |   37 +++--
 1 files changed, 15 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 3604be3..499fc73 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -1152,7 +1152,7 @@ struct open_socket_out_defer_state {
int fd;
 };
 
-static void open_socket_out_defer_waited(struct async_req *subreq);
+static void open_socket_out_defer_waited(struct tevent_req *subreq);
 static void open_socket_out_defer_connected(struct tevent_req *subreq);
 
 struct async_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
@@ -1162,9 +1162,9 @@ struct async_req *open_socket_out_defer_send(TALLOC_CTX 
*mem_ctx,
 uint16_t port,
 int timeout)
 {
-   struct async_req *result, *subreq;
+   struct async_req *result;
+   struct tevent_req *subreq;
struct open_socket_out_defer_state *state;
-   NTSTATUS status;
 
if (!async_req_setup(mem_ctx, &result, &state,
 struct open_socket_out_defer_state)) {
@@ -1175,47 +1175,40 @@ struct async_req *open_socket_out_defer_send(TALLOC_CTX 
*mem_ctx,
state->port = port;
state->timeout = timeout;
 
-   subreq = async_wait_send(state, ev, wait_time);
+   subreq = tevent_wakeup_send(
+   state, ev,
+   timeval_current_ofs(wait_time.tv_sec, wait_time.tv_usec));
if (subreq == NULL) {
-   status = NT_STATUS_NO_MEMORY;
-   goto post_status;
-   }
-   subreq->async.fn = open_socket_out_defer_waited;
-   subreq->async.priv = result;
-   return result;
-
- post_status:
-   if (!async_post_ntstatus(result, ev, status)) {
goto fail;
}
+   tevent_req_set_callback(subreq, open_socket_out_defer_waited, result);
return result;
  fail:
TALLOC_FREE(result);
return NULL;
 }
 
-static void open_socket_out_defer_waited(struct async_req *subreq)
+static void open_socket_out_defer_waited(struct tevent_req *subreq)
 {
-   struct async_req *req = talloc_get_type_abort(
-   subreq->async.priv, struct async_req);
+   struct async_req *req = tevent_req_callback_data(
+   subreq, struct async_req);
struct open_socket_out_defer_state *state = talloc_get_type_abort(
req->private_data, struct open_socket_out_defer_state);
-   struct tevent_req *subreq2;
bool ret;
 
-   ret = async_wait_recv(subreq);
+   ret = tevent_wakeup_recv(subreq);
TALLOC_FREE(subreq);
if (!ret) {
async_req_nterror(req, NT_STATUS_INTERNAL_ERROR);
return;
}
 
-   subreq2 = open_socket_out_send(state, state->ev, &state->ss,
-  state->port, state->timeout);
-   if (async_req_nomem(subreq2, req)) {
+   subreq = open_socket_out_send(state, state->ev, &state->ss,
+ state->port, state->timeout);
+   if (async_req_nomem(subreq, req)) {
return;
}
-   tevent_req_set_callback(subreq2, open_socket_out_defer_connected, req);
+   tevent_req_set_callback(subreq, open_socket_out_defer_connected, req);
 }
 
 static void open_socket_out_defer_connected(struct tevent_req *subreq)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-390-gcb9effd

2009-03-16 Thread Volker Lendecke
The branch, master has been updated
   via  cb9effdc636731c1eba1101798d30f114fc83e19 (commit)
  from  752cf03bf7854a4b32b0e1fedc1cb4ecd4474765 (commit)

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


- Log -
commit cb9effdc636731c1eba1101798d30f114fc83e19
Author: Volker Lendecke 
Date:   Mon Mar 16 18:43:57 2009 +0100

Use tevent_wakeup_send in open_socket_out_defer

---

Summary of changes:
 source3/lib/util_sock.c |   37 +++--
 1 files changed, 15 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 3604be3..499fc73 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -1152,7 +1152,7 @@ struct open_socket_out_defer_state {
int fd;
 };
 
-static void open_socket_out_defer_waited(struct async_req *subreq);
+static void open_socket_out_defer_waited(struct tevent_req *subreq);
 static void open_socket_out_defer_connected(struct tevent_req *subreq);
 
 struct async_req *open_socket_out_defer_send(TALLOC_CTX *mem_ctx,
@@ -1162,9 +1162,9 @@ struct async_req *open_socket_out_defer_send(TALLOC_CTX 
*mem_ctx,
 uint16_t port,
 int timeout)
 {
-   struct async_req *result, *subreq;
+   struct async_req *result;
+   struct tevent_req *subreq;
struct open_socket_out_defer_state *state;
-   NTSTATUS status;
 
if (!async_req_setup(mem_ctx, &result, &state,
 struct open_socket_out_defer_state)) {
@@ -1175,47 +1175,40 @@ struct async_req *open_socket_out_defer_send(TALLOC_CTX 
*mem_ctx,
state->port = port;
state->timeout = timeout;
 
-   subreq = async_wait_send(state, ev, wait_time);
+   subreq = tevent_wakeup_send(
+   state, ev,
+   timeval_current_ofs(wait_time.tv_sec, wait_time.tv_usec));
if (subreq == NULL) {
-   status = NT_STATUS_NO_MEMORY;
-   goto post_status;
-   }
-   subreq->async.fn = open_socket_out_defer_waited;
-   subreq->async.priv = result;
-   return result;
-
- post_status:
-   if (!async_post_ntstatus(result, ev, status)) {
goto fail;
}
+   tevent_req_set_callback(subreq, open_socket_out_defer_waited, result);
return result;
  fail:
TALLOC_FREE(result);
return NULL;
 }
 
-static void open_socket_out_defer_waited(struct async_req *subreq)
+static void open_socket_out_defer_waited(struct tevent_req *subreq)
 {
-   struct async_req *req = talloc_get_type_abort(
-   subreq->async.priv, struct async_req);
+   struct async_req *req = tevent_req_callback_data(
+   subreq, struct async_req);
struct open_socket_out_defer_state *state = talloc_get_type_abort(
req->private_data, struct open_socket_out_defer_state);
-   struct tevent_req *subreq2;
bool ret;
 
-   ret = async_wait_recv(subreq);
+   ret = tevent_wakeup_recv(subreq);
TALLOC_FREE(subreq);
if (!ret) {
async_req_nterror(req, NT_STATUS_INTERNAL_ERROR);
return;
}
 
-   subreq2 = open_socket_out_send(state, state->ev, &state->ss,
-  state->port, state->timeout);
-   if (async_req_nomem(subreq2, req)) {
+   subreq = open_socket_out_send(state, state->ev, &state->ss,
+ state->port, state->timeout);
+   if (async_req_nomem(subreq, req)) {
return;
}
-   tevent_req_set_callback(subreq2, open_socket_out_defer_connected, req);
+   tevent_req_set_callback(subreq, open_socket_out_defer_connected, req);
 }
 
 static void open_socket_out_defer_connected(struct tevent_req *subreq)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-363-gae4bd41

2009-03-16 Thread Stefan Metzmacher
The branch, v3-4-test has been updated
   via  ae4bd4116c9c2e85d02f0475aa3a9a4b6d3afc18 (commit)
   via  759ee49cd9c82ed00ebb0907c7b97e557f032a9c (commit)
   via  c6206e35701a45c0db801593bce4423a0036c82d (commit)
   via  ba549acc2ee6531c91ae4d4dde9cc4553b2c1d09 (commit)
   via  28b48329864b642c117ba193d94e5cbe466be10c (commit)
   via  5587e0d17aa5fe56337fbede9e3db11fe2b24c88 (commit)
  from  68456130ff23cb8139c9710fc674ca5b52230197 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -
commit ae4bd4116c9c2e85d02f0475aa3a9a4b6d3afc18
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:19:09 2009 +0100

talloc: change version to 1.3.0

metze
(cherry picked from commit 752cf03bf7854a4b32b0e1fedc1cb4ecd4474765)

commit 759ee49cd9c82ed00ebb0907c7b97e557f032a9c
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:16:40 2009 +0100

talloc: add useful talloc_array_length() macro

metze
(cherry picked from commit 6d4a13241a096d30d37d69a8f7b888a395716316)

commit c6206e35701a45c0db801593bce4423a0036c82d
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:13:58 2009 +0100

talloc: add TALLOC_FREE()

metze

commit ba549acc2ee6531c91ae4d4dde9cc4553b2c1d09
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:13:34 2009 +0100

s3: only define TALLOC_FREE if needed

metze
(cherry picked from commit a73bd05eec608d29888286542e9c882039b02857)

commit 28b48329864b642c117ba193d94e5cbe466be10c
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:13:08 2009 +0100

nsswitch: only define TALLOC_FREE if needed

metze
(cherry picked from commit d0b9cc62f99a1feca68c473f3cd1e93e50ab2eab)

commit 5587e0d17aa5fe56337fbede9e3db11fe2b24c88
Author: Stefan Metzmacher 
Date:   Fri Mar 13 10:20:29 2009 +0100

lib/replace: use AC_TRY_LINK() to verify that getifaddrs() and 
freeifaddrs() are available

metze
(cherry picked from commit 099d6f05cdb0800114d026786920a17ef649699f)

---

Summary of changes:
 lib/replace/libreplace_network.m4 |2 +-
 lib/talloc/configure.ac   |2 +-
 lib/talloc/talloc.h   |3 +++
 nsswitch/pam_winbind.h|2 ++
 source3/include/smb_macros.h  |2 ++
 source3/libaddns/dns.h|2 ++
 6 files changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace_network.m4 
b/lib/replace/libreplace_network.m4
index 1dc1c44..9223d94 100644
--- a/lib/replace/libreplace_network.m4
+++ b/lib/replace/libreplace_network.m4
@@ -242,7 +242,7 @@ AC_CHECK_MEMBERS([struct sockaddr.sa_len],
 
 dnl test for getifaddrs and freeifaddrs
 AC_CACHE_CHECK([for getifaddrs and freeifaddrs],libreplace_cv_HAVE_GETIFADDRS,[
-AC_TRY_COMPILE([
+AC_TRY_LINK([
 #include 
 #if STDC_HEADERS
 #include 
diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac
index 39cea39..00e8242 100644
--- a/lib/talloc/configure.ac
+++ b/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(talloc, 1.2.1)
+AC_INIT(talloc, 1.3.0)
 AC_CONFIG_SRCDIR([talloc.c])
 AC_SUBST(datarootdir)
 AC_CONFIG_HEADER(config.h)
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index b623934..5c8d5c5 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -94,6 +94,7 @@ typedef void TALLOC_CTX;
 #define talloc_array(ctx, type, count) (type *)_talloc_array(ctx, 
sizeof(type), count, #type)
 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, 
__location__)
 #define talloc_array_ptrtype(ctx, ptr, count) 
(_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count)
+#define talloc_array_length(ctx) ((ctx) ? talloc_get_size(ctx)/sizeof(*ctx) : 
0)
 
 #define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, 
p, sizeof(type), count, #type)
 #define talloc_realloc_size(ctx, ptr, size) _talloc_realloc(ctx, ptr, size, 
__location__)
@@ -115,6 +116,8 @@ typedef void TALLOC_CTX;
 #define talloc_append_string(c, s, a) 
(s?talloc_strdup_append(s,a):talloc_strdup(c, a))
 #endif
 
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+
 /* The following definitions come from talloc.c  */
 void *_talloc(const void *context, size_t size);
 void *talloc_pool(const void *context, size_t size);
diff --git a/nsswitch/pam_winbind.h b/nsswitch/pam_winbind.h
index 0395a1f..25d673e 100644
--- a/nsswitch/pam_winbind.h
+++ b/nsswitch/pam_winbind.h
@@ -171,6 +171,8 @@ struct pwb_context {
uint32_t ctrl;
 };
 
+#ifndef TALLOC_FREE
 #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+#endif
 #define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
 #define TALLOC_P(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), 
#type)
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index fd1bba1..

Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-389-g752cf03

2009-03-16 Thread Stefan (metze) Metzmacher
> commit a3998832dbdbeb9ba5f3576a242bd48a5a3b3b60
> Author: Stefan Metzmacher 
> Date:   Mon Mar 16 10:13:58 2009 +0100
> 
> talloc: add TALLOC_ZERO()
> 
> metze
> 
> commit a73bd05eec608d29888286542e9c882039b02857
> Author: Stefan Metzmacher 
> Date:   Mon Mar 16 10:13:34 2009 +0100
> 
> s3: only define TALLOC_ZERO if needed
> 
> metze
> 
> commit d0b9cc62f99a1feca68c473f3cd1e93e50ab2eab
> Author: Stefan Metzmacher 
> Date:   Mon Mar 16 10:13:08 2009 +0100
> 
> nsswitch: only define TALLOC_ZERO if needed
> 

I mean TALLOC_FREE()...

metze



signature.asc
Description: OpenPGP digital signature


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-389-g752cf03

2009-03-16 Thread Stefan Metzmacher
The branch, master has been updated
   via  752cf03bf7854a4b32b0e1fedc1cb4ecd4474765 (commit)
   via  6d4a13241a096d30d37d69a8f7b888a395716316 (commit)
   via  a3998832dbdbeb9ba5f3576a242bd48a5a3b3b60 (commit)
   via  a73bd05eec608d29888286542e9c882039b02857 (commit)
   via  d0b9cc62f99a1feca68c473f3cd1e93e50ab2eab (commit)
   via  099d6f05cdb0800114d026786920a17ef649699f (commit)
  from  586a4da5dd30c371a33956db406bbb1dc08534b2 (commit)

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


- Log -
commit 752cf03bf7854a4b32b0e1fedc1cb4ecd4474765
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:19:09 2009 +0100

talloc: change version to 1.3.0

metze

commit 6d4a13241a096d30d37d69a8f7b888a395716316
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:16:40 2009 +0100

talloc: add useful talloc_array_length() macro

metze

commit a3998832dbdbeb9ba5f3576a242bd48a5a3b3b60
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:13:58 2009 +0100

talloc: add TALLOC_ZERO()

metze

commit a73bd05eec608d29888286542e9c882039b02857
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:13:34 2009 +0100

s3: only define TALLOC_ZERO if needed

metze

commit d0b9cc62f99a1feca68c473f3cd1e93e50ab2eab
Author: Stefan Metzmacher 
Date:   Mon Mar 16 10:13:08 2009 +0100

nsswitch: only define TALLOC_ZERO if needed

metze

commit 099d6f05cdb0800114d026786920a17ef649699f
Author: Stefan Metzmacher 
Date:   Fri Mar 13 10:20:29 2009 +0100

lib/replace: use AC_TRY_LINK() to verify that getifaddrs() and 
freeifaddrs() are available

metze

---

Summary of changes:
 lib/replace/libreplace_network.m4 |2 +-
 lib/talloc/configure.ac   |2 +-
 lib/talloc/talloc.h   |3 +++
 nsswitch/pam_winbind.h|2 ++
 source3/include/smb_macros.h  |2 ++
 source3/libaddns/dns.h|2 ++
 6 files changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace_network.m4 
b/lib/replace/libreplace_network.m4
index 1dc1c44..9223d94 100644
--- a/lib/replace/libreplace_network.m4
+++ b/lib/replace/libreplace_network.m4
@@ -242,7 +242,7 @@ AC_CHECK_MEMBERS([struct sockaddr.sa_len],
 
 dnl test for getifaddrs and freeifaddrs
 AC_CACHE_CHECK([for getifaddrs and freeifaddrs],libreplace_cv_HAVE_GETIFADDRS,[
-AC_TRY_COMPILE([
+AC_TRY_LINK([
 #include 
 #if STDC_HEADERS
 #include 
diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac
index 39cea39..00e8242 100644
--- a/lib/talloc/configure.ac
+++ b/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(talloc, 1.2.1)
+AC_INIT(talloc, 1.3.0)
 AC_CONFIG_SRCDIR([talloc.c])
 AC_SUBST(datarootdir)
 AC_CONFIG_HEADER(config.h)
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index b623934..5c8d5c5 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -94,6 +94,7 @@ typedef void TALLOC_CTX;
 #define talloc_array(ctx, type, count) (type *)_talloc_array(ctx, 
sizeof(type), count, #type)
 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, 
__location__)
 #define talloc_array_ptrtype(ctx, ptr, count) 
(_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count)
+#define talloc_array_length(ctx) ((ctx) ? talloc_get_size(ctx)/sizeof(*ctx) : 
0)
 
 #define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, 
p, sizeof(type), count, #type)
 #define talloc_realloc_size(ctx, ptr, size) _talloc_realloc(ctx, ptr, size, 
__location__)
@@ -115,6 +116,8 @@ typedef void TALLOC_CTX;
 #define talloc_append_string(c, s, a) 
(s?talloc_strdup_append(s,a):talloc_strdup(c, a))
 #endif
 
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+
 /* The following definitions come from talloc.c  */
 void *_talloc(const void *context, size_t size);
 void *talloc_pool(const void *context, size_t size);
diff --git a/nsswitch/pam_winbind.h b/nsswitch/pam_winbind.h
index 0395a1f..25d673e 100644
--- a/nsswitch/pam_winbind.h
+++ b/nsswitch/pam_winbind.h
@@ -171,6 +171,8 @@ struct pwb_context {
uint32_t ctrl;
 };
 
+#ifndef TALLOC_FREE
 #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+#endif
 #define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
 #define TALLOC_P(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), 
#type)
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index fd1bba1..22cfaaf 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -256,7 +256,9 @@ NULL returns on zero request. JRA.
 #define TALLOC_REALLOC(ctx, ptr, count) _talloc_realloc(ctx, ptr, count, 
__location__)
 #define TALLOC_REALLOC_ARRAY(ctx, ptr, type, count) (type 
*)_talloc_realloc_array(ctx, ptr, sizeof(type), count, #type)
 #define talloc_dest