Build status as of Mon Jul 27 06:00:01 2009

2009-07-27 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-07-26 
22:18:42.0 -0600
+++ /home/build/master/cache/broken_results.txt 2009-07-27 00:00:20.0 
-0600
@@ -1,4 +1,4 @@
-Build status as of Mon Jul 27 04:18:41 2009
+Build status as of Mon Jul 27 06:00:01 2009
 
 Build counts:
 Tree Total  Broken Panic 


[SCM] SAMBA-CTDB repository - branch v3-4-ctdb updated - 224188a5e1388d70049ecc2c30b8b26f1acb84dc

2009-07-27 Thread Michael Adam
The branch, v3-4-ctdb has been updated
   via  224188a5e1388d70049ecc2c30b8b26f1acb84dc (commit)
   via  0f9bd4f53c26bbb93e799f275d3af7a725af3251 (commit)
   via  7b531a429af4f4579c66cada693f660764bbc56f (commit)
   via  089ea402f6b49b05fc3ab8f5699236b0e009a5cb (commit)
   via  6d873a37931d9bcd508878d56d86c4e14f8ed2c8 (commit)
   via  22c77c7c224381d53067f4fc9feeb058e46ee43a (commit)
   via  28c703cac6fbd1850527de5e324deb28082242c2 (commit)
   via  7f66849198d39086fbf0c6632fe5c4e7d7496df3 (commit)
   via  04045dfe48527bd74d25eb7694baca9e55cd7e60 (commit)
  from  d6fd406056bc92641a2da3576952e71294f4ffe4 (commit)

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


- Log -
commit 224188a5e1388d70049ecc2c30b8b26f1acb84dc
Author: Volker Lendecke v...@samba.org
Date:   Tue Jul 14 18:31:28 2009 +0200

Consolidate gencache also every 100 writes in a single process

commit 0f9bd4f53c26bbb93e799f275d3af7a725af3251
Author: Volker Lendecke v...@samba.org
Date:   Tue Jul 14 11:33:04 2009 +0200

Consolidate string and data_blob routines in gencache

commit 7b531a429af4f4579c66cada693f660764bbc56f
Author: Volker Lendecke v...@samba.org
Date:   Mon Jul 13 17:04:29 2009 +0200

Make gencache more stable

This provides a compromise between stability and performance: gencache is a
persistent database these days that for performance reasons can not use tdb
transactions for all writes. This patch splits up gencache into gencache.tdb
and gencache_notrans.tdb. gencache_notrans is used with CLEAR_IF_FIRST, 
writes
to it don't use transactions. By default every 5 minutes and when a program
exits, all entries from _notrans.tdb are transferred to gencache.tdb in one
transaction.

commit 089ea402f6b49b05fc3ab8f5699236b0e009a5cb
Author: Volker Lendecke v...@samba.org
Date:   Mon Jul 13 17:03:52 2009 +0200

Add tdb_data_cmp

commit 6d873a37931d9bcd508878d56d86c4e14f8ed2c8
Author: Volker Lendecke v...@samba.org
Date:   Fri Jul 10 12:24:56 2009 +0200

Remove gencache_init/shutdown

gencache_get/set/del/iterate call gencache_init() internally anyway. And 
we've
been very lazy calling gencache_shutdown, so this seems not really required.

commit 22c77c7c224381d53067f4fc9feeb058e46ee43a
Author: Volker Lendecke v...@samba.org
Date:   Fri Jul 10 12:12:30 2009 +0200

Fix some nonempty blank lines

commit 28c703cac6fbd1850527de5e324deb28082242c2
Author: Volker Lendecke v...@samba.org
Date:   Fri Jul 10 12:03:35 2009 +0200

Remove gencache_[un]lock_key

commit 7f66849198d39086fbf0c6632fe5c4e7d7496df3
Author: Volker Lendecke v...@samba.org
Date:   Fri Jul 10 11:00:24 2009 +0200

TDB_CONTEXT - struct tdb_context

commit 04045dfe48527bd74d25eb7694baca9e55cd7e60
Author: Volker Lendecke v...@samba.org
Date:   Fri Jul 10 10:54:33 2009 +0200

Replace ASSERTs in gencache with return false

It's a bit strong to panic here I think.

---

Summary of changes:
 source3/include/proto.h |8 +-
 source3/include/util_tdb.h  |2 +
 source3/lib/gencache.c  |  529 +--
 source3/lib/netapi/netapi.c |1 -
 source3/lib/util_tdb.c  |   19 ++
 source3/libads/dns.c|8 -
 source3/libsmb/dsgetdcname.c|   33 +--
 source3/libsmb/libsmb_context.c |1 -
 source3/libsmb/namecache.c  |   34 ---
 source3/libsmb/namequery.c  |   12 -
 source3/libsmb/trustdom_cache.c |   67 ++
 source3/nmbd/nmbd.c |2 +
 source3/smbd/server.c   |1 +
 source3/torture/torture.c   |   16 --
 source3/utils/net.c |2 +
 source3/utils/net_cache.c   |   27 ++-
 source3/winbindd/winbindd.c |2 +
 17 files changed, 415 insertions(+), 349 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index 0a37832..60f2513 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -518,17 +518,15 @@ void pull_file_id_24(char *buf, struct file_id *id);
 
 /* The following definitions come from lib/gencache.c  */
 
-bool gencache_init(void);
-bool gencache_shutdown(void);
 bool gencache_set(const char *keystr, const char *value, time_t timeout);
 bool gencache_del(const char *keystr);
 bool gencache_get(const char *keystr, char **valstr, time_t *timeout);
-bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob, bool 
*expired);
+bool gencache_get_data_blob(const char *keystr, DATA_BLOB *blob,
+   time_t *timeout);
+bool gencache_stabilize(void);
 bool gencache_set_data_blob(const char *keystr, const DATA_BLOB *blob, time_t 
timeout);
 void gencache_iterate(void (*fn)(const char* key, const char *value, time_t 
timeout, void* dptr),
   void* data, const char* 

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3638-g87b52c1

2009-07-27 Thread Karolin Seeger
The branch, v3-2-test has been updated
   via  87b52c1b2062fc8e23c6d3cf630eac5cb9fbaecf (commit)
  from  92bb02adbc808ed3180ab66b45fb717c9dad03b4 (commit)

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


- Log -
commit 87b52c1b2062fc8e23c6d3cf630eac5cb9fbaecf
Author: Bo Yang boy...@samba.org
Date:   Sat Jul 18 13:15:36 2009 +0800

handling upn name

lookupname failed, cannot find domain when attempt
to change password.

This addresses bug #6560.

Signed-off-by: Bo Yang boy...@samba.org

---

Summary of changes:
 source/nsswitch/pam_winbind.c   |   17 +++--
 source/winbindd/winbindd_sid.c  |4 
 source/winbindd/winbindd_util.c |3 ++-
 3 files changed, 21 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/nsswitch/pam_winbind.c b/source/nsswitch/pam_winbind.c
index ad063c3..a816572 100644
--- a/source/nsswitch/pam_winbind.c
+++ b/source/nsswitch/pam_winbind.c
@@ -1910,6 +1910,9 @@ static char* winbind_upn_to_username(struct pwb_context 
*ctx,
char *account_name;
int account_name_len;
char sep;
+   char *p;
+   char *name;
+   char *domain;
 
/* This cannot work when the winbind separator = @ */
 
@@ -1918,14 +1921,23 @@ static char* winbind_upn_to_username(struct pwb_context 
*ctx,
return NULL;
}
 
+   name = strdup(upn);
+   if (!name) {
+   return NULL;
+   }
+   if ((p = strchr(name, '@')) != NULL) {
+   *p = 0;
+   domain = p + 1;
+   }
+
/* Convert the UPN to a SID */
 
ZERO_STRUCT(req);
ZERO_STRUCT(resp);
 
-   strncpy(req.data.name.dom_name, ,
+   strncpy(req.data.name.dom_name, domain,
sizeof(req.data.name.dom_name) - 1);
-   strncpy(req.data.name.name, upn,
+   strncpy(req.data.name.name, name,
sizeof(req.data.name.name) - 1);
retval = pam_winbind_request_log(ctx, WINBINDD_LOOKUPNAME,
 req, resp, upn);
@@ -1947,6 +1959,7 @@ static char* winbind_upn_to_username(struct pwb_context 
*ctx,
account_name_len = asprintf(account_name, %s\\%s,
resp.data.name.dom_name,
resp.data.name.name);
+   SAFE_FREE(name);
 
return account_name;
 }
diff --git a/source/winbindd/winbindd_sid.c b/source/winbindd/winbindd_sid.c
index 0e8e6ca..0471a2c 100644
--- a/source/winbindd/winbindd_sid.c
+++ b/source/winbindd/winbindd_sid.c
@@ -93,6 +93,10 @@ void winbindd_lookupname(struct winbindd_cli_state *state)
*p = 0;
name_domain = state-request.data.name.name;
name_user = p+1;
+   } else if ((p = strchr(state-request.data.name.name, '@')) != NULL) {
+   name_domain = p + 1;
+   *p = 0;
+   name_user = state-request.data.name.name;
} else {
name_domain = state-request.data.name.dom_name;
name_user = state-request.data.name.name;
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c
index 624d68e..8046d36 100644
--- a/source/winbindd/winbindd_util.c
+++ b/source/winbindd/winbindd_util.c
@@ -1102,7 +1102,8 @@ bool parse_domain_user(const char *domuser, fstring 
domain, fstring user)
if ( assume_domain(lp_workgroup())) {
fstrcpy(domain, lp_workgroup());
} else if ((p = strchr(domuser, '@')) != NULL) {
-   fstrcpy(domain, );
+   fstrcpy(domain, p + 1);
+   user[PTR_DIFF(p, domuser)] = 0;
} else {
return False;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5330-g830c4da

2009-07-27 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  830c4da460bcad919421acf9d537cf577b231de7 (commit)
  from  58f449318dd07240c60513559cf682aa243d3e4c (commit)

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


- Log -
commit 830c4da460bcad919421acf9d537cf577b231de7
Author: Bo Yang boy...@samba.org
Date:   Sat Jul 18 14:23:24 2009 +0800

handling upn

lookupname failed, cannot find domain when attempt
to change password.

This addresses bug #6560.

Signed-off-by: Bo Yang boy...@samba.org

---

Summary of changes:
 source/nsswitch/pam_winbind.c   |   13 -
 source/winbindd/winbindd_sid.c  |5 +
 source/winbindd/winbindd_util.c |3 ++-
 3 files changed, 19 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/nsswitch/pam_winbind.c b/source/nsswitch/pam_winbind.c
index 1211ffd..73be3e0 100644
--- a/source/nsswitch/pam_winbind.c
+++ b/source/nsswitch/pam_winbind.c
@@ -2284,6 +2284,7 @@ static char* winbind_upn_to_username(struct pwb_context 
*ctx,
enum wbcSidType type;
char *domain;
char *name;
+   char *p;
 
/* This cannot work when the winbind separator = @ */
 
@@ -2292,9 +2293,19 @@ static char* winbind_upn_to_username(struct pwb_context 
*ctx,
return NULL;
}
 
+   name = talloc_strdup(ctx, upn);
+   if (!name) {
+   return NULL;
+   }
+
+   if ((p = strchr(name, '@')) != NULL) {
+   *p = 0;
+   domain = p + 1;
+   }
+
/* Convert the UPN to a SID */
 
-   wbc_status = wbcLookupName(, upn, sid, type);
+   wbc_status = wbcLookupName(domain, name, sid, type);
if (!WBC_ERROR_IS_OK(wbc_status)) {
return NULL;
}
diff --git a/source/winbindd/winbindd_sid.c b/source/winbindd/winbindd_sid.c
index 641b18e..b0f2c72 100644
--- a/source/winbindd/winbindd_sid.c
+++ b/source/winbindd/winbindd_sid.c
@@ -93,6 +93,11 @@ void winbindd_lookupname(struct winbindd_cli_state *state)
*p = 0;
name_domain = state-request.data.name.name;
name_user = p+1;
+   } else if ((p = strchr(state-request.data.name.name, '@')) != NULL) {
+   /* upn */
+   name_domain = p + 1;
+   *p = 0;
+   name_user = state-request.data.name.name;
} else {
name_domain = state-request.data.name.dom_name;
name_user = state-request.data.name.name;
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c
index 2d87015..efa85fa 100644
--- a/source/winbindd/winbindd_util.c
+++ b/source/winbindd/winbindd_util.c
@@ -1144,7 +1144,8 @@ bool parse_domain_user(const char *domuser, fstring 
domain, fstring user)
if ( assume_domain(lp_workgroup())) {
fstrcpy(domain, lp_workgroup());
} else if ((p = strchr(domuser, '@')) != NULL) {
-   fstrcpy(domain, );
+   fstrcpy(domain, p + 1);
+   user[PTR_DIFF(p, domuser)] = 0;
} else {
return False;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-1190-g9acc670

2009-07-27 Thread Karolin Seeger
The branch, v3-4-test has been updated
   via  9acc670541031414d0cb5df39d18866c4c96b37c (commit)
  from  d53cb77ab21cc6edc2f1767bb56a75901c4c1709 (commit)

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


- Log -
commit 9acc670541031414d0cb5df39d18866c4c96b37c
Author: Bo Yang boy...@samba.org
Date:   Thu Jul 23 10:23:21 2009 +0800

s3: To correctly handle upn

lookupname failed, cannot find domain when attempt
to change password.

This addresses bug #6560.

Signed-off-by: Bo Yang boy...@samba.org

---

Summary of changes:
 nsswitch/pam_winbind.c   |   13 -
 source3/winbindd/winbindd_sid.c  |5 +
 source3/winbindd/winbindd_util.c |3 ++-
 3 files changed, 19 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index e90f1b7..4a44248 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -2284,6 +2284,7 @@ static char* winbind_upn_to_username(struct pwb_context 
*ctx,
enum wbcSidType type;
char *domain;
char *name;
+   char *p;
 
/* This cannot work when the winbind separator = @ */
 
@@ -2292,9 +2293,19 @@ static char* winbind_upn_to_username(struct pwb_context 
*ctx,
return NULL;
}
 
+   name = talloc_strdup(ctx, upn);
+   if (!name) {
+   return NULL;
+   }
+
+   if ((p = strchr(name, '@')) != NULL) {
+   *p = 0;
+   domain = p + 1;
+   }
+
/* Convert the UPN to a SID */
 
-   wbc_status = wbcLookupName(, upn, sid, type);
+   wbc_status = wbcLookupName(domain, name, sid, type);
if (!WBC_ERROR_IS_OK(wbc_status)) {
return NULL;
}
diff --git a/source3/winbindd/winbindd_sid.c b/source3/winbindd/winbindd_sid.c
index 641b18e..b0f2c72 100644
--- a/source3/winbindd/winbindd_sid.c
+++ b/source3/winbindd/winbindd_sid.c
@@ -93,6 +93,11 @@ void winbindd_lookupname(struct winbindd_cli_state *state)
*p = 0;
name_domain = state-request.data.name.name;
name_user = p+1;
+   } else if ((p = strchr(state-request.data.name.name, '@')) != NULL) {
+   /* upn */
+   name_domain = p + 1;
+   *p = 0;
+   name_user = state-request.data.name.name;
} else {
name_domain = state-request.data.name.dom_name;
name_user = state-request.data.name.name;
diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c
index a2c1c85..3070c62 100644
--- a/source3/winbindd/winbindd_util.c
+++ b/source3/winbindd/winbindd_util.c
@@ -1144,7 +1144,8 @@ bool parse_domain_user(const char *domuser, fstring 
domain, fstring user)
if ( assume_domain(lp_workgroup())) {
fstrcpy(domain, lp_workgroup());
} else if ((p = strchr(domuser, '@')) != NULL) {
-   fstrcpy(domain, );
+   fstrcpy(domain, p + 1);
+   user[PTR_DIFF(p, domuser)] = 0;
} else {
return False;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-604-ge8abc36

2009-07-27 Thread Volker Lendecke
The branch, master has been updated
   via  e8abc36d2a8c611ecfefa9ef8e798cf2b072a432 (commit)
  from  fb03bbfa09c9df01c349f19a28c05f9bfd1cf4dc (commit)

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


- Log -
commit e8abc36d2a8c611ecfefa9ef8e798cf2b072a432
Author: Volker Lendecke v...@samba.org
Date:   Mon Jul 27 12:36:31 2009 +0200

Fix a valgrind error in cli_ctemp_done

For performance reasons cli_smb_recv does not make copies of the buffers we
received from the client, so both vwv and bytes vanish with
TALLOC_FREE(subreq). I know this is a bit counter-intuitive, but I think in
this case it's justified not to make copies.

Comments?

---

Summary of changes:
 source3/libsmb/clifile.c |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 5ea0579..696c979 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -4098,14 +4098,16 @@ static void cli_ctemp_done(struct tevent_req *subreq)
uint8_t *bytes = NULL;
 
status = cli_smb_recv(subreq, 1, wcnt, vwv, num_bytes, bytes);
-   TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
+   TALLOC_FREE(subreq);
tevent_req_nterror(req, status);
return;
}
 
state-fnum = SVAL(vwv+0, 0);
 
+   TALLOC_FREE(subreq);
+
/* From W2K3, the result is just the ASCII name */
if (num_bytes  2) {
tevent_req_nterror(req, NT_STATUS_DATA_ERROR);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-605-gd3f21d0

2009-07-27 Thread Volker Lendecke
The branch, master has been updated
   via  d3f21d0a1fdfa382a1d2fde0a41a74043531dd12 (commit)
  from  e8abc36d2a8c611ecfefa9ef8e798cf2b072a432 (commit)

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


- Log -
commit d3f21d0a1fdfa382a1d2fde0a41a74043531dd12
Author: Volker Lendecke v...@samba.org
Date:   Sun Jul 26 17:20:54 2009 -0400

Fix some nonempty blank lines

---

Summary of changes:
 source3/winbindd/winbindd_cache.c |  208 ++---
 1 files changed, 103 insertions(+), 105 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/winbindd/winbindd_cache.c 
b/source3/winbindd/winbindd_cache.c
index 3913d96..80ec688 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -13,12 +13,12 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-   
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
-   
+
You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
@@ -189,7 +189,7 @@ static struct winbind_cache *get_cache(struct 
winbindd_domain *domain)
 
if (ret)
return ret;
-   
+
ret = SMB_XMALLOC_P(struct winbind_cache);
ZERO_STRUCTP(ret);
 
@@ -393,27 +393,27 @@ static NTSTATUS fetch_cache_seqnum( struct 
winbindd_domain *domain, time_t now )
TDB_DATA data;
fstring key;
uint32 time_diff;
-   
+
if (!wcache-tdb) {
DEBUG(10,(fetch_cache_seqnum: tdb == NULL\n));
return NT_STATUS_UNSUCCESSFUL;
}
-   
+
fstr_sprintf( key, SEQNUM/%s, domain-name );
-   
+
data = tdb_fetch_bystring( wcache-tdb, key );
if ( !data.dptr || data.dsize!=8 ) {
DEBUG(10,(fetch_cache_seqnum: invalid data size key [%s]\n, 
key ));
return NT_STATUS_UNSUCCESSFUL;
}
-   
+
domain-sequence_number = IVAL(data.dptr, 0);
domain-last_seq_check  = IVAL(data.dptr, 4);
-   
+
SAFE_FREE(data.dptr);
 
/* have we expired? */
-   
+
time_diff = now - domain-last_seq_check;
if ( time_diff  lp_winbind_cache_time() ) {
DEBUG(10,(fetch_cache_seqnum: timeout [%s][%u @ %u]\n,
@@ -434,19 +434,19 @@ static NTSTATUS store_cache_seqnum( struct 
winbindd_domain *domain )
TDB_DATA data;
fstring key_str;
uint8 buf[8];
-   
+
if (!wcache-tdb) {
DEBUG(10,(store_cache_seqnum: tdb == NULL\n));
return NT_STATUS_UNSUCCESSFUL;
}
-   
+
fstr_sprintf( key_str, SEQNUM/%s, domain-name );
-   
+
SIVAL(buf, 0, domain-sequence_number);
SIVAL(buf, 4, domain-last_seq_check);
data.dptr = buf;
data.dsize = 8;
-   
+
if ( tdb_store_bystring( wcache-tdb, key_str, data, TDB_REPLACE) == -1 
) {
DEBUG(10,(store_cache_seqnum: tdb_store fail key [%s]\n, 
key_str ));
return NT_STATUS_UNSUCCESSFUL;
@@ -455,7 +455,7 @@ static NTSTATUS store_cache_seqnum( struct winbindd_domain 
*domain )
DEBUG(10,(store_cache_seqnum: success [%s][%u @ %u]\n, 
domain-name, domain-sequence_number, 
(uint32)domain-last_seq_check));
-   
+
return NT_STATUS_OK;
 }
 
@@ -474,7 +474,7 @@ static void refresh_sequence_number(struct winbindd_domain 
*domain, bool force)
if ( IS_DOMAIN_OFFLINE(domain) ) {
return;
}
-   
+
get_cache( domain );
 
 #if 0  /* JERRY -- disable as the default cache time is now 5 minutes */
@@ -493,10 +493,10 @@ static void refresh_sequence_number(struct 
winbindd_domain *domain, bool force)
DEBUG(10, (refresh_sequence_number: %s time ok\n, 
domain-name));
goto done;
}
-   
+
/* try to get the sequence number from the tdb cache first */
/* this will update the timestamp as well */
-   
+
status = fetch_cache_seqnum( domain, t );
if (NT_STATUS_IS_OK(status) 
(domain-sequence_number != DOM_SEQUENCE_NONE) 
@@ -526,10 +526,10 @@ static void refresh_sequence_number(struct 
winbindd_domain *domain, bool force)
DEBUG(10,(refresh_sequence_number: failed with %s\n, 
nt_errstr(status)));
domain-sequence_number = DOM_SEQUENCE_NONE;
}
-   
+
domain-last_status = status;

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-606-g34c535c

2009-07-27 Thread Michael Adam
The branch, master has been updated
   via  34c535c9a8d08a480e156aaa9e4b843ffaab0636 (commit)
  from  d3f21d0a1fdfa382a1d2fde0a41a74043531dd12 (commit)

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


- Log -
commit 34c535c9a8d08a480e156aaa9e4b843ffaab0636
Author: Michael Adam ob...@samba.org
Date:   Mon Jul 27 13:33:38 2009 +0200

docs: fix typos in the net man page.

Noted by Oota Toshiya t-o...@dh.jp.nec.com .

Michael

---

Summary of changes:
 docs-xml/manpages-3/net.8.xml |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml
index 107a96a..85be0d8 100644
--- a/docs-xml/manpages-3/net.8.xml
+++ b/docs-xml/manpages-3/net.8.xml
@@ -1705,7 +1705,7 @@ Joins a computer into a domain. This command supports the 
following additional p
 /itemizedlist
 
 para
-Note that you also need to use standard net paramters to connect and 
authenticate to the remote machine that you want to join. These additional 
parameters include: -S computer and -U user.
+Note that you also need to use standard net parameters to connect and 
authenticate to the remote machine that you want to join. These additional 
parameters include: -S computer and -U user.
 /para
 para
Example:
@@ -1735,7 +1735,7 @@ Unjoins a computer from a domain. This command supports 
the following additional
 /itemizedlist
 
 para
-Note that you also need to use standard net paramters to connect and 
authenticate to the remote machine that you want to unjoin. These additional 
parameters include: -S computer and -U user.
+Note that you also need to use standard net parameters to connect and 
authenticate to the remote machine that you want to unjoin. These additional 
parameters include: -S computer and -U user.
 /para
 para
Example:
@@ -1767,7 +1767,7 @@ Renames a computer that is joined to a domain. This 
command supports the followi
 /itemizedlist
 
 para
-Note that you also need to use standard net paramters to connect and 
authenticate to the remote machine that you want to rename in the domain. These 
additional parameters include: -S computer and -U user.
+Note that you also need to use standard net parameters to connect and 
authenticate to the remote machine that you want to rename in the domain. These 
additional parameters include: -S computer and -U user.
 /para
 para
Example:


-- 
Samba Shared Repository


svn commit: samba-web r1311 - in trunk/history: .

2009-07-27 Thread kseeger
Author: kseeger
Date: 2009-07-27 05:54:54 -0600 (Mon, 27 Jul 2009)
New Revision: 1311

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=1311

Log:
Update link to latest release
Karolin
Modified:
   trunk/history/index.html


Changeset:
Modified: trunk/history/index.html
===
--- trunk/history/index.html2009-07-17 15:19:28 UTC (rev 1310)
+++ trunk/history/index.html2009-07-27 11:54:54 UTC (rev 1311)
@@ -6,8 +6,8 @@
 
 div class=latest
   ul
-  liLatest Release mdash; a href=/samba/#latestSamba 3.3.3/a/li
-  liCurrent Stable Release mdash; a href=/samba/#latestSamba 
3.3.3/a/li
+  liLatest Release mdash; a href=/samba/#latestSamba 3.4.0/a/li
+  liCurrent Stable Release mdash; a href=/samba/#latestSamba 
3.4.0/a/li
   !-- Second link will point to #stable on this page when current release is 
a development release --
   /ul
 /div



[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-1191-gd278a43

2009-07-27 Thread Karolin Seeger
The branch, v3-4-test has been updated
   via  d278a43d0626894f45dcc6e6dbe429565188d6fb (commit)
  from  9acc670541031414d0cb5df39d18866c4c96b37c (commit)

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


- Log -
commit d278a43d0626894f45dcc6e6dbe429565188d6fb
Author: Michael Adam ob...@samba.org
Date:   Mon Jul 27 13:33:38 2009 +0200

docs: fix typos in the net man page.

Noted by Oota Toshiya t-o...@dh.jp.nec.com .

Michael
(cherry picked from commit 34c535c9a8d08a480e156aaa9e4b843ffaab0636)

---

Summary of changes:
 docs-xml/manpages-3/net.8.xml |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml
index a0cba83..de3ed4d 100644
--- a/docs-xml/manpages-3/net.8.xml
+++ b/docs-xml/manpages-3/net.8.xml
@@ -1705,7 +1705,7 @@ Joins a computer into a domain. This command supports the 
following additional p
 /itemizedlist
 
 para
-Note that you also need to use standard net paramters to connect and 
authenticate to the remote machine that you want to join. These additional 
parameters include: -S computer and -U user.
+Note that you also need to use standard net parameters to connect and 
authenticate to the remote machine that you want to join. These additional 
parameters include: -S computer and -U user.
 /para
 para
Example:
@@ -1735,7 +1735,7 @@ Unjoins a computer from a domain. This command supports 
the following additional
 /itemizedlist
 
 para
-Note that you also need to use standard net paramters to connect and 
authenticate to the remote machine that you want to unjoin. These additional 
parameters include: -S computer and -U user.
+Note that you also need to use standard net parameters to connect and 
authenticate to the remote machine that you want to unjoin. These additional 
parameters include: -S computer and -U user.
 /para
 para
Example:
@@ -1767,7 +1767,7 @@ Renames a computer that is joined to a domain. This 
command supports the followi
 /itemizedlist
 
 para
-Note that you also need to use standard net paramters to connect and 
authenticate to the remote machine that you want to rename in the domain. These 
additional parameters include: -S computer and -U user.
+Note that you also need to use standard net parameters to connect and 
authenticate to the remote machine that you want to rename in the domain. These 
additional parameters include: -S computer and -U user.
 /para
 para
Example:


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5331-g4d25298

2009-07-27 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  4d25298b133279c0918e0663cf2fd59f7e11672f (commit)
  from  830c4da460bcad919421acf9d537cf577b231de7 (commit)

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


- Log -
commit 4d25298b133279c0918e0663cf2fd59f7e11672f
Author: Michael Adam ob...@samba.org
Date:   Mon Jul 27 14:09:39 2009 +0200

docs: fix typos in the net man page.

Noted by Oota Toshiya t-o...@dh.jp.nec.com .

Michael

---

Summary of changes:
 docs-xml/manpages-3/net.8.xml |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml
index 02f85bb..89f5640 100644
--- a/docs-xml/manpages-3/net.8.xml
+++ b/docs-xml/manpages-3/net.8.xml
@@ -1645,7 +1645,7 @@ Joins a computer into a domain. This command supports the 
following additional p
 /itemizedlist
 
 para
-Note that you also need to use standard net paramters to connect and 
authenticate to the remote machine that you want to join. These additional 
parameters include: -S computer and -U user.
+Note that you also need to use standard net parameters to connect and 
authenticate to the remote machine that you want to join. These additional 
parameters include: -S computer and -U user.
 /para
 para
Example:
@@ -1675,7 +1675,7 @@ Unjoins a computer from a domain. This command supports 
the following additional
 /itemizedlist
 
 para
-Note that you also need to use standard net paramters to connect and 
authenticate to the remote machine that you want to unjoin. These additional 
parameters include: -S computer and -U user.
+Note that you also need to use standard net parameters to connect and 
authenticate to the remote machine that you want to unjoin. These additional 
parameters include: -S computer and -U user.
 /para
 para
Example:


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-612-gcdd7a52

2009-07-27 Thread Andrew Bartlett
The branch, master has been updated
   via  cdd7a5208fbcb65e4a75ee08f8f015530f418c15 (commit)
   via  a40ce5d0d9d06f592a8885162bbaf644006b9f0f (commit)
   via  56f4516399431cc508ca0c3e0dd7f179cc7ab62c (commit)
   via  b50ab318c1c66aaffd68c01b19140d0221c3e9c1 (commit)
   via  0c2dca71fad1cb20bda2cc9bd5446735fc199759 (commit)
   via  afb6ac247be9fa2e5e34dcf69e6b5ba557e19892 (commit)
  from  34c535c9a8d08a480e156aaa9e4b843ffaab0636 (commit)

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


- Log -
commit cdd7a5208fbcb65e4a75ee08f8f015530f418c15
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jul 27 22:39:10 2009 +1000

s4:kerberos Add test to show that we actually export the keytab

While it is hard to prove it is correct, at least the new
'nettestuser' principal and the Administrator principal are correct.

We had to fix the case of 'Administrator' in the selftest code to
match the DB, as the keytab lookup is case sensitive.

Andrew Bartlett

commit a40ce5d0d9d06f592a8885162bbaf644006b9f0f
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jul 27 22:04:26 2009 +1000

s4:kerberos Add 'net export keytab' command for wireshark decryption

It is much easier to do decryption with wireshark when the keytab is
available for every host in the domain.  Running 'net export keytab
keytab name' will export the current (as pointed to by the supplied
smb.conf) local Samba4 doamin.

(This uses Heimdal's 'hdb' keytab and then the existing hdb-samba4,
and so has a good chance of keeping working in the long term).

Andrew Bartlett

commit 56f4516399431cc508ca0c3e0dd7f179cc7ab62c
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jul 27 16:09:25 2009 +1000

s4:kdc Push context to hdb_samba4 by way of the 'name' of the DB

This overloads the 'name' part of the keytab name to supply a context
pointer, and so avoids 3 global variables!

To do this, we had to stop putting the entry for kpasswd into the
secrets.ldb.  (I don't consider this a big loss, and any entry left
there by an upgrade will be harmless).

Andrew Bartlett

commit b50ab318c1c66aaffd68c01b19140d0221c3e9c1
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jul 27 16:07:04 2009 +1000

s4:setup add 'cn' attribute to Samba4 local schema

(We recently made the ms_schema.py script also add this attribute)

commit 0c2dca71fad1cb20bda2cc9bd5446735fc199759
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jul 27 13:50:50 2009 +1000

s4:heimdal Extend the 'hdb as a keytab' code

This extends the hdb_keytab code to allow enumeration of all the keys.

The plan is to allow ktutil's copy command to copy from Samba4's
hdb_samba4 into a file-based keytab used in wireshark.

One day, with a few more hacks, we might even make this a loadable
module that can be used directly...

Andrew Bartlett

commit afb6ac247be9fa2e5e34dcf69e6b5ba557e19892
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jul 27 13:48:45 2009 +1000

s4:kdc Tidy up hdb_samba4 some more

This removes the last use of the prefix hdb_ldb and makes it clear
that we pass in 3 global variables to get state information into
hdb_samba4 when used as a keytab.  (And that they belong to
hdb_samba4, not to the KDC)

Andrew Bartlett

---

Summary of changes:
 selftest/target/Samba4.pm|2 +-
 source4/auth/kerberos/config.mk  |3 +-
 source4/auth/kerberos/keytab_copy.c  |  146 +
 source4/heimdal/lib/hdb/keytab.c |  149 +-
 source4/kdc/config.mk|   16 +++-
 source4/kdc/hdb-samba4.c |   75 ++--
 source4/kdc/hdb-samba4.h |   39 
 source4/kdc/kdc.c|   37 
 source4/kdc/kdc.h|   13 +--
 source4/kdc/kpasswdd.c   |   12 ++-
 source4/kdc/pac-glue.c   |   10 +-
 source4/libnet/config.mk |4 +-
 source4/libnet/libnet.h  |1 +
 source4/libnet/libnet_export_keytab.c|   54 +++
 source4/libnet/libnet_export_keytab.h|   28 ++
 source4/selftest/tests.sh|1 +
 source4/setup/schema_samba4.ldif |4 +
 source4/setup/secrets_dc.ldif|   17 +---
 source4/utils/net/config.mk  |3 +-
 source4/utils/net/net.c  |4 +-
 source4/utils/net/net_export_keytab.c|  110 ++
 testprogs/blackbox/test_export_keytab.sh |   67 +
 22 files changed, 699 insertions(+), 96 deletions(-)
 create mode 100644 source4/auth/kerberos/keytab_copy.c
 create mode 

[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-6-22-g1066c99

2009-07-27 Thread Karolin Seeger
The branch, v3-3-stable has been updated
   via  1066c9970e3d37b9437eaf1851df976775d331b9 (commit)
   via  ce5f39750eb15dc9aaa2d9def66e449ae146c0c1 (commit)
   via  3328bbb927231f527c55236f1bee2b5d98b034f7 (commit)
   via  c6a2259f85d46ab493e9a0347d57cff70f5fb8fc (commit)
   via  46db7a7b3f55d4460289dcc4533a3708c4f6bbbe (commit)
   via  c0b807920e9b93776231935db4ff00d2c2f2a3a0 (commit)
   via  17d1f1c54ef5782f269e1c9a94987842ec18fd6e (commit)
   via  ea5761746b63f3ae35e13a943ac025b6458c8adf (commit)
   via  189e37646094465c7cc26782c58ce07e51b77761 (commit)
   via  48b5164dd1f1e11333cce30f47acb83579edcadb (commit)
   via  7611bea4d8559d52ba347af51d444e68d7edce7e (commit)
   via  1e82aedd0c6225fd77009ac6a983c9a691927197 (commit)
   via  3c28ca29c6c0e6977076c78444ef87ae2b56eb44 (commit)
   via  0450687b05322b0840e818e85d46bad97f6c5180 (commit)
   via  4b4b8c34ef9b0d334537928ac26870f9fcb7775a (commit)
   via  81e9fb11e548245d8d57f85db69d56c72dd4cfab (commit)
   via  e32b4c894d19010ceeb8a01a15f1b11e05282fe8 (commit)
   via  693f82492ac980377860886cc32a30a20777bd13 (commit)
   via  612af43281e41716f3d50e9f30c5250f011bc8f6 (commit)
   via  d847df46cd9ae7ae3a412a8c37c66163a0c5a5b5 (commit)
   via  010ce01991b5bfb755eafed0da0f5858e9876acb (commit)
   via  a906a153f7fa33e820a1f3c7fb0216ce001c4162 (commit)
  from  b09440c77b93ff6088c2fd474d6b24c081054812 (commit)

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


- Log -
commit 1066c9970e3d37b9437eaf1851df976775d331b9
Author: Michael Adam ob...@samba.org
Date:   Mon Jul 27 14:09:39 2009 +0200

docs: fix typos in the net man page.

Noted by Oota Toshiya t-o...@dh.jp.nec.com .

Michael
(cherry picked from commit 4d25298b133279c0918e0663cf2fd59f7e11672f)

commit ce5f39750eb15dc9aaa2d9def66e449ae146c0c1
Author: Bo Yang boy...@samba.org
Date:   Sat Jul 18 14:23:24 2009 +0800

handling upn

lookupname failed, cannot find domain when attempt
to change password.

This addresses bug #6560.

Signed-off-by: Bo Yang boy...@samba.org
(cherry picked from commit 830c4da460bcad919421acf9d537cf577b231de7)

commit 3328bbb927231f527c55236f1bee2b5d98b034f7
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Jun 30 16:03:11 2009 +0200

s3:util: let parent_dirname() correctly return toplevel filenames

metze
(cherry picked from commit a14efbadd53ac9678d75e6029f947d63cfa0c4e5)

Signed-off-by: Stefan Metzmacher me...@samba.org

This addresses bug #6526.
(cherry picked from commit 58f449318dd07240c60513559cf682aa243d3e4c)

commit c6a2259f85d46ab493e9a0347d57cff70f5fb8fc
Author: Jeremy Allison j...@samba.org
Date:   Thu Jul 2 08:37:59 2009 +0200

Fix bug #6520 time stamps.

E.g. last mod time is not preserved when unix extensions=yes are set - 
and u
Cancel out any pending sticky writes or last write changes when
doing a UNIX info level set.

Jeremy.
(cherry picked from commit 5b03af33ad45368bea7cf6cabc91f62e2503de99)

commit 46db7a7b3f55d4460289dcc4533a3708c4f6bbbe
Author: Matt Kraai mkr...@beckman.com
Date:   Wed Jul 1 08:18:11 2009 +0200

s3/docs: Fix typo.

This fixes bug #6519.
(cherry picked from commit 4fb1f8e8fe46b3e77c06612ac3fc3d67cf650a11)
(cherry picked from commit 39bfcc5d50892ad0c387f0ca3932e961e77fdc39)
(cherry picked from commit 408cc7ec9f4119aa9a768474152a83ef796309a9)

commit c0b807920e9b93776231935db4ff00d2c2f2a3a0
Author: Jim McDonough j...@samba.org
Date:   Mon Jun 29 09:42:35 2009 -0400

Don't require Modify property perms to unjoin (bug #6481) net ads leave 
stopped working when modify properties permissions were not granted (meaning 
you had to be allowed to disable the account that you were about to delete).

Libnetapi should not delete machine accounts, as this does not
happen on win32.  The WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag
really means disable (both in practice and docs).

However, to keep the functionality in net ads leave, we
will still try to do the delete.  If this fails, we try
to do the disable.

Additionally, it is possible in windows to not disable or
delete the account, but just tell the local machine that it
is no longer in the account.  libnet can now do this as well.

Don't use ads realm name for non-ads case.  #6481

Also check that the connection to ads worked.
(cherry picked from commit 6f9ed71a87e4ed5665ee8999ebf987e2165629c6)

commit 17d1f1c54ef5782f269e1c9a94987842ec18fd6e
Author: Günther Deschner g...@samba.org
Date:   Mon Jun 29 15:27:13 2009 +0200

s3-test: add RPC-SAMR-MACHINE-AUTH to list of tests to run against s3.

Guenther
(cherry picked from commit 99f68c7b1c527bc39acd0f9db15f65ce087c5dca)

commit 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-616-g3532882

2009-07-27 Thread Volker Lendecke
The branch, master has been updated
   via  3532882d02ff30c1ea47dd433715246351297e4e (commit)
   via  5135ebd6f099518f0a0b5796e8057210be824740 (commit)
   via  d3132e21f3c93043e3d29584f4094b6edfc02c5a (commit)
   via  e30509f037098feac8345f39524902061712039f (commit)
  from  cdd7a5208fbcb65e4a75ee08f8f015530f418c15 (commit)

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


- Log -
commit 3532882d02ff30c1ea47dd433715246351297e4e
Author: Volker Lendecke v...@samba.org
Date:   Mon Jul 27 14:28:52 2009 +0200

Lift the event loop in rpc_api_pipe_req() one level into cli_do_rpc_ndr

commit 5135ebd6f099518f0a0b5796e8057210be824740
Author: Volker Lendecke v...@samba.org
Date:   Mon Jul 27 14:47:41 2009 +0200

Fix a valgrind error in chain_reply

construct_reply() references the request after chain_reply has freed it.

commit d3132e21f3c93043e3d29584f4094b6edfc02c5a
Author: Volker Lendecke v...@samba.org
Date:   Sun Jul 26 20:56:58 2009 +0200

Fix a typo

commit e30509f037098feac8345f39524902061712039f
Author: Volker Lendecke v...@samba.org
Date:   Sun Jul 26 20:20:50 2009 +0200

Fix a valgrind error in winbind

When looking for idle clients, we dereferenced state-response. As this is
dynamically allocated now, the proper test is whether state-response 
exists at
all. This is the case when an async operation is in process at that moment.

---

Summary of changes:
 source3/include/proto.h|   11 ++-
 source3/include/smb.h  |2 +
 source3/librpc/rpc/dcerpc.c|8 +-
 source3/rpc_client/cli_pipe.c  |   33 -
 source3/rpc_client/ndr.c   |  146 +++-
 source3/smbd/process.c |   13 +++-
 source3/winbindd/winbindd.c|3 +-
 source3/winbindd/winbindd_cm.c |2 +-
 8 files changed, 141 insertions(+), 77 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index aed2c4c..3e9f5e8 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5262,10 +5262,6 @@ struct tevent_req *rpc_api_pipe_req_send(TALLOC_CTX 
*mem_ctx,
 prs_struct *req_data);
 NTSTATUS rpc_api_pipe_req_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
   prs_struct *reply_pdu);
-NTSTATUS rpc_api_pipe_req(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *cli,
-   uint8 op_num,
-   prs_struct *in_data,
-   prs_struct *out_data);
 struct tevent_req *rpc_pipe_bind_send(TALLOC_CTX *mem_ctx,
  struct event_context *ev,
  struct rpc_pipe_client *cli,
@@ -5615,6 +5611,13 @@ void init_samr_CryptPassword(const char *pwd,
 
 /* The following definitions come from rpc_client/ndr.c  */
 
+struct tevent_req *cli_do_rpc_ndr_send(TALLOC_CTX *mem_ctx,
+  struct tevent_context *ev,
+  struct rpc_pipe_client *cli,
+  const struct ndr_interface_table *table,
+  uint32_t opnum,
+  void *r);
+NTSTATUS cli_do_rpc_ndr_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
 NTSTATUS cli_do_rpc_ndr(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
const struct ndr_interface_table *table,
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 6ccdd96..1192744 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -655,6 +655,8 @@ struct smb_request {
 * state information for async smb handling
 */
void *async_priv;
+
+   bool done;
 };
 
 /* Defines for the sent_oplock_break field above. */
diff --git a/source3/librpc/rpc/dcerpc.c b/source3/librpc/rpc/dcerpc.c
index 21a2004..e6c4cb4 100644
--- a/source3/librpc/rpc/dcerpc.c
+++ b/source3/librpc/rpc/dcerpc.c
@@ -69,6 +69,10 @@ struct rpc_request *dcerpc_ndr_request_send(struct 
dcerpc_pipe *p, const struct
return ret;
 }
 
+#if 0
+
+Completely unfinished and unused -- vl :-)
+
 /**
  * Wait for a DCE/RPC request. 
  *
@@ -118,10 +122,6 @@ NTSTATUS dcerpc_ndr_request_recv(struct rpc_request *req)
return NT_STATUS_OK;
 }
 
-#if 0
-
-Completely unfinished and unused -- vl :-)
-
 /**
  * Connect to a DCE/RPC interface.
  * 
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 70660da..c9f17c6 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -2284,39 +2284,6 @@ NTSTATUS rpc_api_pipe_req_recv(struct tevent_req *req, 
TALLOC_CTX *mem_ctx,
return NT_STATUS_OK;
 }
 
-NTSTATUS rpc_api_pipe_req(TALLOC_CTX *mem_ctx, struct rpc_pipe_client *cli,
-  

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5333-gb280a2f

2009-07-27 Thread Karolin Seeger
The branch, v3-3-test has been updated
   via  b280a2fee579fe1a999617c8e01b079e5e989c9d (commit)
   via  fe911ee58b5c0b0c6c9c23bee8d10bbf53f5a90b (commit)
  from  4d25298b133279c0918e0663cf2fd59f7e11672f (commit)

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


- Log -
commit b280a2fee579fe1a999617c8e01b079e5e989c9d
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Jul 27 16:21:16 2009 +0200

WHATSNEW: Start WHATSNEW for 3.3.7.

Karolin

commit fe911ee58b5c0b0c6c9c23bee8d10bbf53f5a90b
Author: Karolin Seeger ksee...@samba.org
Date:   Mon Jul 27 15:56:02 2009 +0200

VERSION: Raise version number up to 3.3.7.

Karolin

---

Summary of changes:
 WHATSNEW.txt   |   84 ++-
 source/VERSION |2 +-
 2 files changed, 83 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 58bb038..81631ce 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,4 +1,85 @@
=
+   Release Notes for Samba 3.3.7
+ July, 29  2009
+   =
+
+
+This is the latest bugfix release of the Samba 3.3 series.
+
+Major enhancements in Samba 3.3.7 include:
+
+   o
+
+
+##
+Changes
+###
+
+
+Changes since 3.3.6:
+
+
+
+o   Jeremy Allison j...@samba.org
+* BUG 6421: Fix POSIX read-only open on read-only shares.
+* BUG 6476: Fix smbd zombies in memory when using [x]inetd.
+* BUG 6487: Add missing DFS call in trans2 mkdir call.
+* BUG 6520: Fix time stamps when unix extensions = yes.
+
+
+o   Günther Deschner g...@samba.org
+* BUG 6253: Use correct value for password expiry calculation in
+  pam_winbind.
+* BUG 6340: Fix segfault when cleartext trustdom pwd could not be 
retrieved.
+* BUG 6451: Use right access bits in net/libnetapi user rename.
+* BUG 6484: Fix _lsa_LookupNames2() server implementation which always
+  returned a NULL sid_array.
+
+
+o   Björn Jacke b...@sernet.de
+* BUG 6497: Fix configure error.
+
+
+o   Volker Lendecke v...@samba.org
+* BUG 6498: Add workaround for MS KB932762.
+
+
+o   Jim McDonough j...@samba.org
+* BUG 6481: Don't require Modify property perms to unjoin.
+
+
+o   Stefan Metzmacher me...@samba.org
+* BUG 6526: Let parent_dirname() correctly return toplevel filenames.
+
+
+o   Bo Yang boy...@samba.org
+* BUG 6560: Fix handling of UPN.
+
+
+##
+Reporting bugs  Development Discussion
+###
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored.  All bug reports should
+be filed under the Samba 3.3 product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+==
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+==
+
+
+Release notes for older releases follow:
+
+
+   =
Release Notes for Samba 3.3.6
  June, 23  2009
=
@@ -45,8 +126,7 @@ database (https://bugzilla.samba.org/).
 ==
 
 
-Release notes for older releases follow:
-
+--
 
 
=
diff --git a/source/VERSION b/source/VERSION
index 96c6f85..5123a41 100644
--- a/source/VERSION
+++ b/source/VERSION
@@ -25,7 +25,7 @@
 
 SAMBA_VERSION_MAJOR=3
 SAMBA_VERSION_MINOR=3
-SAMBA_VERSION_RELEASE=6
+SAMBA_VERSION_RELEASE=7
 
 
 # Bug fix releases use a letter for the patch revision #


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-617-gb7c003c

2009-07-27 Thread Stefan Metzmacher
The branch, master has been updated
   via  b7c003c09c06ef5a23beb0928affaba75f65587c (commit)
  from  3532882d02ff30c1ea47dd433715246351297e4e (commit)

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


- Log -
commit b7c003c09c06ef5a23beb0928affaba75f65587c
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 17:25:12 2009 +0200

Revert s4:kerberos Add 'net export keytab' command for wireshark 
decryption

This reverts commit a40ce5d0d9d06f592a8885162bbaf644006b9f0f.

This breaks the build...

Andrew, please repush it, when it's fixed:-)

metze

---

Summary of changes:
 source4/auth/kerberos/config.mk   |3 +-
 source4/auth/kerberos/keytab_copy.c   |  146 -
 source4/kdc/config.mk |   16 +---
 source4/libnet/config.mk  |4 +-
 source4/libnet/libnet.h   |1 -
 source4/libnet/libnet_export_keytab.c |   54 
 source4/libnet/libnet_export_keytab.h |   28 --
 source4/utils/net/config.mk   |3 +-
 source4/utils/net/net.c   |4 +-
 source4/utils/net/net_export_keytab.c |  110 -
 10 files changed, 8 insertions(+), 361 deletions(-)
 delete mode 100644 source4/auth/kerberos/keytab_copy.c
 delete mode 100644 source4/libnet/libnet_export_keytab.c
 delete mode 100644 source4/libnet/libnet_export_keytab.h
 delete mode 100644 source4/utils/net/net_export_keytab.c


Changeset truncated at 500 lines:

diff --git a/source4/auth/kerberos/config.mk b/source4/auth/kerberos/config.mk
index 609b036..822bf39 100644
--- a/source4/auth/kerberos/config.mk
+++ b/source4/auth/kerberos/config.mk
@@ -12,8 +12,7 @@ KERBEROS_OBJ_FILES = $(addprefix $(authsrcdir)/kerberos/, \
kerberos_heimdal.o \
kerberos_pac.o \
gssapi_parse.o \
-   krb5_init_context.o \
-   keytab_copy.o)
+   krb5_init_context.o)
 
 $(eval $(call 
proto_header_template,$(authsrcdir)/kerberos/proto.h,$(KERBEROS_OBJ_FILES:.o=.c)))
 
diff --git a/source4/auth/kerberos/keytab_copy.c 
b/source4/auth/kerberos/keytab_copy.c
deleted file mode 100644
index ba4ea2b..000
--- a/source4/auth/kerberos/keytab_copy.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
- * (Royal Institute of Technology, Stockholm, Sweden).
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *notice, this list of conditions and the following disclaimer in the
- *documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the Institute nor the names of its contributors
- *may be used to endorse or promote products derived from this software
- *without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include includes.h
-#include system/kerberos.h
-#include auth/kerberos/kerberos.h
-
-static const krb5_boolean verbose_flag = FALSE;
-
-static krb5_boolean
-compare_keyblock(const krb5_keyblock *a, const krb5_keyblock *b)
-{
-if(a-keytype != b-keytype ||
-   a-keyvalue.length != b-keyvalue.length ||
-   memcmp(a-keyvalue.data, b-keyvalue.data, a-keyvalue.length) != 0)
-   return FALSE;
-return TRUE;
-}
-
-krb5_error_code kt_copy (krb5_context context, const char *from, const char 
*to)
-{
-krb5_error_code ret;
-krb5_keytab src_keytab, dst_keytab;
-krb5_kt_cursor cursor;
-krb5_keytab_entry entry, dummy;
-
-ret = krb5_kt_resolve (context, from, src_keytab);
-if (ret) {
-   krb5_warn (context, ret, resolving src keytab `%s', from);
-   return 1;
-}
-
-ret = krb5_kt_resolve (context, to, dst_keytab);
-if (ret) {
-   krb5_kt_close (context, src_keytab);
-   

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-620-gf167c97

2009-07-27 Thread Stefan Metzmacher
The branch, master has been updated
   via  f167c977d12e88fce3ac15a25c24ca5d1157a883 (commit)
   via  92791ce9a8439ac06a22afdbeb0d0fc66c32cb31 (commit)
   via  7ccc9a6ef563cc855752b4e74152420b9be5af43 (commit)
  from  b7c003c09c06ef5a23beb0928affaba75f65587c (commit)

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


- Log -
commit f167c977d12e88fce3ac15a25c24ca5d1157a883
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 17:35:54 2009 +0200

librpc: rerun make idl_full

metze

commit 92791ce9a8439ac06a22afdbeb0d0fc66c32cb31
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 17:34:37 2009 +0200

pidl: allow foo being on the wire after [length_is(foo)] uint8 *buffer

metze

commit 7ccc9a6ef563cc855752b4e74152420b9be5af43
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 15:52:16 2009 +0200

pidl: add support for [string] on fixed size arrays.

midl also supports this:

struct {
long l1;
[string] wchar_t str[16];
long l2;
};

Where the wire size of str is encoded like a length_is() header:
4-byte offset == 0;
4-byte array length;

The strings are zero terminated.

metze

---

Summary of changes:
 librpc/gen_ndr/ndr_epmapper.c|8 +-
 librpc/gen_ndr/ndr_lsa.c |2 +-
 librpc/gen_ndr/ndr_ntsvcs.c  |2 +-
 librpc/gen_ndr/ndr_samr.c|6 +-
 librpc/gen_ndr/ndr_srvsvc.c  |2 +-
 librpc/gen_ndr/ndr_winreg.c  |8 +-
 pidl/lib/Parse/Pidl/NDR.pm   |7 ++
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |6 ++-
 pidl/tests/ndr_string.pl |  110 +-
 9 files changed, 135 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_epmapper.c b/librpc/gen_ndr/ndr_epmapper.c
index ad1c66c..e39356f 100644
--- a/librpc/gen_ndr/ndr_epmapper.c
+++ b/librpc/gen_ndr/ndr_epmapper.c
@@ -2056,10 +2056,10 @@ static enum ndr_err_code ndr_pull_epm_Lookup(struct 
ndr_pull *ndr, int flags, st
NDR_PULL_ALLOC_N(ndr, r-out.entries, ndr_get_array_size(ndr, 
r-out.entries));
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r-out.entries, 0);
-   for (cntr_entries_0 = 0; cntr_entries_0  *r-out.num_ents; 
cntr_entries_0++) {
+   for (cntr_entries_0 = 0; cntr_entries_0  
ndr_get_array_length(ndr, r-out.entries); cntr_entries_0++) {
NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_SCALARS, 
r-out.entries[cntr_entries_0]));
}
-   for (cntr_entries_0 = 0; cntr_entries_0  *r-out.num_ents; 
cntr_entries_0++) {
+   for (cntr_entries_0 = 0; cntr_entries_0  
ndr_get_array_length(ndr, r-out.entries); cntr_entries_0++) {
NDR_CHECK(ndr_pull_epm_entry_t(ndr, NDR_BUFFERS, 
r-out.entries[cntr_entries_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_0, 0);
@@ -2247,10 +2247,10 @@ _PUBLIC_ enum ndr_err_code ndr_pull_epm_Map(struct 
ndr_pull *ndr, int flags, str
NDR_PULL_ALLOC_N(ndr, r-out.towers, ndr_get_array_size(ndr, 
r-out.towers));
_mem_save_towers_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r-out.towers, 0);
-   for (cntr_towers_0 = 0; cntr_towers_0  *r-out.num_towers; 
cntr_towers_0++) {
+   for (cntr_towers_0 = 0; cntr_towers_0  
ndr_get_array_length(ndr, r-out.towers); cntr_towers_0++) {
NDR_CHECK(ndr_pull_epm_twr_p_t(ndr, NDR_SCALARS, 
r-out.towers[cntr_towers_0]));
}
-   for (cntr_towers_0 = 0; cntr_towers_0  *r-out.num_towers; 
cntr_towers_0++) {
+   for (cntr_towers_0 = 0; cntr_towers_0  
ndr_get_array_length(ndr, r-out.towers); cntr_towers_0++) {
NDR_CHECK(ndr_pull_epm_twr_p_t(ndr, NDR_BUFFERS, 
r-out.towers[cntr_towers_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_towers_0, 0);
diff --git a/librpc/gen_ndr/ndr_lsa.c b/librpc/gen_ndr/ndr_lsa.c
index b8ba679..61853b6 100644
--- a/librpc/gen_ndr/ndr_lsa.c
+++ b/librpc/gen_ndr/ndr_lsa.c
@@ -426,7 +426,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_BinaryString(struct 
ndr_pull *ndr, int n
NDR_PULL_ALLOC_N(ndr, r-array, ndr_get_array_size(ndr, 
r-array));
_mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r-array, 0);
-   for (cntr_array_1 = 0; cntr_array_1  r-length / 2; 
cntr_array_1++) {
+   for (cntr_array_1 = 0; cntr_array_1  
ndr_get_array_length(ndr, r-array); cntr_array_1++) {
 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-627-gb676e63

2009-07-27 Thread Stefan Metzmacher
The branch, master has been updated
   via  b676e63a520e644e2737b55a61244fa8df9a10dc (commit)
   via  826e6a83a000156cbdbacdd2fc1fdf4c4dceac5e (commit)
   via  3142f76e2d181e6a3d51d5a7b9efc28f2742b911 (commit)
   via  2a797731a009b2a1c908b3075791f87c41d528ad (commit)
   via  a2d0c6cec81d86722589b3afd0ab186989260869 (commit)
   via  e31a92c44e5275ea971c052e2909a9c3ae81123a (commit)
   via  8860a03671adc9cb35ddffd147960b2f2dc4bd3b (commit)
  from  f167c977d12e88fce3ac15a25c24ca5d1157a883 (commit)

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


- Log -
commit b676e63a520e644e2737b55a61244fa8df9a10dc
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 16:03:03 2009 +0200

frstrans.idl: add definition of frstrans_InitializeFileTransferAsync()

metze

commit 826e6a83a000156cbdbacdd2fc1fdf4c4dceac5e
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 16:02:09 2009 +0200

frstrans.idl: add definition of frstrans_AsyncPoll()

metze

commit 3142f76e2d181e6a3d51d5a7b9efc28f2742b911
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 16:01:11 2009 +0200

frstrans.idl: add definition of frstrans_RequestVersionVector()

metze

commit 2a797731a009b2a1c908b3075791f87c41d528ad
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 16:00:00 2009 +0200

frstrans.idl: add definition of frstrans_RequestUpdates()

metze

commit a2d0c6cec81d86722589b3afd0ab186989260869
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 15:57:32 2009 +0200

frstrans.idl: add definition of frstrans_EstablishSession

metze

commit e31a92c44e5275ea971c052e2909a9c3ae81123a
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 15:56:13 2009 +0200

frstrans.idl: add definition of frstrans_EstablishConnection()

metze

commit 8860a03671adc9cb35ddffd147960b2f2dc4bd3b
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Jul 27 15:55:37 2009 +0200

frstrans.idl: add definition of frstrans_CheckConnectivity()

metze

---

Summary of changes:
 librpc/idl/frstrans.idl |  216 +--
 1 files changed, 209 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/frstrans.idl b/librpc/idl/frstrans.idl
index c79aabf..74f3c64 100644
--- a/librpc/idl/frstrans.idl
+++ b/librpc/idl/frstrans.idl
@@ -13,27 +13,151 @@ interface frstrans
 {
/*/
/* Function 0x00 */
-   [todo] void FRSTRANS_CHECK_CONNECTIVITY();
+   WERROR frstrans_CheckConnectivity(
+   [in] GUID replica_set_guid,
+   [in] GUID connection_guid
+   );
 
/*/
/* Function 0x01 */
-   [todo] void FRSTRANS_ESTABLISH_CONNECTION();
+   typedef [v1_enum,flag(NDR_PAHEX)] enum {
+   FRSTRANS_PROTOCOL_VERSION_W2K3R2= 0x0005,
+   FRSTRANS_PROTOCOL_VERSION_LONGHORN_SERVER   = 0x00050002
+   } frstrans_ProtocolVersion;
+
+   typedef [bitmap32bit] bitmap {
+   FRSTRANS_TRANSPORT_SUPPORTS_RDC_SIMILARITY  = 0x0001
+   } frstrans_TransportFlags;
+
+   WERROR frstrans_EstablishConnection(
+   [in] GUID replica_set_guid,
+   [in] GUID connection_guid,
+   [in] frstrans_ProtocolVersion downstream_protocol_version,
+   [in] frstrans_TransportFlags downstream_flags,
+   [out,ref] frstrans_ProtocolVersion *upstream_protocol_version,
+   [out,ref] frstrans_TransportFlags *upstream_flags
+   );
 
/*/
/* Function 0x02 */
-   [todo] void FRSTRANS_ESTABLISH_SESSION();
+   WERROR frstrans_EstablishSession(
+   [in] GUID connection_guid,
+   [in] GUID content_set_guid
+   );
 
/*/
/* Function 0x03 */
-   [todo] void FRSTRANS_REQUEST_UPDATES();
+   typedef enum {
+   FRSTRANS_UPDATE_REQUEST_ALL = 0x,
+   FRSTRANS_UPDATE_REQUEST_TOMBSTONES  = 0x0001,
+   FRSTRANS_UPDATE_REQUEST_LIVE= 0x0002
+   } frstrans_UpdateRequestType;
+
+   typedef enum {
+   FRSTRANS_UPDATE_STATUS_DONE = 0x0002,
+   FRSTRANS_UPDATE_STATUS_MORE = 0x0003
+   } frstrans_UpdateStatus;
+
+   typedef struct {
+   GUID db_guid;
+   hyper low;
+   hyper high;
+   } frstrans_VersionVector;
+
+   typedef [flag(NDR_PAHEX)] struct {
+   boolean32 present;
+   boolean32 name_conflict;
+   uint32 attributes;
+   NTTIME fence;
+   NTTIME clock;
+   NTTIME create_time;
+   GUID 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-628-ga869e42

2009-07-27 Thread Jeff Layton
The branch, master has been updated
   via  a869e4253a87f9a5e13dbe87b2799f8683d238d7 (commit)
  from  b676e63a520e644e2737b55a61244fa8df9a10dc (commit)

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


- Log -
commit a869e4253a87f9a5e13dbe87b2799f8683d238d7
Author: Shirish Pargaonkar shirishpargaon...@gmail.com
Date:   Mon Jul 27 12:02:35 2009 -0400

umount.cifs: do not attempt to update /etc/mtab if it is symbolic link

If /etc/mtab is a symbolic link to e.g. /proc/mounts, do not update it.

This is a fix for a bug reported in 4675 on samba bugzilla

Signed-off-by: Shirish Pargaonkar shirishpargaon...@gmail.com

---

Summary of changes:
 client/umount.cifs.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/umount.cifs.c b/client/umount.cifs.c
index 0005054..35563c1 100644
--- a/client/umount.cifs.c
+++ b/client/umount.cifs.c
@@ -146,9 +146,11 @@ static int remove_from_mtab(char * mountpoint)
FILE * org_fd;
FILE * new_fd;
struct mntent * mount_entry;
+   struct stat statbuf;
 
-   /* Do we need to check if it is a symlink to e.g. /proc/mounts
-   in which case we probably do not want to update it? */
+   /* If it is a symlink, e.g. to /proc/mounts, no need to update it. */
+   if ((lstat(MOUNTED, statbuf) == 0)  (S_ISLNK(statbuf.st_mode)))
+   return 0;
 
/* Do we first need to check if it is writable? */ 
 
@@ -162,7 +164,6 @@ static int remove_from_mtab(char * mountpoint)
printf(attempting to remove from mtab\n);
 
org_fd = setmntent(MOUNTED, r);
-
if(org_fd == NULL) {
printf(Can not open %s\n,MOUNTED);
unlock_mtab();


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-629-g67d9130

2009-07-27 Thread Kai Blin
The branch, master has been updated
   via  67d9130c134e885c17242596aacd2f265737d805 (commit)
  from  a869e4253a87f9a5e13dbe87b2799f8683d238d7 (commit)

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


- Log -
commit 67d9130c134e885c17242596aacd2f265737d805
Author: Kai Blin k...@samba.org
Date:   Mon Jul 27 17:37:22 2009 +0200

s3: net ads user info should print primary group as well (bug #2658)

Thanks to Pavel V. Rochnyack r...@muma.tusur.ru for reporting this and
offering an initial patch.

---

Summary of changes:
 source3/utils/net_ads.c |   72 +--
 1 files changed, 57 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 8f76c0e..9ca52a8 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -23,6 +23,7 @@
 #include includes.h
 #include utils/net.h
 #include librpc/gen_ndr/ndr_krb5pac.h
+#include nsswitch/libwbclient/wbclient.h
 
 #ifdef HAVE_ADS
 
@@ -518,44 +519,84 @@ static int ads_user_add(struct net_context *c, int argc, 
const char **argv)
 
 static int ads_user_info(struct net_context *c, int argc, const char **argv)
 {
-   ADS_STRUCT *ads;
+   ADS_STRUCT *ads = NULL;
ADS_STATUS rc;
-   LDAPMessage *res;
-   const char *attrs[] = {memberOf, NULL};
+   LDAPMessage *res = NULL;
+   TALLOC_CTX *frame;
+   int ret = 0;
+   wbcErr wbc_status;
+   const char *attrs[] = {memberOf, primaryGroupID, NULL};
char *searchstring=NULL;
char **grouplist;
+   char *primary_group;
char *escaped_user;
+   DOM_SID primary_group_sid;
+   uint32_t group_rid;
+   enum SID_NAME_USE type;
 
if (argc  1 || c-display_usage) {
return net_ads_user_usage(c, argc, argv);
}
 
-   escaped_user = escape_ldap_string(talloc_tos(), argv[0]);
+   frame = talloc_new(talloc_tos());
+   if (frame == NULL) {
+   return -1;
+   }
 
+   escaped_user = escape_ldap_string(frame, argv[0]);
if (!escaped_user) {
d_fprintf(stderr, ads_user_info: failed to escape user %s\n, 
argv[0]);
return -1;
}
 
if (!ADS_ERR_OK(ads_startup(c, false, ads))) {
-   TALLOC_FREE(escaped_user);
-   return -1;
+   ret = -1;
+   goto error;
}
 
if (asprintf(searchstring, (sAMAccountName=%s), escaped_user) == -1) 
{
-   TALLOC_FREE(escaped_user);
-   return -1;
+   ret =-1;
+   goto error;
}
rc = ads_search(ads, res, searchstring, attrs);
SAFE_FREE(searchstring);
 
if (!ADS_ERR_OK(rc)) {
d_fprintf(stderr, ads_search: %s\n, ads_errstr(rc));
-   ads_destroy(ads);
-   TALLOC_FREE(escaped_user);
-   return -1;
+   ret = -1;
+   goto error;
+   }
+
+   if (!ads_pull_uint32(ads, res, primaryGroupID, group_rid)) {
+   d_fprintf(stderr, ads_pull_uint32 failed\n);
+   ret = -1;
+   goto error;
}
 
+   rc = ads_domain_sid(ads, primary_group_sid);
+   if (!ADS_ERR_OK(rc)) {
+   d_fprintf(stderr, ads_domain_sid: %s\n, ads_errstr(rc));
+   ret = -1;
+   goto error;
+   }
+
+   sid_append_rid(primary_group_sid, group_rid);
+
+   wbc_status = wbcLookupSid((struct wbcDomainSid *)primary_group_sid,
+ NULL, /* don't look up domain */
+ primary_group,
+ (enum wbcSidType *) type);
+   if (!WBC_ERROR_IS_OK(wbc_status)) {
+   d_fprintf(stderr, wbcLookupSid: %s\n,
+ wbcErrorString(wbc_status));
+   ret = -1;
+   goto error;
+   }
+
+   d_printf(%s\n, primary_group);
+
+   wbcFreeMemory(primary_group);
+
grouplist = ldap_get_values((LDAP *)ads-ldap.ld,
(LDAPMessage *)res, memberOf);
 
@@ -570,10 +611,11 @@ static int ads_user_info(struct net_context *c, int argc, 
const char **argv)
ldap_value_free(grouplist);
}
 
-   ads_msgfree(ads, res);
-   ads_destroy(ads);
-   TALLOC_FREE(escaped_user);
-   return 0;
+error:
+   if (res) ads_msgfree(ads, res);
+   if (ads) ads_destroy(ads);
+   TALLOC_FREE(frame);
+   return ret;
 }
 
 static int ads_user_delete(struct net_context *c, int argc, const char **argv)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-630-g9297b97

2009-07-27 Thread Jeremy Allison
The branch, master has been updated
   via  9297b975f58a6c8a8609e05d0bed7b4846a2be32 (commit)
  from  67d9130c134e885c17242596aacd2f265737d805 (commit)

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


- Log -
commit 9297b975f58a6c8a8609e05d0bed7b4846a2be32
Author: Jeremy Allison j...@samba.org
Date:   Mon Jul 27 12:09:40 2009 -0700

Fix the build breakage by #including modules/vfs_acl_common.c
into acl_tdb and acl_xattr. Duplicates the code size, but keeps
the code in common so I don't have to do bug fixes in two places
(which is what I really cared about).
Jeremy.

---

Summary of changes:
 source3/Makefile.in  |4 ++--
 source3/include/proto.h  |   27 ---
 source3/modules/vfs_acl_common.c |   35 ---
 source3/modules/vfs_acl_tdb.c|8 +---
 source3/modules/vfs_acl_xattr.c  |9 ++---
 5 files changed, 33 insertions(+), 50 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index b963511..e6d0cf0 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -706,8 +706,8 @@ VFS_FILEID_OBJ = modules/vfs_fileid.o
 VFS_AIO_FORK_OBJ = modules/vfs_aio_fork.o
 VFS_PREOPEN_OBJ = modules/vfs_preopen.o
 VFS_SYNCOPS_OBJ = modules/vfs_syncops.o
-VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o modules/vfs_acl_common.o
-VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o modules/vfs_acl_common.o
+VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
+VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o
 VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o
 VFS_ONEFS_OBJ = modules/vfs_onefs.o modules/onefs_acl.o modules/onefs_system.o 
\
modules/onefs_open.o modules/onefs_streams.o 
modules/onefs_dir.o \
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3e9f5e8..f7fedc7 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -7288,31 +7288,4 @@ uint32_t ds_uf2atype(uint32_t uf);
 uint32_t ds_gtype2atype(uint32_t gtype);
 enum lsa_SidType ds_atype_map(uint32_t atype);
 
-/* The following definitions come from modules/vfs_acl_xattr.c */
-NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
-   vfs_handle_struct *handle,
-   files_struct *fsp,
-   const char *name,
-   DATA_BLOB *pblob);
-NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
-   files_struct *fsp,
-   DATA_BLOB *pblob);
-NTSTATUS store_acl_blob_pathname(vfs_handle_struct *handle,
-   const char *fname,
-   DATA_BLOB *pblob);
-
-/* The following definitions come from modules/vfs_acl_common.c */
-int open_acl_common(vfs_handle_struct *handle,
-   struct smb_filename *smb_fname,
-   files_struct *fsp,
-   int flags,
-   mode_t mode);
-int mkdir_acl_common(vfs_handle_struct *handle, const char *path, mode_t mode);
-NTSTATUS fget_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
-   uint32_t security_info, struct security_descriptor **ppdesc);
-NTSTATUS get_nt_acl_common(vfs_handle_struct *handle,
-   const char *name, uint32_t security_info, struct security_descriptor 
**ppdesc);
-NTSTATUS fset_nt_acl_common(vfs_handle_struct *handle, files_struct *fsp,
-   uint32_t security_info_sent, const struct security_descriptor *psd);
-
 #endif /*  _PROTO_H_  */
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index d8ff8c6..5fdd2b4 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -1,5 +1,6 @@
 /*
  * Store Windows ACLs in data store - common functions.
+ * #included into modules/vfs_acl_xattr.c and modules/vfs_acl_tdb.c
  *
  * Copyright (C) Volker Lendecke, 2008
  * Copyright (C) Jeremy Allison, 2009
@@ -18,21 +19,25 @@
  * along with this program; if not, see http://www.gnu.org/licenses/.
  */
 
-/* NOTE: This is an experimental module, not yet finished. JRA. */
-
-#include includes.h
-#include librpc/gen_ndr/xattr.h
-#include librpc/gen_ndr/ndr_xattr.h
-#include ../lib/crypto/crypto.h
-
-#undef DBGC_CLASS
-#define DBGC_CLASS DBGC_VFS
-
 static NTSTATUS create_acl_blob(const struct security_descriptor *psd,
DATA_BLOB *pblob,
uint16_t hash_type,
uint8_t hash[XATTR_SD_HASH_SIZE]);
 
+static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
+   vfs_handle_struct *handle,
+   files_struct *fsp,
+   const char *name,
+   DATA_BLOB *pblob);
+
+static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle,
+   files_struct *fsp,
+   DATA_BLOB 

[SCM] CTDB repository - branch 1.0.82 updated - ctdb-1.0.82-21-ga996a38

2009-07-27 Thread Ronnie Sahlberg
The branch, 1.0.82 has been updated
   via  a996a381094cfa75e4222498e68c4528cffebc56 (commit)
   via  049fd5e25e5b62df35aff615e160ba3b0353db8d (commit)
   via  24f51b4be1d16529131be78eae4afa5dd924c3c4 (commit)
   via  bbebc1589e5a020a32064f69c81ccdaba8e49fc3 (commit)
   via  69e97b343d9e0dd48bc3e6f001f26550426653f8 (commit)
   via  7797b1ce666ad935b14a22f7e5cab7451f773519 (commit)
   via  42ee0a2c052000a097bd09301cac4ad43d25610f (commit)
   via  7f58183d66e83223974b19e009321acabc391ee1 (commit)
   via  1940e10873c25c23220d878f334dd68b25ec2c9c (commit)
   via  f2a84dc7f86b4cce1d656714e8be574544c9b185 (commit)
  from  2c81311d3a7e1ce7ea6008a3f9a90dca00fee8d2 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.82


- Log -
commit a996a381094cfa75e4222498e68c4528cffebc56
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Mon Jul 27 13:10:32 2009 +1000

new version 1.0.82-7

commit 049fd5e25e5b62df35aff615e160ba3b0353db8d
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jun 30 12:17:05 2009 +1000

dont try sending a keepalive if the transport is down

commit 24f51b4be1d16529131be78eae4afa5dd924c3c4
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jun 30 12:16:13 2009 +1000

Dont even try allocating and sending a CALL packet if the transport is down

commit bbebc1589e5a020a32064f69c81ccdaba8e49fc3
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jun 30 12:14:58 2009 +1000

failing a dmaster send due to the transport being down is fatal

commit 69e97b343d9e0dd48bc3e6f001f26550426653f8
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jun 30 12:13:15 2009 +1000

if we fail a dmaster migration due to the transport being down, then that 
is a fatal condition.

commit 7797b1ce666ad935b14a22f7e5cab7451f773519
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jun 30 12:10:27 2009 +1000

dont try to send error packets if the transport is down

commit 42ee0a2c052000a097bd09301cac4ad43d25610f
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jun 30 12:09:28 2009 +1000

dont even try to send a message from the main daemon if the transport is 
down

commit 7f58183d66e83223974b19e009321acabc391ee1
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jun 30 12:03:12 2009 +1000

Dont try to allocate and send packets if the transport is down

commit 1940e10873c25c23220d878f334dd68b25ec2c9c
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jun 30 11:55:42 2009 +1000

dont even try to allocate a packet if the transport is down since it will 
fail

commit f2a84dc7f86b4cce1d656714e8be574544c9b185
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jun 23 11:29:26 2009 +1000

rename 99.routing to 11.routing so that it executed before the service 
scripts

---

Summary of changes:
 Makefile.in|2 +-
 config/events.d/{99.routing = 11.routing} |0 
 packaging/RPM/ctdb.spec|7 -
 server/ctdb_call.c |   33 +++-
 server/ctdb_control.c  |5 
 server/ctdb_daemon.c   |5 
 6 files changed, 48 insertions(+), 4 deletions(-)
 rename config/events.d/{99.routing = 11.routing} (100%)


Changeset truncated at 500 lines:

diff --git a/Makefile.in b/Makefile.in
index 1288317..93d9438 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -215,6 +215,7 @@ install: all
${INSTALLCMD} -m 755 config/events.d/00.ctdb 
$(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/10.interface 
$(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/11.natgw 
$(DESTDIR)$(etcdir)/ctdb/events.d
+   ${INSTALLCMD} -m 755 config/events.d/11.routing 
$(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/20.multipathd 
$(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/40.vsftpd 
$(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/41.httpd 
$(DESTDIR)$(etcdir)/ctdb/events.d
@@ -224,7 +225,6 @@ install: all
${INSTALLCMD} -m 755 config/events.d/70.iscsi 
$(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/90.ipmux 
$(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 config/events.d/91.lvs 
$(DESTDIR)$(etcdir)/ctdb/events.d
-   ${INSTALLCMD} -m 755 config/events.d/99.routing 
$(DESTDIR)$(etcdir)/ctdb/events.d
${INSTALLCMD} -m 755 tools/ctdb_diagnostics $(DESTDIR)$(bindir)
${INSTALLCMD} -m 755 tools/onnode $(DESTDIR)$(bindir)
if [ -f doc/ctdb.1 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man1; fi
diff --git a/config/events.d/99.routing b/config/events.d/11.routing
similarity 

[SCM] CTDB repository - branch master updated - ctdb-1.0.87-1-gb6c8011

2009-07-27 Thread Ronnie Sahlberg
The branch, master has been updated
   via  b6c8011024ce4574f945d5a470075c6779b34a43 (commit)
  from  d187eb8507f35a650ff3ffc50fa49110eebca0bd (commit)

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


- Log -
commit b6c8011024ce4574f945d5a470075c6779b34a43
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jul 28 09:27:00 2009 +1000

describe how to activate NATGW without restarting the nodes on a running
cluster

---

Summary of changes:
 doc/ctdb.1   |4 +-
 doc/ctdbd.1  |   17 ++-
 doc/ctdbd.1.html |   82 +++---
 doc/ctdbd.1.xml  |   33 +
 4 files changed, 97 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/doc/ctdb.1 b/doc/ctdb.1
index fd76a6a..277c11d 100644
--- a/doc/ctdb.1
+++ b/doc/ctdb.1
@@ -1,11 +1,11 @@
 .\ Title: ctdb
 .\Author: 
 .\ Generator: DocBook XSL Stylesheets v1.73.2 http://docbook.sf.net/
-.\  Date: 07/09/2009
+.\  Date: 07/28/2009
 .\Manual: 
 .\Source: 
 .\
-.TH CTDB 1 07/09/2009  
+.TH CTDB 1 07/28/2009  
 .\ disable hyphenation
 .nh
 .\ disable justification (adjust text to left margin only)
diff --git a/doc/ctdbd.1 b/doc/ctdbd.1
index 242bd45..973e708 100644
--- a/doc/ctdbd.1
+++ b/doc/ctdbd.1
@@ -1,11 +1,11 @@
 .\ Title: ctdbd
 .\Author: 
 .\ Generator: DocBook XSL Stylesheets v1.73.2 http://docbook.sf.net/
-.\  Date: 07/09/2009
+.\  Date: 07/28/2009
 .\Manual: 
 .\Source: 
 .\
-.TH CTDBD 1 07/09/2009  
+.TH CTDBD 1 07/28/2009  
 .\ disable hyphenation
 .nh
 .\ disable justification (adjust text to left margin only)
@@ -508,6 +508,19 @@ The NAT\-GW node is assigned the CTDB_NATGW_PUBLIC_IP to 
the designated interfac
 All other nodes in the group are configured with a default route of metric 10 
pointing to the designated NAT GW node\.
 .PP
 This is implemented in the 11\.natgw eventscript\. Please see the eventscript 
for further information\.
+.SS Activating NATGW without forcing a cluster restart
+.PP
+Normally you would update the configuration and restart the nodes to activate 
NATGW\. It is however also possible to manually start NATGW without restarting 
CTDB, but it does require a recovery\.
+.PP
+To activate NATGW functionality on a cluster without restarting the actual 
nodes you can use the following process :
+.PP
+Activating NATGW on a running system
+.RS 4
+Configure NATGW as described above on all nodes\.
+Run echo 3  /proc/sys/net/ipv4/conf/all/arp_ignore on all nodes\.
+Run echo 2  /proc/sys/net/ipv4/conf/all/arp_announce on all nodes\.
+Force a recovery by running ctdb recover\.
+.RE
 .SH CLAMAV DAEMON
 .PP
 CTDB has support to manage the popular anti\-virus daemon ClamAV\. This 
support is implemented through the eventscript : /etc/ctdb/events\.d/31\.clamd\.
diff --git a/doc/ctdbd.1.html b/doc/ctdbd.1.html
index 3fa8d1a..eb66260 100644
--- a/doc/ctdbd.1.html
+++ b/doc/ctdbd.1.html
@@ -1,4 +1,4 @@
-htmlheadmeta http-equiv=Content-Type content=text/html; 
charset=ISO-8859-1titlectdbd/titlemeta name=generator content=DocBook 
XSL Stylesheets V1.73.2/headbody bgcolor=white text=black 
link=#FF vlink=#840084 alink=#FFdiv class=refentry 
lang=ena name=ctdbd.1/adiv class=titlepage/divdiv 
class=refnamedivh2Name/h2pctdbd #8212; The CTDB cluster 
daemon/p/divdiv class=refsynopsisdivh2Synopsis/h2div 
class=cmdsynopsispcode class=commandctdbd/code /p/divdiv 
class=cmdsynopsispcode class=commandctdbd/code  [-? --help] [-d 
--debug=lt;INTEGERgt;] {--dbdir=lt;directorygt;} 
{--dbdir-persistent=lt;directorygt;} [--event-script-dir=lt;directorygt;] 
[-i --interactive] [--listen=lt;addressgt;] [--logfile=lt;filenamegt;] 
[--lvs] {--nlist=lt;filenamegt;} [--no-lmaster] [--no-recmaster] 
[--nosetsched] [--public-addresses=lt;filenamegt;] 
[--public-interface=lt;interfacegt;
 ] {--reclock=lt;filenamegt;} [--single-public-ip=lt;addressgt;] 
[--socket=lt;filenamegt;] [--start-as-disabled] [--start-as-stopped] 
[--syslog] [--torture] [--transport=lt;STRINGgt;] 
[--usage]/p/div/divdiv class=refsect1 lang=ena 
name=id2479655/ah2DESCRIPTION/h2p
+htmlheadmeta http-equiv=Content-Type content=text/html; 
charset=ISO-8859-1titlectdbd/titlemeta name=generator content=DocBook 
XSL Stylesheets V1.73.2/headbody bgcolor=white text=black 
link=#FF vlink=#840084 alink=#FFdiv class=refentry 
lang=ena name=ctdbd.1/adiv class=titlepage/divdiv 
class=refnamedivh2Name/h2pctdbd #8212; The CTDB cluster 
daemon/p/divdiv class=refsynopsisdivh2Synopsis/h2div 
class=cmdsynopsispcode class=commandctdbd/code /p/divdiv 
class=cmdsynopsispcode class=commandctdbd/code  [-? --help] [-d 
--debug=lt;INTEGERgt;] {--dbdir=lt;directorygt;} 
{--dbdir-persistent=lt;directorygt;} [--event-script-dir=lt;directorygt;] 
[-i --interactive] [--listen=lt;addressgt;] 

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha8-631-g47a7a2e

2009-07-27 Thread Andrew Bartlett
The branch, master has been updated
   via  47a7a2e442c7e006eca8188c6a01707d85c4e61c (commit)
  from  9297b975f58a6c8a8609e05d0bed7b4846a2be32 (commit)

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


- Log -
commit 47a7a2e442c7e006eca8188c6a01707d85c4e61c
Author: Andrew Bartlett abart...@samba.org
Date:   Mon Jul 27 22:04:26 2009 +1000

s4:kerberos Add 'net export keytab' command for wireshark decryption

It is much easier to do decryption with wireshark when the keytab is
available for every host in the domain.  Running 'net export keytab
keytab name' will export the current (as pointed to by the supplied
smb.conf) local Samba4 doamin.

(This uses Heimdal's 'hdb' keytab and then the existing hdb-samba4,
and so has a good chance of keeping working in the long term).

Andrew Bartlett

---

Summary of changes:
 .gitignore|2 +-
 source4/auth/kerberos/config.mk   |3 +-
 source4/auth/kerberos/keytab_copy.c   |  146 +
 source4/kdc/config.mk |   18 -
 source4/kdc/hdb-samba4.h  |2 -
 source4/kdc/kdc.c |9 --
 source4/kdc/kdc.h |2 +-
 source4/kdc/pac-glue.c|   43 ++
 source4/kdc/pac-glue.h|   30 +++
 source4/libnet/config.mk  |4 +-
 source4/libnet/libnet.h   |1 +
 source4/libnet/libnet_export_keytab.c |   53 
 source4/libnet/libnet_export_keytab.h |   28 ++
 source4/utils/net/config.mk   |3 +-
 source4/utils/net/net.c   |4 +-
 source4/utils/net/net_export_keytab.c |  110 +
 16 files changed, 419 insertions(+), 39 deletions(-)
 create mode 100644 source4/auth/kerberos/keytab_copy.c
 create mode 100644 source4/kdc/pac-glue.h
 create mode 100644 source4/libnet/libnet_export_keytab.c
 create mode 100644 source4/libnet/libnet_export_keytab.h
 create mode 100644 source4/utils/net/net_export_keytab.c


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index 1ace6e7..0d54fb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -177,7 +177,7 @@ source4/heimdal/lib/wind/*_table.?
 source4/include/build.h
 source4/include/config_tmp.h
 source4/include/config_tmp.h.in
-source4/kdc/pac_glue.h
+source4/kdc/pac-glue_proto.h
 source4/ldap_server/proto.h
 source4/lib/charset/charset_proto.h
 source4/libcli/composite/proto.h
diff --git a/source4/auth/kerberos/config.mk b/source4/auth/kerberos/config.mk
index 822bf39..609b036 100644
--- a/source4/auth/kerberos/config.mk
+++ b/source4/auth/kerberos/config.mk
@@ -12,7 +12,8 @@ KERBEROS_OBJ_FILES = $(addprefix $(authsrcdir)/kerberos/, \
kerberos_heimdal.o \
kerberos_pac.o \
gssapi_parse.o \
-   krb5_init_context.o)
+   krb5_init_context.o \
+   keytab_copy.o)
 
 $(eval $(call 
proto_header_template,$(authsrcdir)/kerberos/proto.h,$(KERBEROS_OBJ_FILES:.o=.c)))
 
diff --git a/source4/auth/kerberos/keytab_copy.c 
b/source4/auth/kerberos/keytab_copy.c
new file mode 100644
index 000..ba4ea2b
--- /dev/null
+++ b/source4/auth/kerberos/keytab_copy.c
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 1997-2004 Kungliga Tekniska Högskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * 3. Neither the name of the Institute nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN 

[SCM] CTDB repository - branch master updated - ctdb-1.0.87-4-g9b39598

2009-07-27 Thread Ronnie Sahlberg
The branch, master has been updated
   via  9b395986962909a5b0548eaea7e45215df72a08e (commit)
   via  fb337c151bd16ad5ad0c99431224451979d8c651 (commit)
   via  89a9bb29a60a6fb1fba55987e6cf0a4baa695e50 (commit)
  from  b6c8011024ce4574f945d5a470075c6779b34a43 (commit)

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


- Log -
commit 9b395986962909a5b0548eaea7e45215df72a08e
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jul 28 10:02:39 2009 +1000

Document the natgw flag and how this changes the output of ctdb
getcapabilities

commit fb337c151bd16ad5ad0c99431224451979d8c651
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jul 28 10:00:33 2009 +1000

update the natgw eventscript to set the NATGW capability when this feature 
is used
This does not modify any behaviour of the daemon itself other than showing 
this flag as ON in the ctdeb getcapabilities output

commit 89a9bb29a60a6fb1fba55987e6cf0a4baa695e50
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jul 28 09:58:11 2009 +1000

add a command setnatgwstate {on|off} that can be used to indicate if this 
node is using natgw functionality or not.

---

Summary of changes:
 client/ctdb_client.c |   23 
 config/events.d/11.natgw |2 +
 doc/ctdb.1   |5 ++-
 doc/ctdb.1.html  |  134 --
 doc/ctdb.1.xml   |8 +++-
 doc/ctdbd.1  |1 +
 doc/ctdbd.1.html |   10 ++--
 doc/ctdbd.1.xml  |5 ++
 include/ctdb.h   |2 +
 include/ctdb_private.h   |3 +
 server/ctdb_control.c|   13 +
 tools/ctdb.c |   38 -
 12 files changed, 170 insertions(+), 74 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index 4ea8d04..a48e529 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -3741,3 +3741,26 @@ int ctdb_ctrl_continue_node(struct ctdb_context *ctdb, 
struct timeval timeout, u
 
return 0;
 }
+
+/*
+  set the natgw state for a node
+ */
+int ctdb_ctrl_setnatgwstate(struct ctdb_context *ctdb, struct timeval timeout, 
uint32_t destnode, uint32_t natgwstate)
+{
+   int ret;
+   TDB_DATA data;
+   int32_t res;
+
+   data.dsize = sizeof(natgwstate);
+   data.dptr  = (uint8_t *)natgwstate;
+
+   ret = ctdb_control(ctdb, destnode, 0, 
+  CTDB_CONTROL_SET_NATGWSTATE, 0, data, 
+  NULL, NULL, res, timeout, NULL);
+   if (ret != 0 || res != 0) {
+   DEBUG(DEBUG_ERR,(__location__  ctdb_control for setnatgwstate 
failed\n));
+   return -1;
+   }
+
+   return 0;
+}
diff --git a/config/events.d/11.natgw b/config/events.d/11.natgw
index b994308..6382056 100644
--- a/config/events.d/11.natgw
+++ b/config/events.d/11.natgw
@@ -33,6 +33,8 @@ case $cmd in
echo 3  /proc/sys/net/ipv4/conf/all/arp_ignore
# do not send out arp requests from loopback addresses
echo 2  /proc/sys/net/ipv4/conf/all/arp_announce
+   # update capabilities to show we are using natgw
+   ctdb setnatgwstate on
;;
 
  recovered)
diff --git a/doc/ctdb.1 b/doc/ctdb.1
index 277c11d..e56f997 100644
--- a/doc/ctdb.1
+++ b/doc/ctdb.1
@@ -340,7 +340,9 @@ This command shows the capabilities of the current node\. 
Please see manpage for
 .PP
 RECMASTER and LMASTER capabilities are primarily used when CTDBD is used to 
create a cluster spanning across WAN links\. In which case ctdbd acts as a WAN 
accelerator\.
 .PP
-LVS capabile means that the node is participating in LVS, a mode where the 
entire CTDB cluster uses one single ip address for the entire cluster instead 
of using public ip address failover\. This is an alternative to using a 
loadbalancing layer\-4 switch\.
+LVS capability means that the node is participating in LVS, a mode where the 
entire CTDB cluster uses one single ip address for the entire cluster instead 
of using public ip address failover\. This is an alternative to using a 
loadbalancing layer\-4 switch\.
+.PP
+NATGW capability means that the node participates in a NATGW group\. This flag 
can be modified using ctdb setnatgwstate {on|off}
 .PP
 Example output:
 .sp
@@ -349,6 +351,7 @@ Example output:
 RECMASTER: YES
 LMASTER: YES
 LVS: NO
+NATGW: NO
   
 .fi
 .RE
diff --git a/doc/ctdb.1.html b/doc/ctdb.1.html
index 82badbd..b135986 100644
--- a/doc/ctdb.1.html
+++ b/doc/ctdb.1.html
@@ -1,6 +1,6 @@
-htmlheadmeta http-equiv=Content-Type content=text/html; 
charset=ISO-8859-1titlectdb/titlemeta name=generator content=DocBook 
XSL Stylesheets V1.73.2/headbody bgcolor=white text=black 
link=#FF vlink=#840084 alink=#FFdiv class=refentry 
lang=ena name=ctdb.1/adiv class=titlepage/divdiv 

[SCM] CTDB repository - branch master updated - ctdb-1.0.87-6-g1d7d7dd

2009-07-27 Thread Ronnie Sahlberg
The branch, master has been updated
   via  1d7d7dd515e7ef62cacf2a712a2f4c4d62a38fa5 (commit)
   via  51aaed0e9e42e901451292e8dd545297ab725a62 (commit)
  from  9b395986962909a5b0548eaea7e45215df72a08e (commit)

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


- Log -
commit 1d7d7dd515e7ef62cacf2a712a2f4c4d62a38fa5
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jul 28 13:54:08 2009 +1000

document the two new commands setlmasterrole and setrecmasterrole

commit 51aaed0e9e42e901451292e8dd545297ab725a62
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Jul 28 13:45:13 2009 +1000

add two commands : setlmasterrole and setrecmasterrole to enable/disable 
these capabilities at runtime

---

Summary of changes:
 client/ctdb_client.c   |   46 +
 doc/ctdb.1 |   21 --
 doc/ctdb.1.html|  104 ++-
 doc/ctdb.1.xml |   37 ++---
 doc/ctdbd.1|   18 +---
 doc/ctdbd.1.html   |   84 --
 doc/ctdbd.1.xml|   38 -
 include/ctdb.h |2 +
 include/ctdb_private.h |2 +
 server/ctdb_control.c  |   26 
 tools/ctdb.c   |   62 -
 11 files changed, 278 insertions(+), 162 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index a48e529..7062fa7 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -3764,3 +3764,49 @@ int ctdb_ctrl_setnatgwstate(struct ctdb_context *ctdb, 
struct timeval timeout, u
 
return 0;
 }
+
+/*
+  set the lmaster role for a node
+ */
+int ctdb_ctrl_setlmasterrole(struct ctdb_context *ctdb, struct timeval 
timeout, uint32_t destnode, uint32_t lmasterrole)
+{
+   int ret;
+   TDB_DATA data;
+   int32_t res;
+
+   data.dsize = sizeof(lmasterrole);
+   data.dptr  = (uint8_t *)lmasterrole;
+
+   ret = ctdb_control(ctdb, destnode, 0, 
+  CTDB_CONTROL_SET_LMASTERROLE, 0, data, 
+  NULL, NULL, res, timeout, NULL);
+   if (ret != 0 || res != 0) {
+   DEBUG(DEBUG_ERR,(__location__  ctdb_control for setlmasterrole 
failed\n));
+   return -1;
+   }
+
+   return 0;
+}
+
+/*
+  set the recmaster role for a node
+ */
+int ctdb_ctrl_setrecmasterrole(struct ctdb_context *ctdb, struct timeval 
timeout, uint32_t destnode, uint32_t recmasterrole)
+{
+   int ret;
+   TDB_DATA data;
+   int32_t res;
+
+   data.dsize = sizeof(recmasterrole);
+   data.dptr  = (uint8_t *)recmasterrole;
+
+   ret = ctdb_control(ctdb, destnode, 0, 
+  CTDB_CONTROL_SET_RECMASTERROLE, 0, data, 
+  NULL, NULL, res, timeout, NULL);
+   if (ret != 0 || res != 0) {
+   DEBUG(DEBUG_ERR,(__location__  ctdb_control for 
setrecmasterrole failed\n));
+   return -1;
+   }
+
+   return 0;
+}
diff --git a/doc/ctdb.1 b/doc/ctdb.1
index e56f997..ab487d9 100644
--- a/doc/ctdb.1
+++ b/doc/ctdb.1
@@ -340,9 +340,7 @@ This command shows the capabilities of the current node\. 
Please see manpage for
 .PP
 RECMASTER and LMASTER capabilities are primarily used when CTDBD is used to 
create a cluster spanning across WAN links\. In which case ctdbd acts as a WAN 
accelerator\.
 .PP
-LVS capability means that the node is participating in LVS, a mode where the 
entire CTDB cluster uses one single ip address for the entire cluster instead 
of using public ip address failover\. This is an alternative to using a 
loadbalancing layer\-4 switch\.
-.PP
-NATGW capability means that the node participates in a NATGW group\. This flag 
can be modified using ctdb setnatgwstate {on|off}
+LVS capabile means that the node is participating in LVS, a mode where the 
entire CTDB cluster uses one single ip address for the entire cluster instead 
of using public ip address failover\. This is an alternative to using a 
loadbalancing layer\-4 switch\.
 .PP
 Example output:
 .sp
@@ -351,7 +349,6 @@ Example output:
 RECMASTER: YES
 LMASTER: YES
 LVS: NO
-NATGW: NO
   
 .fi
 .RE
@@ -484,6 +481,22 @@ This command will trigger the recovery daemon to do a 
cluster recovery\.
 .SS ipreallocate
 .PP
 This command will force the recovery master to perform a full ip reallocation 
process and redistribute all ip addresses\. This is useful to reset the 
allocations back to its default state if they have been changed using the 
moveip command\. While a recover will also perform this reallocation, a 
recovery is much more hevyweight since it will also rebuild all the databases\.
+.SS setlmasterrole on|off
+.PP
+This command is used ot enable/disable the LMASTER capability for a node at