svn commit: samba r24731 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

2007-08-27 Thread abartlet
Author: abartlet
Date: 2007-08-28 05:43:26 + (Tue, 28 Aug 2007)
New Revision: 24731

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

Log:
Remove unused code - if we hit these error conditions, then we are
dead anyway, and a segfault would leave us with more infomation.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/extended_dn.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/local_password.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/password_hash.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/rootdse.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/show_deleted.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/extended_dn.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/extended_dn.c  
2007-08-28 04:35:29 UTC (rev 24730)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/extended_dn.c  
2007-08-28 05:43:26 UTC (rev 24731)
@@ -181,11 +181,6 @@
 {
struct extended_context *ac;
 
-   if (!context || !ares) {
-   ldb_set_errstring(ldb, "NULL Context or Result in callback");
-   goto error;
-   }
-
ac = talloc_get_type(context, struct extended_context);
 
if (ares->type == LDB_REPLY_ENTRY) {

Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c   
2007-08-28 04:35:29 UTC (rev 24730)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/kludge_acl.c   
2007-08-28 05:43:26 UTC (rev 24731)
@@ -236,11 +236,6 @@
struct kludge_private_data *data;
int i, ret;
 
-   if (!context || !ares) {
-   ldb_set_errstring(ldb, "NULL Context or Result in callback");
-   goto error;
-   }
-
ac = talloc_get_type(context, struct kludge_acl_context);
data = talloc_get_type(ac->module->private_data, struct 
kludge_private_data);
 
@@ -296,10 +291,6 @@
}
 
return ac->up_callback(ldb, ac->up_context, ares);
-
-error:
-   talloc_free(ares);
-   return LDB_ERR_OPERATIONS_ERROR;
 }
 
 static int kludge_acl_search(struct ldb_module *module, struct ldb_request 
*req)

Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/local_password.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/local_password.c   
2007-08-28 04:35:29 UTC (rev 24730)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/local_password.c   
2007-08-28 05:43:26 UTC (rev 24731)
@@ -355,11 +355,6 @@
 {
struct lpdb_context *ac;
 
-   if (!context || !ares) {
-   ldb_set_errstring(ldb, "NULL Context or Result in callback");
-   return LDB_ERR_OPERATIONS_ERROR;
-   }
-
ac = talloc_get_type(context, struct lpdb_context);
 
/* we are interested only in the single reply (base search) we receive 
here */
@@ -461,11 +456,6 @@
 {
struct lpdb_local_search_context *local_context;
 
-   if (!context || !ares) {
-   ldb_set_errstring(ldb, "NULL Context or Result in callback");
-   return LDB_ERR_OPERATIONS_ERROR;
-   }
-
local_context = talloc_get_type(context, struct 
lpdb_local_search_context);
 
/* we are interested only in the single reply (base search) we receive 
here */
@@ -529,11 +519,6 @@
 {
struct lpdb_context *ac;
 
-   if (!context || !ares) {
-   ldb_set_errstring(ldb, "NULL Context or Result in callback");
-   goto error;
-   }
-
ac = talloc_get_type(context, struct lpdb_context);
 
if (ares->type == LDB_REPLY_ENTRY) {
@@ -610,9 +595,6 @@
} else {
return ac->orig_req->callback(ldb, ac->orig_req->context, ares);
}
-error:
-   talloc_free(ares);
-   return LDB_ERR_OPERATIONS_ERROR;
 }
 
 /* Search for passwords and other attributes.  The passwords are

Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c  
2007-08-28 04:35:29 UTC (rev 24730)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c  
2007-08-28 05:43:26 UTC (rev 24731)
@@ -480,11 +480,6 @@
 {
struct oc_context *ac;
 
-   if (!context || !ares) {
-   ldb_set_errstring(ldb, "NULL Context or Result in callback");
-   return LDB_ERR_OPERATIONS_ERROR;
-   }
-
ac = 

Rev 609: need to remove aio options here too in http://samba.org/~tridge/3_0-ctdb

2007-08-27 Thread tridge

revno: 609
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: s3-ctdb-tridge
timestamp: Tue 2007-08-28 14:53:10 +1000
message:
  need to remove aio options here too
modified:
  source/param/loadparm.cloadparm.c-20070210173807-1wjifrbwaz6xnmgl-768
=== modified file 'source/param/loadparm.c'
--- a/source/param/loadparm.c   2007-08-27 02:51:20 +
+++ b/source/param/loadparm.c   2007-08-28 04:53:10 +
@@ -2144,8 +2144,6 @@
 FN_LOCAL_INTEGER(lp_block_size, iBlock_size)
 FN_LOCAL_INTEGER(lp_dfree_cache_time, iDfreeCacheTime)
 FN_LOCAL_INTEGER(lp_allocation_roundup_size, iallocation_roundup_size)
-FN_LOCAL_INTEGER(lp_aio_read_size, iAioReadSize)
-FN_LOCAL_INTEGER(lp_aio_write_size, iAioWriteSize)
 FN_LOCAL_INTEGER(lp_map_readonly, iMap_readonly)
 FN_LOCAL_CHAR(lp_magicchar, magic_char)
 FN_GLOBAL_INTEGER(lp_winbind_cache_time, &Globals.winbind_cache_time)



svn commit: samba r24730 - in branches/SAMBA_4_0/source/auth/credentials: .

2007-08-27 Thread abartlet
Author: abartlet
Date: 2007-08-28 04:35:29 + (Tue, 28 Aug 2007)
New Revision: 24730

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

Log:
Allow secrets entries to be for service principals.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/auth/credentials/credentials_files.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_files.c
===
--- branches/SAMBA_4_0/source/auth/credentials/credentials_files.c  
2007-08-28 04:28:02 UTC (rev 24729)
+++ branches/SAMBA_4_0/source/auth/credentials/credentials_files.c  
2007-08-28 04:35:29 UTC (rev 24730)
@@ -188,6 +188,7 @@
"saltPrincipal",
"privateKeytab",
"krb5Keytab",
+   "servicePrincipalName",
NULL
};

@@ -246,12 +247,16 @@
machine_account = ldb_msg_find_attr_as_string(msgs[0], 
"samAccountName", NULL);
 
if (!machine_account) {
-   DEBUG(1, ("Could not find 'samAccountName' in join record to 
domain: %s: filter: '%s' base: '%s'\n",
- cli_credentials_get_domain(cred), filter, base));
-   /* set anonymous as the fallback, if the machine account won't 
work */
-   cli_credentials_set_anonymous(cred);
-   talloc_free(mem_ctx);
-   return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
+   machine_account = ldb_msg_find_attr_as_string(msgs[0], 
"servicePrincipalName", NULL);
+   
+   if (!machine_account) {
+   DEBUG(1, ("Could not find 'samAccountName' in join 
record to domain: %s: filter: '%s' base: '%s'\n",
+ cli_credentials_get_domain(cred), filter, 
base));
+   /* set anonymous as the fallback, if the machine 
account won't work */
+   cli_credentials_set_anonymous(cred);
+   talloc_free(mem_ctx);
+   return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
+   }
}
 
salt_principal = ldb_msg_find_attr_as_string(msgs[0], "saltPrincipal", 
NULL);



svn commit: samba r24729 - in branches/SAMBA_4_0/source: scripting/libjs setup

2007-08-27 Thread abartlet
Author: abartlet
Date: 2007-08-28 04:28:02 + (Tue, 28 Aug 2007)
New Revision: 24729

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

Log:
First try and publishing a DNS service account, for folks to play with. 

The keytab in dns.keytab should (I hope) do the job.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/scripting/libjs/provision.js
   branches/SAMBA_4_0/source/setup/provision
   branches/SAMBA_4_0/source/setup/provision_users.ldif
   branches/SAMBA_4_0/source/setup/secrets.ldif


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js  2007-08-28 
00:16:58 UTC (rev 24728)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js  2007-08-28 
04:28:02 UTC (rev 24729)
@@ -379,6 +379,7 @@
paths.samdb = lp.get("sam database");
paths.secrets = lp.get("secrets database");
paths.keytab = "secrets.keytab";
+   paths.dns_keytab = "dns.keytab";
paths.dns = lp.get("private dir") + "/" + dnsdomain + ".zone";
paths.named_conf = lp.get("private dir") + "/named.conf";
paths.winsdb = "wins.ldb";
@@ -469,6 +470,7 @@
 
subobj.SAM_LDB  = "tdb://" + paths.samdb;
subobj.SECRETS_KEYTAB   = paths.keytab;
+   subobj.DNS_KEYTAB   = paths.dns_keytab;
 
subobj.LDAPDIR = paths.ldapdir;
var ldap_path_list = split("/", paths.ldapdir);
@@ -891,6 +893,7 @@
subobj.POLICYGUID   = randguid();
subobj.KRBTGTPASS   = randpass(12);
subobj.MACHINEPASS  = randpass(12);
+   subobj.DNSPASS  = randpass(12);
subobj.ADMINPASS= randpass(12);
subobj.LDAPMANAGERPASS = randpass(12);
subobj.DEFAULTSITE  = "Default-First-Site-Name";

Modified: branches/SAMBA_4_0/source/setup/provision
===
--- branches/SAMBA_4_0/source/setup/provision   2007-08-28 00:16:58 UTC (rev 
24728)
+++ branches/SAMBA_4_0/source/setup/provision   2007-08-28 04:28:02 UTC (rev 
24729)
@@ -24,6 +24,7 @@
'adminpass=s',
'krbtgtpass=s',
'machinepass=s',
+   'dnspass=s',
'root=s',
'nobody=s',
'nogroup=s',

Modified: branches/SAMBA_4_0/source/setup/provision_users.ldif
===
--- branches/SAMBA_4_0/source/setup/provision_users.ldif2007-08-28 
00:16:58 UTC (rev 24728)
+++ branches/SAMBA_4_0/source/setup/provision_users.ldif2007-08-28 
04:28:02 UTC (rev 24729)
@@ -205,6 +205,22 @@
 isCriticalSystemObject: TRUE
 sambaPassword: ${KRBTGTPASS}
 
+dn: CN=dns,CN=Users,${DOMAINDN}
+objectClass: top
+objectClass: person
+objectClass: organizationalPerson
+objectClass: user
+cn: dns
+description: DNS Service Account
+showInAdvancedViewOnly: TRUE
+userAccountControl: 514
+accountExpires: 9223372036854775807
+sAMAccountName: dns
+sAMAccountType: 805306368
+servicePrincipalName: DNS/${DNSDOMAIN}
+isCriticalSystemObject: TRUE
+sambaPassword: ${DNSPASS}
+
 dn: CN=Domain Computers,CN=Users,${DOMAINDN}
 objectClass: top
 objectClass: group

Modified: branches/SAMBA_4_0/source/setup/secrets.ldif
===
--- branches/SAMBA_4_0/source/setup/secrets.ldif2007-08-28 00:16:58 UTC 
(rev 24728)
+++ branches/SAMBA_4_0/source/setup/secrets.ldif2007-08-28 04:28:02 UTC 
(rev 24729)
@@ -38,3 +38,17 @@
 servicePrincipalName: kadmin/changepw
 krb5Keytab: HDB:ldb:${SAM_LDB}:
 #The trailing : here is a HACK, but it matches the Heimdal format. 
+
+# A hook from our credentials system into HDB, as we must be on a KDC,
+# we can look directly into the database.
+dn: servicePrincipalName=DNS/${DNSDOMAIN},CN=Principals
+objectClass: top
+objectClass: secret
+objectClass: kerberosSecret
+realm: ${REALM}
+whenCreated: ${LDAPTIME}
+whenChanged: ${LDAPTIME}
+servicePrincipalName: DNS/${DNSDOMAIN}
+privateKeytab: ${DNS_KEYTAB}
+secret: ${DNSPASS}
+



svn commit: samba r24728 - in branches/SAMBA_4_0: . source/torture source/torture/basic source/torture/ldap source/torture/libnet source/torture/nbench source/torture/nbt source/torture/raw source/tor

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-28 00:16:58 + (Tue, 28 Aug 2007)
New Revision: 24728

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

Log:
Use more stock torture functions.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/torture/basic/misc.c
   branches/SAMBA_4_0/source/torture/ldap/cldapbench.c
   branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c
   branches/SAMBA_4_0/source/torture/libnet/libnet_domain.c
   branches/SAMBA_4_0/source/torture/nbench/nbench.c
   branches/SAMBA_4_0/source/torture/nbt/browse.c
   branches/SAMBA_4_0/source/torture/raw/close.c
   branches/SAMBA_4_0/source/torture/raw/openbench.c
   branches/SAMBA_4_0/source/torture/raw/samba3misc.c
   branches/SAMBA_4_0/source/torture/rpc/handles.c
   branches/SAMBA_4_0/source/torture/rpc/join.c
   branches/SAMBA_4_0/source/torture/rpc/samsync.c
   branches/SAMBA_4_0/source/torture/rpc/schannel.c
   branches/SAMBA_4_0/source/torture/smbtorture.c
   branches/SAMBA_4_0/source/torture/ui.c
   branches/SAMBA_4_0/source/torture/ui.h
   branches/SAMBA_4_0/source/torture/unix/unix_info2.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/torture/basic/misc.c
===
--- branches/SAMBA_4_0/source/torture/basic/misc.c  2007-08-27 22:18:16 UTC 
(rev 24727)
+++ branches/SAMBA_4_0/source/torture/basic/misc.c  2007-08-28 00:16:58 UTC 
(rev 24728)
@@ -556,7 +556,7 @@
union smb_write wr;

/* randomize between writes and reads*/
-   if ( random() % state->lp_params->writeratio == 0) {
+   if (random() % state->lp_params->writeratio == 0) {
torture_comment(tctx, "Callback WRITE file:%d (%d/%d)\n",
state->nr,state->completed,torture_numops);
wr.generic.level = RAW_WRITE_WRITEX  ;

Modified: branches/SAMBA_4_0/source/torture/ldap/cldapbench.c
===
--- branches/SAMBA_4_0/source/torture/ldap/cldapbench.c 2007-08-27 22:18:16 UTC 
(rev 24727)
+++ branches/SAMBA_4_0/source/torture/ldap/cldapbench.c 2007-08-28 00:16:58 UTC 
(rev 24728)
@@ -48,17 +48,17 @@
 /*
   benchmark cldap calls
 */
-static BOOL bench_cldap(TALLOC_CTX *mem_ctx, const char *address)
+static bool bench_cldap(struct torture_context *tctx, const char *address)
 {
-   struct cldap_socket *cldap = cldap_socket_init(mem_ctx, NULL);
+   struct cldap_socket *cldap = cldap_socket_init(tctx, NULL);
int num_sent=0;
struct timeval tv = timeval_current();
BOOL ret = True;
-   int timelimit = lp_parm_int(-1, "torture", "timelimit", 10);
+   int timelimit = torture_setting_int(tctx, "timelimit", 10);
struct cldap_netlogon search;
struct bench_state *state;
 
-   state = talloc_zero(mem_ctx, struct bench_state);
+   state = talloc_zero(tctx, struct bench_state);
 
ZERO_STRUCT(search);
search.in.dest_address = address;
@@ -75,7 +75,7 @@
req->async.fn = request_handler;
num_sent++;
if (num_sent % 50 == 0) {
-   if (lp_parm_bool(-1, "torture", "progress", 
true)) {
+   if (torture_setting_bool(tctx, "progress", 
true)) {
printf("%.1f queries per second (%d 
failures)  \r", 
   state->pass_count / 
timeval_elapsed(&tv),
   state->fail_count);
@@ -104,28 +104,24 @@
   benchmark how fast a CLDAP server can respond to a series of parallel
   requests 
 */
-BOOL torture_bench_cldap(struct torture_context *torture)
+bool torture_bench_cldap(struct torture_context *torture)
 {
const char *address;
struct nbt_name name;
-   TALLOC_CTX *mem_ctx = talloc_new(NULL);
NTSTATUS status;
-   BOOL ret = True;
+   bool ret = true;

make_nbt_name_server(&name, torture_setting_string(torture, "host", 
NULL));
 
/* do an initial name resolution to find its IP */
-   status = resolve_name(&name, mem_ctx, &address, 
event_context_find(mem_ctx));
+   status = resolve_name(&name, torture, &address, 
event_context_find(torture));
if (!NT_STATUS_IS_OK(status)) {
printf("Failed to resolve %s - %s\n",
   name.name, nt_errstr(status));
-   talloc_free(mem_ctx);
-   return False;
+   return false;
}
 
-   ret &= bench_cldap(mem_ctx, address);
+   ret &= bench_cldap(torture, address);
 
-   talloc_free(mem_ctx);
-
return ret;
 }

Modified: branches/SAMBA_4_0/source/torture/li

Build status as of Tue Aug 28 00:00:01 2007

2007-08-27 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-08-27 
00:01:09.0 +
+++ /home/build/master/cache/broken_results.txt 2007-08-28 00:00:49.0 
+
@@ -1,24 +1,24 @@
-Build status as of Mon Aug 27 00:00:02 2007
+Build status as of Tue Aug 28 00:00:01 2007
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   31 9  0 
+ccache   30 9  0 
 ctdb 0  0  0 
 distcc   2  0  0 
-ldb  30 5  0 
-libreplace   29 8  0 
-lorikeet-heimdal 26 14 0 
-pidl 17 3  0 
-ppp  13 9  0 
+ldb  29 4  0 
+libreplace   28 8  0 
+lorikeet-heimdal 25 12 0 
+pidl 16 3  0 
+ppp  11 9  0 
 python   0  0  0 
-rsync31 10 0 
+rsync30 11 0 
 samba-docs   0  0  0 
-samba-gtk3  3  0 
-samba4   27 19 4 
-samba_3_232 19 0 
-smb-build28 28 0 
-talloc   31 1  0 
+samba-gtk2  2  0 
+samba4   27 16 1 
+samba_3_231 19 0 
+smb-build27 27 0 
+talloc   30 1  0 
 tdb  29 4  0 
 


svn commit: samba r24727 - in branches/SAMBA_4_0: . source/rpc_server/winreg

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 22:18:16 + (Mon, 27 Aug 2007)
New Revision: 24727

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

Log:
Initialize variable.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c
===
--- branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c2007-08-27 
22:01:58 UTC (rev 24726)
+++ branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c2007-08-27 
22:18:16 UTC (rev 24727)
@@ -367,7 +367,7 @@
struct dcesrv_handle *h;
struct registry_key *k;
WERROR ret;
-   const char *classname;
+   const char *classname = NULL;
 
DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
 



svn commit: samba r24726 - in branches/SAMBA_4_0: . source source/lib/registry source/lib/registry/tests source/rpc_server/winreg

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 22:01:58 + (Mon, 27 Aug 2007)
New Revision: 24726

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

Log:
Add tests for getting/setting security descriptors (still failing at the moment)
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/registry/interface.c
   branches/SAMBA_4_0/source/lib/registry/registry.h
   branches/SAMBA_4_0/source/lib/registry/tests/registry.c
   branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c
   branches/SAMBA_4_0/source/samba4-knownfail


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/registry/interface.c
===
--- branches/SAMBA_4_0/source/lib/registry/interface.c  2007-08-27 21:24:44 UTC 
(rev 24725)
+++ branches/SAMBA_4_0/source/lib/registry/interface.c  2007-08-27 22:01:58 UTC 
(rev 24726)
@@ -275,3 +275,28 @@
 
return key->context->ops->flush_key(key);
 }
+
+_PUBLIC_ WERROR reg_get_security(TALLOC_CTX *mem_ctx, 
+const struct 
registry_key *key, 
+struct 
security_descriptor **security)
+{
+   if (key == NULL)
+   return WERR_INVALID_PARAM;
+   
+   if (key->context->ops->get_security == NULL)
+   return WERR_NOT_SUPPORTED;
+
+   return key->context->ops->get_security(mem_ctx, key, security);
+}
+
+_PUBLIC_ WERROR reg_set_security(struct registry_key *key, 
+struct 
security_descriptor *security)
+{
+   if (key == NULL)
+   return WERR_INVALID_PARAM;
+   
+   if (key->context->ops->set_security == NULL)
+   return WERR_NOT_SUPPORTED;
+
+   return key->context->ops->set_security(key, security);
+}

Modified: branches/SAMBA_4_0/source/lib/registry/registry.h
===
--- branches/SAMBA_4_0/source/lib/registry/registry.h   2007-08-27 21:24:44 UTC 
(rev 24725)
+++ branches/SAMBA_4_0/source/lib/registry/registry.h   2007-08-27 22:01:58 UTC 
(rev 24726)
@@ -269,6 +269,12 @@
 
struct hive_key *hive, 
 
uint32_t predef_key,

 const char **elements);
+WERROR reg_get_security(TALLOC_CTX *mem_ctx, 
+const struct 
registry_key *key, 
+struct 
security_descriptor **security);
 
+WERROR reg_set_security(struct registry_key *key, 
+struct 
security_descriptor *security);
 
+
 #endif /* _REGISTRY_H */

Modified: branches/SAMBA_4_0/source/lib/registry/tests/registry.c
===
--- branches/SAMBA_4_0/source/lib/registry/tests/registry.c 2007-08-27 
21:24:44 UTC (rev 24725)
+++ branches/SAMBA_4_0/source/lib/registry/tests/registry.c 2007-08-27 
22:01:58 UTC (rev 24726)
@@ -25,6 +25,7 @@
 #include "lib/cmdline/popt_common.h"
 #include "torture/torture.h"
 #include "librpc/gen_ndr/winreg.h"
+#include "libcli/security/security.h"
 #include "system/filesys.h"
 
 NTSTATUS torture_temp_dir(struct torture_context *tctx, const char *prefix, 
@@ -366,6 +367,40 @@
 }
 
 /**
+ * Test getting/setting security descriptors
+ */
+static bool test_security(struct torture_context *tctx, const void *_data)
+{
+   const struct registry_context *rctx = _data;
+   struct registry_key *subkey = NULL, *root;
+   WERROR error;
+   uint32_t data = 42;
+   struct security_descriptor *osd, *nsd;
+
+   if (!create_test_key(tctx, rctx, "Düsseldorf", &root, &subkey))
+   return false;
+
+   osd = security_descriptor_create(tctx,
+   NULL, NULL,
+   SID_NT_AUTHENTICATED_USERS,
+   SEC_ACE_TYPE_ACCESS_ALLOWED,
+   SEC_GENERIC_ALL,
+   SEC_ACE_FLAG_OBJECT_INHERIT,
+   NULL);
+
+   error = reg_set_security(subkey, osd);
+   torture_assert_werr_ok(tctx, error, "setting security");
+
+   error = reg_get_security(tctx, subkey, &nsd);
+   torture_assert_werr_ok (tctx, error, "setting security");
+
+   torture_assert(tctx, security_descriptor_equal(osd, nsd), 
+  "secu

svn commit: samba r24725 - in branches/SAMBA_4_0: . source/lib/registry/tools

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 21:24:44 + (Mon, 27 Aug 2007)
New Revision: 24725

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

Log:
Don't segfault if hive file can't be found
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/registry/tools/regshell.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/registry/tools/regshell.c
===
--- branches/SAMBA_4_0/source/lib/registry/tools/regshell.c 2007-08-27 
21:19:34 UTC (rev 24724)
+++ branches/SAMBA_4_0/source/lib/registry/tools/regshell.c 2007-08-27 
21:24:44 UTC (rev 24725)
@@ -481,6 +481,8 @@
ctx->registry = reg_common_open_remote(remote, 
cmdline_credentials);
} else if (file != NULL) {
ctx->current = reg_common_open_file(file, cmdline_credentials);
+   if (ctx->current == NULL)
+   return 1;
ctx->registry = ctx->current->context;
ctx->path = talloc_strdup(ctx, "");
} else {



svn commit: samba r24724 - in branches/SAMBA_4_0: . source/script

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 21:19:34 + (Mon, 27 Aug 2007)
New Revision: 24724

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

Log:
Also install the .reg files for provisioning from an installed version.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/script/installmisc.sh


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/script/installmisc.sh
===
--- branches/SAMBA_4_0/source/script/installmisc.sh 2007-08-27 21:17:29 UTC 
(rev 24723)
+++ branches/SAMBA_4_0/source/script/installmisc.sh 2007-08-27 21:19:34 UTC 
(rev 24724)
@@ -18,6 +18,7 @@
 cp setup/DB_CONFIG $SETUPDIR || exit 1
 cp setup/*.inf $SETUPDIR || exit 1
 cp setup/*.ldif $SETUPDIR || exit 1
+cp setup/*.reg $SETUPDIR || exit 1
 cp setup/*.zone $SETUPDIR || exit 1
 cp setup/*.conf $SETUPDIR || exit 1
 



svn commit: samba r24723 - in branches/SAMBA_4_0: . source source/lib/registry

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 21:17:29 + (Mon, 27 Aug 2007)
New Revision: 24723

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

Log:
Install the right headers for use by samba-gtk.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/headermap.txt
   branches/SAMBA_4_0/source/lib/registry/config.mk
   branches/SAMBA_4_0/source/lib/registry/hive.h
   branches/SAMBA_4_0/source/lib/registry/patchfile.h
   branches/SAMBA_4_0/source/lib/registry/registry.h


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/headermap.txt
===
--- branches/SAMBA_4_0/source/headermap.txt 2007-08-27 20:09:37 UTC (rev 
24722)
+++ branches/SAMBA_4_0/source/headermap.txt 2007-08-27 21:17:29 UTC (rev 
24723)
@@ -32,7 +32,9 @@
 gtk/common/gtk-smb.h: gtk-smb.h
 gtk/common/select.h: gtk/select.h
 librpc/ndr/libndr.h: ndr.h
-lib/registry/registry.h: registry.h
+lib/registry/registry.h: registry/registry.h
+lib/registry/hive.h: registry/hive.h
+lib/registry/patchfile.h: registry/patchfile.h
 libcli/util/nterr.h: core/nterr.h
 libcli/util/doserr.h: core/doserr.h
 libcli/util/nt_status.h: core/ntstatus.h

Modified: branches/SAMBA_4_0/source/lib/registry/config.mk
===
--- branches/SAMBA_4_0/source/lib/registry/config.mk2007-08-27 20:09:37 UTC 
(rev 24722)
+++ branches/SAMBA_4_0/source/lib/registry/config.mk2007-08-27 21:17:29 UTC 
(rev 24723)
@@ -36,7 +36,7 @@
 PUBLIC_DEPENDENCIES = \
LIBSAMBA-UTIL CHARSET TDR_REGF LIBLDB \
RPC_NDR_WINREG
-PUBLIC_HEADERS = registry.h
+PUBLIC_HEADERS = registry.h hive.h patchfile.h
 # End MODULE registry_ldb
 
 

Modified: branches/SAMBA_4_0/source/lib/registry/hive.h
===
--- branches/SAMBA_4_0/source/lib/registry/hive.h   2007-08-27 20:09:37 UTC 
(rev 24722)
+++ branches/SAMBA_4_0/source/lib/registry/hive.h   2007-08-27 21:17:29 UTC 
(rev 24723)
@@ -150,8 +150,8 @@
 WERROR hive_key_add_name(TALLOC_CTX *ctx, const struct hive_key *parent_key,
 const char *name, const char 
*classname, struct security_descriptor *desc,
 struct hive_key **key);
-_PUBLIC_ WERROR hive_key_del(const struct hive_key *key, const char *name);
-_PUBLIC_ WERROR hive_get_key_by_name(TALLOC_CTX *mem_ctx,
+WERROR hive_key_del(const struct hive_key *key, const char *name);
+WERROR hive_get_key_by_name(TALLOC_CTX *mem_ctx,
   const struct 
hive_key *key, const char *name, 
   struct hive_key 
**subkey);
 WERROR hive_enum_key(TALLOC_CTX *mem_ctx,

Modified: branches/SAMBA_4_0/source/lib/registry/patchfile.h
===
--- branches/SAMBA_4_0/source/lib/registry/patchfile.h  2007-08-27 20:09:37 UTC 
(rev 24722)
+++ branches/SAMBA_4_0/source/lib/registry/patchfile.h  2007-08-27 21:17:29 UTC 
(rev 24723)
@@ -34,16 +34,16 @@
WERROR (*done) (void *callback_data);
 };
 
-_PUBLIC_ WERROR reg_diff_apply (const char *filename, 
+WERROR reg_diff_apply (const char *filename, 
struct 
registry_context *ctx);
 
-_PUBLIC_ WERROR reg_generate_diff(struct registry_context *ctx1, 
+WERROR reg_generate_diff(struct registry_context *ctx1, 
  struct registry_context *ctx2, 
  const struct reg_diff_callbacks *callbacks,
  void *callback_data);
-_PUBLIC_ WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename, 
+WERROR reg_dotreg_diff_save(TALLOC_CTX *ctx, const char *filename, 
struct reg_diff_callbacks **callbacks, void 
**callback_data);
-_PUBLIC_ WERROR reg_generate_diff_key(struct registry_key *oldkey, 
+WERROR reg_generate_diff_key(struct registry_key *oldkey, 
struct registry_key *newkey,
const char *path,
const struct reg_diff_callbacks *callbacks,

Modified: branches/SAMBA_4_0/source/lib/registry/registry.h
===
--- branches/SAMBA_4_0/source/lib/registry/registry.h   2007-08-27 20:09:37 UTC 
(rev 24722)
+++ branches/SAMBA_4_0/source/lib/registry/registry.h   2007-08-27 21:17:29 UTC 
(rev 24723)
@@ -165,19 +165,15 @@
 struct auth_session_info;
 struct event_context;
 
-#ifndef _PUBLIC_
-#define _

svn commit: samba r24722 - in branches/SAMBA_3_2/source/nsswitch: .

2007-08-27 Thread jerry
Author: jerry
Date: 2007-08-27 20:09:37 + (Mon, 27 Aug 2007)
New Revision: 24722

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

Log:
Squashed commit of the following:

commit fb52f971986dd298abbcd9745ddf702820ce0184
Author: Gerald Carter <[EMAIL PROTECTED]>
Date:   Mon Aug 27 13:50:26 2007 -0500

Check correct return type for pam_winbind_request_log() 
wnibind_upn_to_username

which is an int and not NSS_STATUS.

commit 7382edf6fc0fe555df89d5b2a94d12b35049b279
Author: Gerald Carter <[EMAIL PROTECTED]>
Date:   Mon Aug 27 13:30:26 2007 -0500

Allow wbinfo -n to convert a UPN to a SID

commit 8266c0fe1ccf2141e5a983f3213356419e626dda
Author: Gerald Carter <[EMAIL PROTECTED]>
Date:   Fri Aug 3 09:53:16 2007 -0500

Merge some of Guenther UPN work for pam_winbind.c (check the winbind 
separator

and better pam logging when converting a upn to a username).

commit 15156c17bc81dbcadf32757015c4e5158823bf3f
Author: Gerald Carter <[EMAIL PROTECTED]>
Date:   Fri Aug 3 08:52:50 2007 -0500

Include Universal groups from the cached PAC/SamLogon info when

generating the list of domain group SIDs for a user's token.

commit 979053c0307b051954261d539445102c55f309c7
Author: Gerald Carter <[EMAIL PROTECTED]>
Date:   Thu Aug 2 17:35:41 2007 -0500

merge upnlogon patch from my tree

Modified:
   branches/SAMBA_3_2/source/nsswitch/pam_winbind.c
   branches/SAMBA_3_2/source/nsswitch/wbinfo.c
   branches/SAMBA_3_2/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_2/source/nsswitch/winbindd_util.c


Changeset:
Modified: branches/SAMBA_3_2/source/nsswitch/pam_winbind.c
===
--- branches/SAMBA_3_2/source/nsswitch/pam_winbind.c2007-08-27 19:47:23 UTC 
(rev 24721)
+++ branches/SAMBA_3_2/source/nsswitch/pam_winbind.c2007-08-27 20:09:37 UTC 
(rev 24722)
@@ -1614,6 +1614,89 @@
return ret;
 }
 
+/**
+ * Retrieve the winbind separator.
+ *
+ * @param pamh PAM handle
+ * @param ctrl PAM winbind options.
+ *
+ * @return string separator character. NULL on failure.
+ */
+
+static char winbind_get_separator(pam_handle_t *pamh, int ctrl)
+{
+   struct winbindd_request request;
+   struct winbindd_response response;
+
+   ZERO_STRUCT(request);
+   ZERO_STRUCT(response);
+
+   if (pam_winbind_request_log(pamh, ctrl, WINBINDD_INFO, &request, 
&response, NULL)) {
+   return '\0';
+   }
+
+   return response.data.info.winbind_separator;
+}
+
+/**
+ * Convert a upn to a name.
+ *
+ * @param pamh PAM handle
+ * @param ctrl PAM winbind options.
+ * @param upn  USer UPN to be trabslated.
+ *
+ * @return converted name. NULL pointer on failure. Caller needs to free.
+ */
+
+static char* winbind_upn_to_username(pam_handle_t *pamh, int ctrl, const char 
*upn)
+{
+   struct winbindd_request req;
+   struct winbindd_response resp;
+   int retval; 
+   char *account_name; 
+   int account_name_len;
+   char sep;   
+
+   /* This cannot work when the winbind separator = @ */
+
+   sep = winbind_get_separator(pamh, ctrl);
+   if (!sep || sep == '@') {
+   return NULL;
+   }
+   
+   /* Convert the UPN to a SID */
+
+   ZERO_STRUCT(req);
+   ZERO_STRUCT(resp);
+
+   strncpy(req.data.name.dom_name, "",
+   sizeof(req.data.name.dom_name) - 1);
+   strncpy(req.data.name.name, upn,
+   sizeof(req.data.name.name) - 1);
+   retval = pam_winbind_request_log(pamh, ctrl, WINBINDD_LOOKUPNAME, 
+&req, &resp, upn);
+   if ( retval != PAM_SUCCESS ) {  
+   return NULL;
+   }
+   
+   /* Convert the the SID back to the sAMAccountName */
+   
+   ZERO_STRUCT(req);
+   strncpy(req.data.sid, resp.data.sid.sid, sizeof(req.data.sid)-1);
+   ZERO_STRUCT(resp);
+   retval =  pam_winbind_request_log(pamh, ctrl, WINBINDD_LOOKUPSID, 
+ &req, &resp, upn);
+   if ( retval != PAM_SUCCESS ) {  
+   return NULL;
+   }
+   
+   account_name_len = asprintf(&account_name, "%s\\%s", 
+   resp.data.name.dom_name,
+   resp.data.name.name);
+
+   return account_name;
+}
+
 PAM_EXTERN
 int pam_sm_authenticate(pam_handle_t *pamh, int flags,
int argc, const char **argv)
@@ -1646,6 +1729,7 @@
goto out;
}
 
+
 #if defined(AIX)
/* Decode the user name since AIX does not support logn user
   names by default.  The name is encoded as _#uid.  */
@@ -1670,6 +1754,19 @@
}
}   
 
+   /* Maybe this was a UPN */
+
+   if (strchr(real_username, '@') != NULL) {
+   char *samaccountname = NULL;
+   
+   samaccountname = winbind_upn_to_usern

svn commit: samba r24721 - in branches/SAMBA_4_0: . source/pidl/lib/Parse/Pidl/Samba4/NDR

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 19:47:23 + (Mon, 27 Aug 2007)
New Revision: 24721

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

Log:
Avoid True and False because they are only available within Samba.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2007-08-27 19:16:37 UTC (rev 24720)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm  
2007-08-27 19:47:23 UTC (rev 24721)
@@ -2290,11 +2290,11 @@
$self->pidl("\t\t(ndr_push_flags_fn_t) ndr_push_$d->{NAME},");
$self->pidl("\t\t(ndr_pull_flags_fn_t) ndr_pull_$d->{NAME},");
$self->pidl("\t\t(ndr_print_function_t) ndr_print_$d->{NAME},");
-   $self->pidl("\t\t".($d->{ASYNC}?"True":"False").",");
+   $self->pidl("\t\t".($d->{ASYNC}?"true":"false").",");
$self->pidl("\t},");
$count++;
}
-   $self->pidl("\t{ NULL, 0, NULL, NULL, NULL, False }");
+   $self->pidl("\t{ NULL, 0, NULL, NULL, NULL, false }");
$self->pidl("};");
$self->pidl("");
 

Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm  
2007-08-27 19:16:37 UTC (rev 24720)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm  
2007-08-27 19:47:23 UTC (rev 24721)
@@ -232,20 +232,20 @@
if (dcesrv_$name\_interface.syntax_id.if_version == if_version &&
GUID_equal(\&dcesrv\_$name\_interface.syntax_id.uuid, uuid)) {
memcpy(iface,&dcesrv\_$name\_interface, sizeof(*iface));
-   return True;
+   return true;
}
 
-   return False;
+   return false;
 }
 
 static bool $name\__op_interface_by_name(struct dcesrv_interface *iface, const 
char *name)
 {
if (strcmp(dcesrv_$name\_interface.name, name)==0) {
memcpy(iface, &dcesrv_$name\_interface, sizeof(*iface));
-   return True;
+   return true;
}
 
-   return False;   
+   return false;   
 }

 NTSTATUS dcerpc_server_$name\_init(void)



svn commit: samba r24720 - in branches/SAMBA_3_2_0/source/smbd: .

2007-08-27 Thread jra
Author: jra
Date: 2007-08-27 19:16:37 + (Mon, 27 Aug 2007)
New Revision: 24720

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

Log:
Resolve differences in 3.2 and 3.2.0. 3.2 version
was correct.
Jeremy.

Modified:
   branches/SAMBA_3_2_0/source/smbd/sesssetup.c


Changeset:
Modified: branches/SAMBA_3_2_0/source/smbd/sesssetup.c
===
--- branches/SAMBA_3_2_0/source/smbd/sesssetup.c2007-08-27 19:02:53 UTC 
(rev 24719)
+++ branches/SAMBA_3_2_0/source/smbd/sesssetup.c2007-08-27 19:16:37 UTC 
(rev 24720)
@@ -574,7 +574,7 @@
SAFE_FREE(client);
 
reply_outbuf(req, 4, 0);
-   SSVAL(req->outbuf,smb_uid,vuid);
+   SSVAL(req->outbuf,smb_uid,sess_vuid);
 
if (sess_vuid == UID_FIELD_INVALID ) {
ret = NT_STATUS_LOGON_FAILURE;
@@ -1735,6 +1735,7 @@
if (sess_vuid == UID_FIELD_INVALID) {
data_blob_free(&nt_resp);
data_blob_free(&lm_resp);
+   data_blob_free(&session_key);
reply_nterror(req, nt_status_squash(
  NT_STATUS_LOGON_FAILURE));
END_PROFILE(SMBsesssetupX);



svn commit: samba r24719 - in branches/SAMBA_3_0_25/source/nsswitch: .

2007-08-27 Thread jra
Author: jra
Date: 2007-08-27 19:02:53 + (Mon, 27 Aug 2007)
New Revision: 24719

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

Log:
Janitor for Guenther.
"Fix confusing indent."
Jeremy.

Modified:
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_cache.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_cache.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_cache.c  2007-08-27 
18:56:46 UTC (rev 24718)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_cache.c  2007-08-27 
19:02:53 UTC (rev 24719)
@@ -1133,14 +1133,15 @@
domain->name ));
 
status = domain->backend->query_user_list(domain, mem_ctx, 
num_entries, info);
-   if (!NT_STATUS_IS_OK(status))
+   if (!NT_STATUS_IS_OK(status)) {
DEBUG(3, ("query_user_list: returned 0x%08x, "
  "retrying\n", NT_STATUS_V(status)));
-   if (NT_STATUS_EQUAL(status, NT_STATUS_UNSUCCESSFUL)) {
-   DEBUG(3, ("query_user_list: flushing "
- "connection cache\n"));
-   invalidate_cm_connection(&domain->conn);
-   }
+   }
+   if (NT_STATUS_EQUAL(status, NT_STATUS_UNSUCCESSFUL)) {
+   DEBUG(3, ("query_user_list: flushing "
+ "connection cache\n"));
+   invalidate_cm_connection(&domain->conn);
+   }
 
} while (NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_UNSUCCESSFUL) && 
 (retry++ < 5));



svn commit: samba r24718 - in branches/SAMBA_4_0: . source/lib/registry source/lib/registry/tests

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 18:56:46 + (Mon, 27 Aug 2007)
New Revision: 24718

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

Log:
Fix some compiler warnings.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/registry/rpc.c
   branches/SAMBA_4_0/source/lib/registry/tests/diff.c
   branches/SAMBA_4_0/source/lib/registry/tests/registry.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/registry/rpc.c
===
--- branches/SAMBA_4_0/source/lib/registry/rpc.c2007-08-27 18:43:18 UTC 
(rev 24717)
+++ branches/SAMBA_4_0/source/lib/registry/rpc.c2007-08-27 18:56:46 UTC 
(rev 24718)
@@ -90,7 +90,7 @@
 
 static WERROR rpc_query_key(const struct registry_key *k);
 
-static WERROR rpc_get_predefined_key(struct registry_context *ctx, 
+static WERROR rpc_get_predefined_key(const struct registry_context *ctx, 
 
uint32_t hkey_type, 
 struct 
registry_key **k)
 {
@@ -336,7 +336,8 @@
 static WERROR rpc_get_info(TALLOC_CTX *mem_ctx, const struct registry_key *key,
   const char **classname, 
   uint32_t *numsubkeys,
-  uint32_t *numvalue)
+  uint32_t *numvalue,
+  NTTIME *last_changed_time)
 {
struct rpc_key *mykeydata = talloc_get_type(key, struct rpc_key);
WERROR error;
@@ -347,8 +348,14 @@
}

/* FIXME: *classname = talloc_strdup(mem_ctx, mykeydata->classname); */
-   *numvalue = mykeydata->num_values;
-   *numsubkeys = mykeydata->num_subkeys;
+   /* FIXME: *last_changed_time = mykeydata->last_changed_time */
+
+   if (numvalue != NULL)
+   *numvalue = mykeydata->num_values;
+
+   if (numsubkeys != NULL)
+   *numsubkeys = mykeydata->num_subkeys;
+
return WERR_OK;
 }
 
@@ -360,6 +367,7 @@
.create_key = rpc_add_key,
.delete_key = rpc_del_key,
.get_key_info = rpc_get_info,
+   .get_predefined_key = rpc_get_predefined_key,
 };
 
 _PUBLIC_ WERROR reg_open_remote(struct registry_context **ctx, 
@@ -394,6 +402,7 @@
}
 
*ctx = (struct registry_context *)rctx;
+   (*ctx)->ops = ®_backend_rpc;
 
return WERR_OK;
 }

Modified: branches/SAMBA_4_0/source/lib/registry/tests/diff.c
===
--- branches/SAMBA_4_0/source/lib/registry/tests/diff.c 2007-08-27 18:43:18 UTC 
(rev 24717)
+++ branches/SAMBA_4_0/source/lib/registry/tests/diff.c 2007-08-27 18:56:46 UTC 
(rev 24718)
@@ -45,9 +45,7 @@
 
 static bool test_diff_apply(struct torture_context *test)
 {
-   /*
-_PUBLIC_ WERROR reg_diff_apply (const char *filename, struct registry_context 
*ctx)
-   */
+   /* _PUBLIC_ WERROR reg_diff_apply (const char *filename, struct 
registry_context *ctx) */
 
return true;
 }

Modified: branches/SAMBA_4_0/source/lib/registry/tests/registry.c
===
--- branches/SAMBA_4_0/source/lib/registry/tests/registry.c 2007-08-27 
18:43:18 UTC (rev 24717)
+++ branches/SAMBA_4_0/source/lib/registry/tests/registry.c 2007-08-27 
18:56:46 UTC (rev 24718)
@@ -87,7 +87,7 @@
struct registry_key *root;
WERROR error;
 
-   error = reg_get_predefined_key_by_name(tctx, "BLA", &root);
+   error = reg_get_predefined_key_by_name(rctx, "BLA", &root);
torture_assert_werr_equal(tctx, error, WERR_BADFILE,
   "getting predefined key 
failed");
return true;



svn commit: samba r24717 - in branches/SAMBA_4_0: . source/lib/charset source/lib/messaging source/lib/policy source/lib/registry source/pidl/lib/Parse/Pidl/Samba4/NDR

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 18:43:18 + (Mon, 27 Aug 2007)
New Revision: 24717

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

Log:
Some more easy bool conversions, update TODO for registry

Removed:
   branches/SAMBA_4_0/BRANCH.TODO
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/charset/iconv.c
   branches/SAMBA_4_0/source/lib/charset/util_unistr.c
   branches/SAMBA_4_0/source/lib/messaging/messaging.c
   branches/SAMBA_4_0/source/lib/policy/dumpadm.c
   branches/SAMBA_4_0/source/lib/registry/TODO
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Deleted: branches/SAMBA_4_0/BRANCH.TODO
===
--- branches/SAMBA_4_0/BRANCH.TODO  2007-08-27 18:33:08 UTC (rev 24716)
+++ branches/SAMBA_4_0/BRANCH.TODO  2007-08-27 18:43:18 UTC (rev 24717)
@@ -1,5 +0,0 @@
-The following things still need to be fixed before this branch 
-can be merged:
-- RPC-WINREG
-- tests for diff functionality
-- test for classname and last_mod_time being kept

Modified: branches/SAMBA_4_0/source/lib/charset/iconv.c
===
--- branches/SAMBA_4_0/source/lib/charset/iconv.c   2007-08-27 18:33:08 UTC 
(rev 24716)
+++ branches/SAMBA_4_0/source/lib/charset/iconv.c   2007-08-27 18:43:18 UTC 
(rev 24717)
@@ -199,7 +199,7 @@
}
 
 #ifdef HAVE_NATIVE_ICONV
-   if ((!from || !to) && !lp_parm_bool(-1, "iconv", "native", True)) {
+   if ((!from || !to) && !lp_parm_bool(-1, "iconv", "native", true)) {
goto failed;
}
if (!from) {

Modified: branches/SAMBA_4_0/source/lib/charset/util_unistr.c
===
--- branches/SAMBA_4_0/source/lib/charset/util_unistr.c 2007-08-27 18:33:08 UTC 
(rev 24716)
+++ branches/SAMBA_4_0/source/lib/charset/util_unistr.c 2007-08-27 18:43:18 UTC 
(rev 24717)
@@ -167,7 +167,7 @@
size_t len=1;
 
if (!ptr)
-   return(False);
+   return false;
 
s = *ptr;
 
@@ -180,11 +180,11 @@
s++;

/* nothing left? */
-   if (! *s)
-   return(False);
+   if (!*s)
+   return false;

/* copy over the token */
-   for (quoted = False; len < bufsize && *s && (quoted || 
!strchr_m(sep,*s)); s++) {
+   for (quoted = false; len < bufsize && *s && (quoted || 
!strchr_m(sep,*s)); s++) {
if (*s == '\"') {
quoted = !quoted;
} else {
@@ -196,7 +196,7 @@
*ptr = (*s) ? s+1 : s;  
*buff = 0;

-   return(True);
+   return true;
 }
 
 /**
@@ -259,9 +259,9 @@
 _PUBLIC_ bool strcsequal_w(const char *s1,const char *s2)
 {
if (s1 == s2)
-   return(True);
+   return true;
if (!s1 || !s2)
-   return(False);
+   return false;

return strcmp(s1,s2) == 0;
 }
@@ -442,11 +442,11 @@
t = toupper_w(s);
 
if (s != t) {
-   return True; /* that means it has lower case chars */
+   return true; /* that means it has lower case chars */
}
}
 
-   return False;
+   return false;
 } 
 
 /**
@@ -465,11 +465,11 @@
t = tolower_w(s);
 
if (s != t) {
-   return True; /* that means it has upper case chars */
+   return true; /* that means it has upper case chars */
}
}
 
-   return False;
+   return false;
 } 
 
 /**

Modified: branches/SAMBA_4_0/source/lib/messaging/messaging.c
===
--- branches/SAMBA_4_0/source/lib/messaging/messaging.c 2007-08-27 18:33:08 UTC 
(rev 24716)
+++ branches/SAMBA_4_0/source/lib/messaging/messaging.c 2007-08-27 18:43:18 UTC 
(rev 24717)
@@ -588,7 +588,7 @@
}
 
/* it needs to be non blocking for sends */
-   set_blocking(socket_get_fd(msg->sock), False);
+   set_blocking(socket_get_fd(msg->sock), false);
 
msg->event.ev   = talloc_reference(msg, ev);
msg->event.fde  = event_add_fd(ev, msg, socket_get_fd(msg->sock), 
@@ -676,7 +676,7 @@
} else {
talloc_steal(irpc, m);
}
-   irpc->done = True;
+   irpc->done = true;
if (irpc->async.fn) {
irpc->async.fn(irpc);
}
@@ -752,7 +752,7 @@
 
/* make the call */
m->private = i->private;
-   m->defer_reply = False;
+   m->defer_reply = false;
m->msg_ctx = msg_ctx;
m->irpc= 

svn commit: samba r24716 - in branches/SAMBA_3_0_25/source/nsswitch: .

2007-08-27 Thread jra
Author: jra
Date: 2007-08-27 18:33:08 + (Mon, 27 Aug 2007)
New Revision: 24716

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

Log:
Janitor for Guenther :-).
"Fix obvious error in enum_dom_groups. We were returning NT_STATUS_OK when the 
realloc failed."
Jeremy.

Modified:
   branches/SAMBA_3_0_25/source/nsswitch/winbindd_rpc.c


Changeset:
Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd_rpc.c
===
--- branches/SAMBA_3_0_25/source/nsswitch/winbindd_rpc.c2007-08-27 
18:32:51 UTC (rev 24715)
+++ branches/SAMBA_3_0_25/source/nsswitch/winbindd_rpc.c2007-08-27 
18:33:08 UTC (rev 24716)
@@ -168,8 +168,7 @@
   (*num_entries) + count);
if (! *info) {
talloc_destroy(mem_ctx2);
-   status = NT_STATUS_NO_MEMORY;
-   break;
+   return NT_STATUS_NO_MEMORY;
}
 
memcpy(&(*info)[*num_entries], info2, count*sizeof(*info2));



svn commit: samba r24715 - in branches/SAMBA_4_0: . source/include

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 18:32:51 + (Mon, 27 Aug 2007)
New Revision: 24715

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

Log:
Mark fstring and pstring as deprecated.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/include/pstring.h


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/include/pstring.h
===
--- branches/SAMBA_4_0/source/include/pstring.h 2007-08-27 18:26:40 UTC (rev 
24714)
+++ branches/SAMBA_4_0/source/include/pstring.h 2007-08-27 18:32:51 UTC (rev 
24715)
@@ -30,11 +30,11 @@
 #define PSTRING_LEN 1024
 #define FSTRING_LEN 256
 
-typedef char pstring[PSTRING_LEN];
-typedef char fstring[FSTRING_LEN];
+_DEPRECATED_ typedef char pstring[PSTRING_LEN];
+_DEPRECATED_ typedef char fstring[FSTRING_LEN];
 
-#define pstrcpy(d,s) safe_strcpy((d), (s),sizeof(pstring)-1)
-#define pstrcat(d,s) safe_strcat((d), (s),sizeof(pstring)-1)
+#define pstrcpy(d,s) safe_strcpy((d),(s),sizeof(pstring)-1)
+#define pstrcat(d,s) safe_strcat((d),(s),sizeof(pstring)-1)
 #define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1)
 #define fstrcat(d,s) safe_strcat((d),(s),sizeof(fstring)-1)
 



svn commit: samba r24714 - in branches: SAMBA_3_2/source/nsswitch SAMBA_3_2_0/source/nsswitch

2007-08-27 Thread gd
Author: gd
Date: 2007-08-27 18:26:40 + (Mon, 27 Aug 2007)
New Revision: 24714

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

Log:
Fix confusing indent.

Guenther

Modified:
   branches/SAMBA_3_2/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_2_0/source/nsswitch/winbindd_cache.c


Changeset:
Modified: branches/SAMBA_3_2/source/nsswitch/winbindd_cache.c
===
--- branches/SAMBA_3_2/source/nsswitch/winbindd_cache.c 2007-08-27 18:12:29 UTC 
(rev 24713)
+++ branches/SAMBA_3_2/source/nsswitch/winbindd_cache.c 2007-08-27 18:26:40 UTC 
(rev 24714)
@@ -1144,14 +1144,15 @@
domain->name ));
 
status = domain->backend->query_user_list(domain, mem_ctx, 
num_entries, info);
-   if (!NT_STATUS_IS_OK(status))
+   if (!NT_STATUS_IS_OK(status)) {
DEBUG(3, ("query_user_list: returned 0x%08x, "
  "retrying\n", NT_STATUS_V(status)));
-   if (NT_STATUS_EQUAL(status, NT_STATUS_UNSUCCESSFUL)) {
-   DEBUG(3, ("query_user_list: flushing "
- "connection cache\n"));
-   invalidate_cm_connection(&domain->conn);
-   }
+   }
+   if (NT_STATUS_EQUAL(status, NT_STATUS_UNSUCCESSFUL)) {
+   DEBUG(3, ("query_user_list: flushing "
+ "connection cache\n"));
+   invalidate_cm_connection(&domain->conn);
+   }
 
} while (NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_UNSUCCESSFUL) && 
 (retry++ < 5));

Modified: branches/SAMBA_3_2_0/source/nsswitch/winbindd_cache.c
===
--- branches/SAMBA_3_2_0/source/nsswitch/winbindd_cache.c   2007-08-27 
18:12:29 UTC (rev 24713)
+++ branches/SAMBA_3_2_0/source/nsswitch/winbindd_cache.c   2007-08-27 
18:26:40 UTC (rev 24714)
@@ -1144,14 +1144,15 @@
domain->name ));
 
status = domain->backend->query_user_list(domain, mem_ctx, 
num_entries, info);
-   if (!NT_STATUS_IS_OK(status))
+   if (!NT_STATUS_IS_OK(status)) {
DEBUG(3, ("query_user_list: returned 0x%08x, "
  "retrying\n", NT_STATUS_V(status)));
-   if (NT_STATUS_EQUAL(status, NT_STATUS_UNSUCCESSFUL)) {
-   DEBUG(3, ("query_user_list: flushing "
- "connection cache\n"));
-   invalidate_cm_connection(&domain->conn);
-   }
+   }
+   if (NT_STATUS_EQUAL(status, NT_STATUS_UNSUCCESSFUL)) {
+   DEBUG(3, ("query_user_list: flushing "
+ "connection cache\n"));
+   invalidate_cm_connection(&domain->conn);
+   }
 
} while (NT_STATUS_V(status) == NT_STATUS_V(NT_STATUS_UNSUCCESSFUL) && 
 (retry++ < 5));



svn commit: samba r24713 - in branches: SAMBA_3_2/source/nsswitch SAMBA_3_2_0/source/nsswitch

2007-08-27 Thread gd
Author: gd
Date: 2007-08-27 18:12:29 + (Mon, 27 Aug 2007)
New Revision: 24713

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

Log:
Fix obvious error in enum_dom_groups. We were returning NT_STATUS_OK when the 
realloc failed.

Guenther

Modified:
   branches/SAMBA_3_2/source/nsswitch/winbindd_rpc.c
   branches/SAMBA_3_2_0/source/nsswitch/winbindd_rpc.c


Changeset:
Modified: branches/SAMBA_3_2/source/nsswitch/winbindd_rpc.c
===
--- branches/SAMBA_3_2/source/nsswitch/winbindd_rpc.c   2007-08-27 18:10:19 UTC 
(rev 24712)
+++ branches/SAMBA_3_2/source/nsswitch/winbindd_rpc.c   2007-08-27 18:12:29 UTC 
(rev 24713)
@@ -172,8 +172,7 @@
   (*num_entries) + count);
if (! *info) {
talloc_destroy(mem_ctx2);
-   status = NT_STATUS_NO_MEMORY;
-   break;
+   return NT_STATUS_NO_MEMORY;
}
 
memcpy(&(*info)[*num_entries], info2, count*sizeof(*info2));

Modified: branches/SAMBA_3_2_0/source/nsswitch/winbindd_rpc.c
===
--- branches/SAMBA_3_2_0/source/nsswitch/winbindd_rpc.c 2007-08-27 18:10:19 UTC 
(rev 24712)
+++ branches/SAMBA_3_2_0/source/nsswitch/winbindd_rpc.c 2007-08-27 18:12:29 UTC 
(rev 24713)
@@ -172,8 +172,7 @@
   (*num_entries) + count);
if (! *info) {
talloc_destroy(mem_ctx2);
-   status = NT_STATUS_NO_MEMORY;
-   break;
+   return NT_STATUS_NO_MEMORY;
}
 
memcpy(&(*info)[*num_entries], info2, count*sizeof(*info2));



svn commit: samba r24712 - in branches/SAMBA_4_0: . source/auth source/auth/credentials source/auth/gensec source/auth/kerberos source/auth/ntlmssp source/client source/cluster/ctdb/include source/dsd

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 18:10:19 + (Mon, 27 Aug 2007)
New Revision: 24712

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

Log:
No longer expose the 'BOOL' data type in any interfaces.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/auth/auth.h
   branches/SAMBA_4_0/source/auth/credentials/credentials.h
   branches/SAMBA_4_0/source/auth/gensec/gensec.h
   branches/SAMBA_4_0/source/auth/gensec/schannel.h
   branches/SAMBA_4_0/source/auth/kerberos/kerberos.h
   branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.h
   branches/SAMBA_4_0/source/client/cifsdd.h
   branches/SAMBA_4_0/source/cluster/ctdb/include/includes.h
   branches/SAMBA_4_0/source/dsdb/schema/schema.h
   branches/SAMBA_4_0/source/include/core.h
   branches/SAMBA_4_0/source/include/includes.h
   branches/SAMBA_4_0/source/kdc/kdc.h
   branches/SAMBA_4_0/source/ldap_server/ldap_server.h
   branches/SAMBA_4_0/source/lib/charset/iconv.c
   branches/SAMBA_4_0/source/lib/charset/util_unistr.c
   branches/SAMBA_4_0/source/lib/messaging/irpc.h
   branches/SAMBA_4_0/source/lib/registry/registry.h
   branches/SAMBA_4_0/source/lib/registry/util.c
   branches/SAMBA_4_0/source/lib/samba3/smbpasswd.c
   branches/SAMBA_4_0/source/lib/samba3/tdbsam.c
   branches/SAMBA_4_0/source/lib/socket/socket.h
   branches/SAMBA_4_0/source/lib/tls/tls.h
   branches/SAMBA_4_0/source/libcli/cldap/cldap.h
   branches/SAMBA_4_0/source/libcli/composite/composite.h
   branches/SAMBA_4_0/source/libcli/ldap/ldap.h
   branches/SAMBA_4_0/source/libcli/ldap/ldap_client.h
   branches/SAMBA_4_0/source/libcli/nbt/libnbt.h
   branches/SAMBA_4_0/source/libcli/raw/interfaces.h
   branches/SAMBA_4_0/source/libcli/raw/libcliraw.h
   branches/SAMBA_4_0/source/libcli/raw/signing.h
   branches/SAMBA_4_0/source/libcli/smb2/smb2.h
   branches/SAMBA_4_0/source/libcli/smb_composite/smb_composite.h
   branches/SAMBA_4_0/source/libcli/util/asn_1.h
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.h
   branches/SAMBA_4_0/source/libnet/libnet_join.h
   branches/SAMBA_4_0/source/librpc/ndr/libndr.h
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h
   branches/SAMBA_4_0/source/nbt_server/wins/winsdb.h
   branches/SAMBA_4_0/source/nsswitch/winbindd_nss.h
   branches/SAMBA_4_0/source/ntvfs/common/opendb.h
   branches/SAMBA_4_0/source/ntvfs/ntvfs.h
   branches/SAMBA_4_0/source/ntvfs/posix/vfs_posix.h
   branches/SAMBA_4_0/source/param/loadparm.h
   branches/SAMBA_4_0/source/param/share.h
   branches/SAMBA_4_0/source/rpc_server/dcerpc_server.h
   branches/SAMBA_4_0/source/script/mkproto.pl
   branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.h
   branches/SAMBA_4_0/source/smb_server/smb_server.h
   branches/SAMBA_4_0/source/smbd/service_stream.h
   branches/SAMBA_4_0/source/web_server/web_server.h
   branches/SAMBA_4_0/source/winbind/wb_server.h
   branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.h
   branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h


Changeset:
Sorry, the patch is too large (1460 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24712


svn commit: samba r24711 - in branches: SAMBA_3_2/source/nsswitch SAMBA_3_2_0/source/nsswitch

2007-08-27 Thread gd
Author: gd
Date: 2007-08-27 18:07:49 + (Mon, 27 Aug 2007)
New Revision: 24711

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

Log:
Remove unused talloc context from query_user_list rpc.

Guenther

Modified:
   branches/SAMBA_3_2/source/nsswitch/winbindd_rpc.c
   branches/SAMBA_3_2_0/source/nsswitch/winbindd_rpc.c


Changeset:
Modified: branches/SAMBA_3_2/source/nsswitch/winbindd_rpc.c
===
--- branches/SAMBA_3_2/source/nsswitch/winbindd_rpc.c   2007-08-27 17:21:16 UTC 
(rev 24710)
+++ branches/SAMBA_3_2/source/nsswitch/winbindd_rpc.c   2007-08-27 18:07:49 UTC 
(rev 24711)
@@ -61,7 +61,6 @@
loop_count = 0;
 
do {
-   TALLOC_CTX *ctx2;
uint32 num_dom_users, j;
uint32 max_entries, max_size;
SAM_DISPINFO_CTR ctr;
@@ -70,9 +69,6 @@
ZERO_STRUCT( ctr );
ZERO_STRUCT( info1 );
ctr.sam.info1 = &info1;
-   
-   if (!(ctx2 = talloc_init("winbindd enum_users")))
-   return NT_STATUS_NO_MEMORY;
 
/* this next bit is copied from net_user_list_internal() */
 
@@ -93,7 +89,6 @@
 *num_entries);
 
if (!(*info)) {
-   talloc_destroy(ctx2);
return NT_STATUS_NO_MEMORY;
}
 
@@ -122,8 +117,6 @@
DOMAIN_GROUP_RID_USERS);
}
 
-   talloc_destroy(ctx2);
-
} while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES));
 
return result;

Modified: branches/SAMBA_3_2_0/source/nsswitch/winbindd_rpc.c
===
--- branches/SAMBA_3_2_0/source/nsswitch/winbindd_rpc.c 2007-08-27 17:21:16 UTC 
(rev 24710)
+++ branches/SAMBA_3_2_0/source/nsswitch/winbindd_rpc.c 2007-08-27 18:07:49 UTC 
(rev 24711)
@@ -61,7 +61,6 @@
loop_count = 0;
 
do {
-   TALLOC_CTX *ctx2;
uint32 num_dom_users, j;
uint32 max_entries, max_size;
SAM_DISPINFO_CTR ctr;
@@ -70,9 +69,6 @@
ZERO_STRUCT( ctr );
ZERO_STRUCT( info1 );
ctr.sam.info1 = &info1;
-   
-   if (!(ctx2 = talloc_init("winbindd enum_users")))
-   return NT_STATUS_NO_MEMORY;
 
/* this next bit is copied from net_user_list_internal() */
 
@@ -93,7 +89,6 @@
 *num_entries);
 
if (!(*info)) {
-   talloc_destroy(ctx2);
return NT_STATUS_NO_MEMORY;
}
 
@@ -122,8 +117,6 @@
DOMAIN_GROUP_RID_USERS);
}
 
-   talloc_destroy(ctx2);
-
} while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES));
 
return result;



Re: svn commit: samba r24699 - in branches: SAMBA_3_2/source/smbd SAMBA_3_2_0/source/smbd

2007-08-27 Thread Jeremy Allison
On Mon, Aug 27, 2007 at 11:01:14AM +, [EMAIL PROTECTED] wrote:
> Author: vlendec
> Date: 2007-08-27 11:01:13 + (Mon, 27 Aug 2007)
> New Revision: 24699
> 
> WebSVN: 
> http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24699
> 
> Log:
> Actually write 24 zeros instead of zero 24's...
> 
> Jeremy, please check ;-)

No need, obvious fix :-)


svn commit: samba r24710 - in branches/SAMBA_4_0: . source/lib/util source/lib/util/tests

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 17:21:16 + (Mon, 27 Aug 2007)
New Revision: 24710

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

Log:
Use standard boolean type for easier use by external users.

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/util/capability.c
   branches/SAMBA_4_0/source/lib/util/debug.c
   branches/SAMBA_4_0/source/lib/util/debug.h
   branches/SAMBA_4_0/source/lib/util/fault.c
   branches/SAMBA_4_0/source/lib/util/genrand.c
   branches/SAMBA_4_0/source/lib/util/module.c
   branches/SAMBA_4_0/source/lib/util/mutex.c
   branches/SAMBA_4_0/source/lib/util/signal.c
   branches/SAMBA_4_0/source/lib/util/tests/strlist.c
   branches/SAMBA_4_0/source/lib/util/time.c
   branches/SAMBA_4_0/source/lib/util/util.c
   branches/SAMBA_4_0/source/lib/util/util_file.c
   branches/SAMBA_4_0/source/lib/util/util_str.c
   branches/SAMBA_4_0/source/lib/util/util_strlist.c
   branches/SAMBA_4_0/source/lib/util/util_tdb.c


Changeset:
Sorry, the patch is too large (1035 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24710


svn commit: samba r24709 - in branches/SAMBA_4_0: . source/script source/selftest

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 16:27:23 + (Mon, 27 Aug 2007)
New Revision: 24709

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

Log:
Convert perl test harness output to subunit for nicer display.
Added:
   branches/SAMBA_4_0/source/script/harness2subunit.pl
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/selftest/test_pidl.sh


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Added: branches/SAMBA_4_0/source/script/harness2subunit.pl
===
--- branches/SAMBA_4_0/source/script/harness2subunit.pl 2007-08-27 15:15:38 UTC 
(rev 24708)
+++ branches/SAMBA_4_0/source/script/harness2subunit.pl 2007-08-27 16:27:23 UTC 
(rev 24709)
@@ -0,0 +1,28 @@
+#!/usr/bin/perl
+
+my $firstline = 1;
+
+while() {
+   if ($firstline) {
+   $firstline = 0;
+   next;
+   }
+   if (/^not ok (\d+) - (.*)$/) {
+   print "test: $2\n";
+   print "failure: $2\n";
+   } elsif (/^ok (\d+) - (.*)$/) {
+   print "test: $2\n";
+   print "success: $2\n";
+   } elsif (/^ok (\d+)$/) {
+   print "test: $1\n";
+   print "success: $1\n";
+   } elsif (/^ok (\d+) # skip (.*)$/) {
+   print "test: $1\n";
+   print "skip: $1 [\n$2\n]\n";
+   } elsif (/^not ok (\d+)$/) {
+   print "test: $1\n";
+   print "failure: $1\n";
+   } else {
+   print;
+   }
+}


Property changes on: branches/SAMBA_4_0/source/script/harness2subunit.pl
___
Name: svn:executable
   + *

Modified: branches/SAMBA_4_0/source/selftest/test_pidl.sh
===
--- branches/SAMBA_4_0/source/selftest/test_pidl.sh 2007-08-27 15:15:38 UTC 
(rev 24708)
+++ branches/SAMBA_4_0/source/selftest/test_pidl.sh 2007-08-27 16:27:23 UTC 
(rev 24709)
@@ -11,7 +11,7 @@
echo "Skipping pidl tests - PIDL_TESTS_SKIP=yes"
 elif $PERL -e 'eval require Test::More;' > /dev/null 2>&1; then
   for f in pidl/tests/*.pl; do
- plantest "$f" none $PERL $f
+ plantest "$f" none $PERL $f "|" ./script/harness2subunit.pl
   done
 else 
echo "Skipping pidl tests - Test::More not installed"



svn commit: samba r24708 - in branches/SAMBA_4_0: . source/selftest

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 15:15:38 + (Mon, 27 Aug 2007)
New Revision: 24708

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

Log:
Move subunit code to a separate module.
Added:
   branches/SAMBA_4_0/source/selftest/Subunit.pm
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/selftest/selftest.pl


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Added: branches/SAMBA_4_0/source/selftest/Subunit.pm
===
--- branches/SAMBA_4_0/source/selftest/Subunit.pm   2007-08-27 14:38:13 UTC 
(rev 24707)
+++ branches/SAMBA_4_0/source/selftest/Subunit.pm   2007-08-27 15:15:38 UTC 
(rev 24708)
@@ -0,0 +1,74 @@
+package Subunit;
+
+require Exporter;
[EMAIL PROTECTED] = qw(Exporter);
[EMAIL PROTECTED] = qw(parse_results);
+
+use strict;
+
+sub parse_results($)
+{
+   my ($msg_ops, $msg_state, $statistics, $fh, $expecting_failure) = @_;
+   my $expected_ret = 1;
+   my $open_tests = {};
+
+   while(<$fh>) {
+   if (/^test: (.+)\n/) {
+   $msg_ops->control_msg($msg_state, $_);
+   $open_tests->{$1} = 1;
+   $msg_ops->start_test($msg_state, $1);
+   } elsif (/^(success|failure|skip|error): (.*?)( \[)?([ 
\t]*)\n/) {
+   $msg_ops->control_msg($msg_state, $_);
+   my $reason = undef;
+   if ($3) {
+   $reason = "";
+   # reason may be specified in next lines
+   while(<$fh>) {
+   $msg_ops->control_msg($msg_state, $_);
+   if ($_ eq "]\n") { last; } else { 
$reason .= $_; }
+   }
+   }
+   my $result = $1;
+   if ($1 eq "success") {
+   delete $open_tests->{$2};
+   if 
($expecting_failure->("$msg_state->{NAME}/$2")) {
+   $statistics->{TESTS_UNEXPECTED_OK}++;
+   $msg_ops->end_test($msg_state, $2, $1, 
1, $reason);
+   } else {
+   $statistics->{TESTS_EXPECTED_OK}++;
+   $msg_ops->end_test($msg_state, $2, $1, 
0, $reason);
+   }
+   } elsif ($1 eq "failure") {
+   delete $open_tests->{$2};
+   if 
($expecting_failure->("$msg_state->{NAME}/$2")) {
+   $statistics->{TESTS_EXPECTED_FAIL}++;
+   $msg_ops->end_test($msg_state, $2, $1, 
0, $reason);
+   $expected_ret = 0;
+   } else {
+   $statistics->{TESTS_UNEXPECTED_FAIL}++;
+   $msg_ops->end_test($msg_state, $2, $1, 
1, $reason);
+   }
+   } elsif ($1 eq "skip") {
+   $statistics->{TESTS_SKIP}++;
+   delete $open_tests->{$2};
+   $msg_ops->end_test($msg_state, $2, $1, 0, 
$reason);
+   } elsif ($1 eq "error") {
+   $statistics->{TESTS_ERROR}++;
+   delete $open_tests->{$2};
+   $msg_ops->end_test($msg_state, $2, $1, 1, 
$reason);
+   }
+   } else {
+   $msg_ops->output_msg($msg_state, $_);
+   }
+   }
+
+   foreach (keys %$open_tests) {
+   $msg_ops->end_test($msg_state, $_, "error", 1, 
+  "was started but never 
finished!");
+   $statistics->{TESTS_ERROR}++;
+   }
+
+   return $expected_ret;
+}
+
+1;

Modified: branches/SAMBA_4_0/source/selftest/selftest.pl
===
--- branches/SAMBA_4_0/source/selftest/selftest.pl  2007-08-27 14:38:13 UTC 
(rev 24707)
+++ branches/SAMBA_4_0/source/selftest/selftest.pl  2007-08-27 15:15:38 UTC 
(rev 24708)
@@ -114,6 +114,7 @@
 use POSIX;
 use Cwd qw(abs_path);
 use lib "$RealBin";
+use Subunit qw(parse_results);
 use env::Samba3;
 use env::Samba4;
 use env::Windows;
@@ -212,71 +213,6 @@
$state->{PCAP_FILE} = undef;
 }
 
-sub parse_subunit_results()
-{
-   my ($msg_ops, $msg_state, $statistics, $fh) = @_;
-   my $expected_ret = 1;
-  

svn commit: samba r24707 - in branches/SAMBA_4_0: . source/selftest

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 14:38:13 + (Mon, 27 Aug 2007)
New Revision: 24707

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

Log:
Remove some more cruft from the test list generation code.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/selftest/test_cifs.sh
   branches/SAMBA_4_0/source/selftest/test_local.sh
   branches/SAMBA_4_0/source/selftest/test_posix.sh
   branches/SAMBA_4_0/source/selftest/test_quick.sh
   branches/SAMBA_4_0/source/selftest/test_simple.sh
   branches/SAMBA_4_0/source/selftest/test_w2k3_file.sh


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/selftest/test_cifs.sh
===
--- branches/SAMBA_4_0/source/selftest/test_cifs.sh 2007-08-27 14:36:22 UTC 
(rev 24706)
+++ branches/SAMBA_4_0/source/selftest/test_cifs.sh 2007-08-27 14:38:13 UTC 
(rev 24707)
@@ -10,12 +10,8 @@
 
 raw=`bin/smbtorture --list | grep "^RAW-" | xargs`
 base=`bin/smbtorture --list | grep "^BASE-" | xargs`
-tests="$base $raw $smb2"
+tests="$base $raw"
 
 for t in $tests; do
-if [ ! -z "$start" -a "$start" != $t ]; then
-   continue;
-fi
-start=""
 plantest "ntvfs/cifs $t" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS 
$ADDARGS //\$NETBIOSNAME/cifs -U"\$USERNAME"%"\$PASSWORD" $t
 done

Modified: branches/SAMBA_4_0/source/selftest/test_local.sh
===
--- branches/SAMBA_4_0/source/selftest/test_local.sh2007-08-27 14:36:22 UTC 
(rev 24706)
+++ branches/SAMBA_4_0/source/selftest/test_local.sh2007-08-27 14:38:13 UTC 
(rev 24707)
@@ -5,10 +5,6 @@
 incdir=`dirname $0`
 . $incdir/test_functions.sh
 
-# the local tests don't need smbd
-SMBD_TEST_FIFO=""
-export SMBD_TEST_FIFO
-
 for t in $local_tests; do
plantest "$t" none $VALGRIND bin/smbtorture $TORTURE_OPTIONS ncalrpc: 
$t "$*"
 done

Modified: branches/SAMBA_4_0/source/selftest/test_posix.sh
===
--- branches/SAMBA_4_0/source/selftest/test_posix.sh2007-08-27 14:36:22 UTC 
(rev 24706)
+++ branches/SAMBA_4_0/source/selftest/test_posix.sh2007-08-27 14:38:13 UTC 
(rev 24707)
@@ -14,9 +14,5 @@
 tests="$base $raw $smb2"
 
 for t in $tests; do
-if [ ! -z "$start" -a "$start" != $t ]; then
-   continue;
-fi
-start=""
 plantest "$t" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS 
//\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $t
 done

Modified: branches/SAMBA_4_0/source/selftest/test_quick.sh
===
--- branches/SAMBA_4_0/source/selftest/test_quick.sh2007-08-27 14:36:22 UTC 
(rev 24706)
+++ branches/SAMBA_4_0/source/selftest/test_quick.sh2007-08-27 14:38:13 UTC 
(rev 24707)
@@ -14,8 +14,7 @@
 tests="$tests RAW-EAS RAW-STREAMS"
 
 for t in $tests; do
-name="$t"
-plantest "$name" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS 
//\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $t
+plantest "$t" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS 
//\$SERVER/tmp -U"\$USERNAME"%"\$PASSWORD" $t
 done
 
 name=BASE-OPEN

Modified: branches/SAMBA_4_0/source/selftest/test_simple.sh
===
--- branches/SAMBA_4_0/source/selftest/test_simple.sh   2007-08-27 14:36:22 UTC 
(rev 24706)
+++ branches/SAMBA_4_0/source/selftest/test_simple.sh   2007-08-27 14:38:13 UTC 
(rev 24707)
@@ -9,6 +9,5 @@
 tests="BASE-RW1"
 
 for t in $tests; do
-name="$t"
-plantest "$name" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS 
//\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t
+plantest "$t" dc $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS 
//\$SERVER/simple -U"\$USERNAME"%"\$PASSWORD" $t
 done

Modified: branches/SAMBA_4_0/source/selftest/test_w2k3_file.sh
===
--- branches/SAMBA_4_0/source/selftest/test_w2k3_file.sh2007-08-27 
14:36:22 UTC (rev 24706)
+++ branches/SAMBA_4_0/source/selftest/test_w2k3_file.sh2007-08-27 
14:38:13 UTC (rev 24707)
@@ -40,10 +40,5 @@
 echo "Skipping tests expected to fail: $fail"
 
 for t in $tests; do
-if [ ! -z "$start" -a "$start" != $t ]; then
-   continue;
-fi
-start=""
-name="$t"
-testit "$name" smb $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc 
-U"$username"%"$password" $t
+testit "$t" smb $VALGRIND bin/smbtorture $TORTURE_OPTIONS $ADDARGS $unc 
-U"$username"%"$password" $t
 done



svn commit: samba r24706 - in branches/SAMBA_4_0: . source/selftest testprogs/blackbox

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 14:36:22 + (Mon, 27 Aug 2007)
New Revision: 24706

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

Log:
Move nmblookup tests to separate blackbox testsuite.
Added:
   branches/SAMBA_4_0/testprogs/blackbox/test_nmblookup.sh
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/selftest/test_blackbox.sh
   branches/SAMBA_4_0/source/selftest/test_nbt.sh


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/selftest/test_blackbox.sh
===
--- branches/SAMBA_4_0/source/selftest/test_blackbox.sh 2007-08-27 14:06:25 UTC 
(rev 24705)
+++ branches/SAMBA_4_0/source/selftest/test_blackbox.sh 2007-08-27 14:36:22 UTC 
(rev 24706)
@@ -16,6 +16,10 @@
 incdir=`dirname $0`
 . $incdir/test_functions.sh
 
-plantest "blackbox.smbclient" dc 
$incdir/../../testprogs/blackbox/test_smbclient.sh "\$SERVER" "\$USERNAME" 
"\$PASSWORD" "\$DOMAIN" "$PREFIX" "$ADDARGS"
-plantest "blackbox.kinit" dc $incdir/../../testprogs/blackbox/test_kinit.sh 
"\$SERVER" "\$USERNAME" "\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" "$ADDARGS"
-plantest "blackbox.cifsdd" dc $incdir/../../testprogs/blackbox/test_cifsdd.sh 
"\$SERVER" "\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$ADDARGS"
+bbdir=$incdir/../../testprogs/blackbox
+
+plantest "blackbox.smbclient" dc $bbdir/test_smbclient.sh "\$SERVER" 
"\$USERNAME" "\$PASSWORD" "\$DOMAIN" "$PREFIX" "$ADDARGS"
+plantest "blackbox.kinit" dc $bbdir/test_kinit.sh "\$SERVER" "\$USERNAME" 
"\$PASSWORD" "\$REALM" "\$DOMAIN" "$PREFIX" "$ADDARGS"
+plantest "blackbox.cifsdd" dc $bbdir/test_cifsdd.sh "\$SERVER" "\$USERNAME" 
"\$PASSWORD" "\$DOMAIN" "$ADDARGS"
+plantest "blackbox.nmblookup:dc" dc $bbdir/test_nmblookup.sh "\$NETBIOSNAME" 
"\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" $ADDARGS
+plantest "blackbox.nmblookup:member" member $bbdir/test_nmblookup.sh 
"\$NETBIOSNAME" "\$NETBIOSALIAS" "\$SERVER" "\$SERVER_IP" $ADDARGS

Modified: branches/SAMBA_4_0/source/selftest/test_nbt.sh
===
--- branches/SAMBA_4_0/source/selftest/test_nbt.sh  2007-08-27 14:06:25 UTC 
(rev 24705)
+++ branches/SAMBA_4_0/source/selftest/test_nbt.sh  2007-08-27 14:36:22 UTC 
(rev 24706)
@@ -12,13 +12,6 @@
TEST_NBT_ENVNAME="dc"
 fi
 
-plantest "nmblookup -U \$SERVER_IP \$SERVER" $TEST_NBT_ENVNAME bin/nmblookup 
$TORTURE_OPTIONS -U \$SERVER_IP \$SERVER
-plantest "nmblookup -U \$SERVER_IP \$NETBIOSNAME" $TEST_NBT_ENVNAME 
bin/nmblookup $TORTURE_OPTIONS -U \$SERVER_IP \$NETBIOSNAME
-plantest "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" $TEST_NBT_ENVNAME 
bin/nmblookup $TORTURE_OPTIONS -U \$SERVER_IP \$NETBIOSALIAS
-plantest "nmblookup \$SERVER" $TEST_NBT_ENVNAME bin/nmblookup $TORTURE_OPTIONS 
\$SERVER
-plantest "nmblookup \$NETBIOSNAME" $TEST_NBT_ENVNAME bin/nmblookup 
$TORTURE_OPTIONS \$NETBIOSNAME
-plantest "nmblookup \$NETBIOSALIAS" $TEST_NBT_ENVNAME bin/nmblookup 
$TORTURE_OPTIONS \$NETBIOSALIAS
-
 NBT_TESTS=`bin/smbtorture --list | grep "^NBT-" | xargs`
 
 if test x"$TEST_NBT_ENVNAME" = x"dc";then

Added: branches/SAMBA_4_0/testprogs/blackbox/test_nmblookup.sh
===
--- branches/SAMBA_4_0/testprogs/blackbox/test_nmblookup.sh 2007-08-27 
14:06:25 UTC (rev 24705)
+++ branches/SAMBA_4_0/testprogs/blackbox/test_nmblookup.sh 2007-08-27 
14:36:22 UTC (rev 24706)
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Blackbox tests for nmblookup
+
+NETBIOSNAME=$1
+NETBIOSALIAS=$2
+SERVER=$3
+SERVER_IP=$4
+shift 4
+TORTURE_OPTIONS=$*
+
+failed=0
+
+testit() {
+   name="$1"
+   shift
+   cmdline="$*"
+   echo "test: $name"
+   $cmdline
+   status=$?
+   if [ x$status = x0 ]; then
+   echo "success: $name"
+   else
+   echo "failure: $name"
+   failed=`expr $failed + 1`
+   fi
+   return $status
+}
+
+testit "nmblookup -U \$SERVER_IP \$SERVER" bin/nmblookup $TORTURE_OPTIONS -U 
$SERVER_IP $SERVER
+testit "nmblookup -U \$SERVER_IP \$NETBIOSNAME" bin/nmblookup $TORTURE_OPTIONS 
-U $SERVER_IP $NETBIOSNAME
+testit "nmblookup -U \$SERVER_IP \$NETBIOSALIAS" bin/nmblookup 
$TORTURE_OPTIONS -U $SERVER_IP $NETBIOSALIAS
+testit "nmblookup \$SERVER" bin/nmblookup $TORTURE_OPTIONS $SERVER
+testit "nmblookup \$NETBIOSNAME" bin/nmblookup $TORTURE_OPTIONS $NETBIOSNAME
+testit "nmblookup \$NETBIOSALIAS" bin/nmblookup $TORTURE_OPTIONS $NETBIOSALIAS
+
+exit $failed


Property changes on: branches/SAMBA_4_0/testprogs/blackbox/test_nmblookup.sh
___
Name: svn:executable
   + *



svn commit: samba r24705 - in branches/SAMBA_4_0: . source/selftest/output

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 14:06:25 + (Mon, 27 Aug 2007)
New Revision: 24705

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

Log:
Avoid undefined value warnings.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/selftest/output/html.pm


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/selftest/output/html.pm
===
--- branches/SAMBA_4_0/source/selftest/output/html.pm   2007-08-27 13:53:18 UTC 
(rev 24704)
+++ branches/SAMBA_4_0/source/selftest/output/html.pm   2007-08-27 14:06:25 UTC 
(rev 24705)
@@ -283,7 +283,11 @@
print SUMMARY "\n";
print SUMMARY "  $$_[2]\n";
print SUMMARY "  $$_[1]\n";
-   print SUMMARY "  $$_[3]\n";
+   if (defined($$_[3])) {
+   print SUMMARY "  $$_[3]\n";
+   } else {
+   print SUMMARY "  \n";
+   }
print SUMMARY "\n";
}
 



svn commit: samba r24704 - in branches/SAMBA_4_0: . source/lib/registry source/setup

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 13:53:18 + (Mon, 27 Aug 2007)
New Revision: 24704

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

Log:
Fix bug in the registry patch code.. all the more proves this code needs tests.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/registry/patchfile_dotreg.c
   branches/SAMBA_4_0/source/setup/provision.reg


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/registry/patchfile_dotreg.c
===
--- branches/SAMBA_4_0/source/lib/registry/patchfile_dotreg.c   2007-08-27 
13:13:08 UTC (rev 24703)
+++ branches/SAMBA_4_0/source/lib/registry/patchfile_dotreg.c   2007-08-27 
13:53:18 UTC (rev 24704)
@@ -211,7 +211,7 @@
}
 
/* Delete value */
-   if (strcmp(p, "-")) {
+   if (strcmp(p, "-") == 0) {
error = callbacks->del_value(callback_data, curkey, 
line);
if (!W_ERROR_IS_OK(error)) {
DEBUG(0, ("Error deleting value %s in key 
%s\n", line, curkey));

Modified: branches/SAMBA_4_0/source/setup/provision.reg
===
--- branches/SAMBA_4_0/source/setup/provision.reg   2007-08-27 13:13:08 UTC 
(rev 24703)
+++ branches/SAMBA_4_0/source/setup/provision.reg   2007-08-27 13:53:18 UTC 
(rev 24704)
@@ -9,12 +9,20 @@
 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control]
 
 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ProductOptions]
-ProductType="LanmanNT"
+ProductType=LanmanNT
 
 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print]
 
 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server]
 
+[HKEY_LOCAL_MACHINE\System]
+
+[HKEY_LOCAL_MACHINE\System\CurrentControlSet]
+
+[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services]
+
+[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon]
+
 [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netlogon\Parameters]
 RefusePasswordChange=REG_DWORD:0
 



svn commit: samba r24703 - in branches/SAMBA_4_0: . source/lib/registry source/scripting/ejs source/scripting/libjs source/setup

2007-08-27 Thread jelmer
Author: jelmer
Date: 2007-08-27 13:13:08 + (Mon, 27 Aug 2007)
New Revision: 24703

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

Log:
Use standard registry diff files when provisioning rather than 
LDIF files for the registry files.

Added:
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_reg.c
Removed:
   branches/SAMBA_4_0/source/setup/hklm.ldif
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/registry/hive.c
   branches/SAMBA_4_0/source/lib/registry/patchfile.c
   branches/SAMBA_4_0/source/lib/registry/samba.c
   branches/SAMBA_4_0/source/scripting/ejs/config.mk
   branches/SAMBA_4_0/source/scripting/libjs/provision.js
   branches/SAMBA_4_0/source/setup/provision.reg


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/lib/registry/hive.c
===
--- branches/SAMBA_4_0/source/lib/registry/hive.c   2007-08-27 12:04:09 UTC 
(rev 24702)
+++ branches/SAMBA_4_0/source/lib/registry/hive.c   2007-08-27 13:13:08 UTC 
(rev 24703)
@@ -39,6 +39,8 @@
 
fd = open(location, O_RDWR);
if (fd == -1) {
+   if (errno == ENOENT)
+   return WERR_NOT_FOUND;
return WERR_BADFILE;
}
 

Modified: branches/SAMBA_4_0/source/lib/registry/patchfile.c
===
--- branches/SAMBA_4_0/source/lib/registry/patchfile.c  2007-08-27 12:04:09 UTC 
(rev 24702)
+++ branches/SAMBA_4_0/source/lib/registry/patchfile.c  2007-08-27 13:13:08 UTC 
(rev 24703)
@@ -252,7 +252,9 @@
 /**
  * Load diff file
  */
-_PUBLIC_ WERROR reg_diff_load(const char *filename, const struct 
reg_diff_callbacks *callbacks, void *callback_data)
+_PUBLIC_ WERROR reg_diff_load(const char *filename, 
+ const struct 
reg_diff_callbacks *callbacks, 
+ void *callback_data)
 {
int fd;
char hdr[4];

Modified: branches/SAMBA_4_0/source/lib/registry/samba.c
===
--- branches/SAMBA_4_0/source/lib/registry/samba.c  2007-08-27 12:04:09 UTC 
(rev 24702)
+++ branches/SAMBA_4_0/source/lib/registry/samba.c  2007-08-27 13:13:08 UTC 
(rev 24703)
@@ -36,7 +36,12 @@
 
location = talloc_asprintf(ctx, "%s/%s.ldb", lp_private_dir(), name);
 
+
error = reg_open_hive(ctx, location, auth_info, creds, &hive);
+
+   if (W_ERROR_EQUAL(error, WERR_NOT_FOUND))
+   error = reg_open_ldb_file(ctx, location, auth_info, creds, 
&hive);
+
if (!W_ERROR_IS_OK(error))
return error;
 

Modified: branches/SAMBA_4_0/source/scripting/ejs/config.mk
===
--- branches/SAMBA_4_0/source/scripting/ejs/config.mk   2007-08-27 12:04:09 UTC 
(rev 24702)
+++ branches/SAMBA_4_0/source/scripting/ejs/config.mk   2007-08-27 13:13:08 UTC 
(rev 24703)
@@ -17,6 +17,12 @@
 INIT_FUNCTION = smb_setup_ejs_ldb
 PRIVATE_DEPENDENCIES = LIBLDB SAMDB LIBNDR
 
+[MODULE::smbcalls_reg]
+OBJ_FILES = smbcalls_reg.o
+SUBSYSTEM = smbcalls
+INIT_FUNCTION = smb_setup_ejs_reg
+PRIVATE_DEPENDENCIES = registry SAMDB LIBNDR
+
 [MODULE::smbcalls_nbt]
 OBJ_FILES = smbcalls_nbt.o
 SUBSYSTEM = smbcalls

Added: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_reg.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_reg.c  2007-08-27 
12:04:09 UTC (rev 24702)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_reg.c  2007-08-27 
13:13:08 UTC (rev 24703)
@@ -0,0 +1,91 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   provide hooks into smbd C calls from ejs scripts
+
+   Copyright (C) Jelmer Vernooij 2007
+   
+   This program is free software; you can redistribute it and/or modify
+   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 .
+*/
+
+#include "includes.h"
+#include "scripting/ejs/smbcalls.h"
+#include "lib/appweb/ejs/ejs.h"
+#include "db_wrap.h"
+#include "dsdb/samdb/samdb.h"
+#include "librpc/ndr/libndr.h"
+#include "lib/registry/registry.h"
+
+/*
+  get the connected

svn commit: samba r24702 - in branches: SAMBA_3_2/source/smbd SAMBA_3_2_0/source/smbd

2007-08-27 Thread vlendec
Author: vlendec
Date: 2007-08-27 12:04:09 + (Mon, 27 Aug 2007)
New Revision: 24702

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

Log:
Remove the old API pointers

Modified:
   branches/SAMBA_3_2/source/smbd/blocking.c
   branches/SAMBA_3_2/source/smbd/nttrans.c
   branches/SAMBA_3_2/source/smbd/open.c
   branches/SAMBA_3_2/source/smbd/pipes.c
   branches/SAMBA_3_2/source/smbd/process.c
   branches/SAMBA_3_2/source/smbd/reply.c
   branches/SAMBA_3_2/source/smbd/server.c
   branches/SAMBA_3_2/source/smbd/sesssetup.c
   branches/SAMBA_3_2_0/source/smbd/blocking.c
   branches/SAMBA_3_2_0/source/smbd/nttrans.c
   branches/SAMBA_3_2_0/source/smbd/open.c
   branches/SAMBA_3_2_0/source/smbd/pipes.c
   branches/SAMBA_3_2_0/source/smbd/process.c
   branches/SAMBA_3_2_0/source/smbd/reply.c
   branches/SAMBA_3_2_0/source/smbd/server.c
   branches/SAMBA_3_2_0/source/smbd/sesssetup.c


Changeset:
Sorry, the patch is too large (2720 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24702


svn commit: samba r24701 - in branches: SAMBA_3_2/source SAMBA_3_2/source/web SAMBA_3_2_0/source SAMBA_3_2_0/source/web

2007-08-27 Thread vlendec
Author: vlendec
Date: 2007-08-27 11:41:05 + (Mon, 27 Aug 2007)
New Revision: 24701

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

Log:
Fix the swat build

Swat has not been built by default for a while, so I did not notice that
the _ macro is actually used. Re-add the lang_msg_rotate function, this
time only to swat so that this is the only binary that has to take the
16k penalty.

Modified:
   branches/SAMBA_3_2/source/configure.in
   branches/SAMBA_3_2/source/web/statuspage.c
   branches/SAMBA_3_2/source/web/swat.c
   branches/SAMBA_3_2_0/source/configure.in
   branches/SAMBA_3_2_0/source/web/statuspage.c
   branches/SAMBA_3_2_0/source/web/swat.c


Changeset:
Modified: branches/SAMBA_3_2/source/configure.in
===
--- branches/SAMBA_3_2/source/configure.in  2007-08-27 11:17:48 UTC (rev 
24700)
+++ branches/SAMBA_3_2/source/configure.in  2007-08-27 11:41:05 UTC (rev 
24701)
@@ -354,21 +354,23 @@
 
 m4_include(lib/socket_wrapper/config.m4)
 
+SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)'
+SWAT_INSTALL_TARGETS=installswat
 
 AC_ARG_ENABLE(swat,
 [  --enable-swat   Build the SWAT tool (default=yes)],
 [
 case "$enable_swat" in
-   no) ;;
-   *)
-   SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)'
-   SWAT_INSTALL_TARGETS=installswat
+   no)
+   SWAT_SBIN_TARGETS=''
+   SWAT_INSTALL_TARGETS=''
;;
 esac
-AC_SUBST(SWAT_SBIN_TARGETS)
-AC_SUBST(SWAT_INSTALL_TARGETS)
 ])
 
+AC_SUBST(SWAT_SBIN_TARGETS)
+AC_SUBST(SWAT_INSTALL_TARGETS)
+
 #
 # set prefix for 'make test'
 selftest_prefix="./"

Modified: branches/SAMBA_3_2/source/web/statuspage.c
===
--- branches/SAMBA_3_2/source/web/statuspage.c  2007-08-27 11:17:48 UTC (rev 
24700)
+++ branches/SAMBA_3_2/source/web/statuspage.c  2007-08-27 11:41:05 UTC (rev 
24701)
@@ -20,6 +20,8 @@
 #include "includes.h"
 #include "web/swat_proto.h"
 
+#define _(x) lang_msg_rotate(x)
+
 #define PIDMAP struct PidMap
 
 /* how long to wait for start/stops to take effect */

Modified: branches/SAMBA_3_2/source/web/swat.c
===
--- branches/SAMBA_3_2/source/web/swat.c2007-08-27 11:17:48 UTC (rev 
24700)
+++ branches/SAMBA_3_2/source/web/swat.c2007-08-27 11:41:05 UTC (rev 
24701)
@@ -51,6 +51,7 @@
 #define ENABLE_USER_FLAG "enable_user_flag"
 #define RHOST "remote_host"
 
+#define _(x) lang_msg_rotate(x)
 
 /
 /
@@ -1328,7 +1329,31 @@
printf("\n");
 }
 
+/*
+  when the _() translation macro is used there is no obvious place to free
+  the resulting string and there is no easy way to give a static pointer.
+  All we can do is rotate between some static buffers and hope a single 
d_printf()
+  doesn't have more calls to _() than the number of buffers
+*/
 
+const char *lang_msg_rotate(const char *msgid)
+{
+#define NUM_LANG_BUFS 16
+   char *msgstr;
+   static pstring bufs[NUM_LANG_BUFS];
+   static int next;
+
+   msgstr = (char *)lang_msg(msgid);
+   if (!msgstr) return msgid;
+
+   pstrcpy(bufs[next], msgstr);
+   msgstr = bufs[next];
+
+   next = (next+1) % NUM_LANG_BUFS;
+
+   return msgstr;
+}
+
 /**
  * main function for SWAT.
  **/

Modified: branches/SAMBA_3_2_0/source/configure.in
===
--- branches/SAMBA_3_2_0/source/configure.in2007-08-27 11:17:48 UTC (rev 
24700)
+++ branches/SAMBA_3_2_0/source/configure.in2007-08-27 11:41:05 UTC (rev 
24701)
@@ -353,21 +353,23 @@
 
 m4_include(lib/socket_wrapper/config.m4)
 
+SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)'
+SWAT_INSTALL_TARGETS=installswat
 
 AC_ARG_ENABLE(swat,
 [  --enable-swat   Build the SWAT tool (default=yes)],
 [
 case "$enable_swat" in
-   no) ;;
-   *)
-   SWAT_SBIN_TARGETS='bin/swat$(EXEEXT)'
-   SWAT_INSTALL_TARGETS=installswat
+   no)
+   SWAT_SBIN_TARGETS=''
+   SWAT_INSTALL_TARGETS=''
;;
 esac
-AC_SUBST(SWAT_SBIN_TARGETS)
-AC_SUBST(SWAT_INSTALL_TARGETS)
 ])
 
+AC_SUBST(SWAT_SBIN_TARGETS)
+AC_SUBST(SWAT_INSTALL_TARGETS)
+
 #
 # set prefix for 'make test'
 selftest_prefix="./"

Modified: branches/SAMBA_3_2_0/source/web/statuspage.c
===
--- branches/SAMBA_3_2_0/source/web/statuspage.c2007-08-27 11:17:48 UTC 
(rev 24700)
+++ branches/SAMBA_3_2_0/source/web/statuspage.c2007-08-27 11:41:05 UTC 
(rev 24701)
@@ -20,6 +20,8 @@
 #include "includes.h"
 #include "web/swat_proto.h"
 
+#define _(x) lang_msg_

svn commit: samba r24700 - in branches/SAMBA_4_0/source/torture/nbench: .

2007-08-27 Thread tridge
Author: tridge
Date: 2007-08-27 11:17:48 + (Mon, 27 Aug 2007)
New Revision: 24700

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

Log:

added auto-reconnect to BENCH-NBENCH. Used for testing cluster
failover

this is based on a patch from Dmitry Shatrov, with some mods from me

Modified:
   branches/SAMBA_4_0/source/torture/nbench/nbench.c
   branches/SAMBA_4_0/source/torture/nbench/nbio.c


Changeset:
Sorry, the patch is too large (998 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24700


svn commit: samba r24699 - in branches: SAMBA_3_2/source/smbd SAMBA_3_2_0/source/smbd

2007-08-27 Thread vlendec
Author: vlendec
Date: 2007-08-27 11:01:13 + (Mon, 27 Aug 2007)
New Revision: 24699

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

Log:
Actually write 24 zeros instead of zero 24's...

Jeremy, please check ;-)

Modified:
   branches/SAMBA_3_2/source/smbd/trans2.c
   branches/SAMBA_3_2_0/source/smbd/trans2.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/trans2.c
===
--- branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-27 10:16:54 UTC (rev 
24698)
+++ branches/SAMBA_3_2/source/smbd/trans2.c 2007-08-27 11:01:13 UTC (rev 
24699)
@@ -3442,7 +3442,7 @@
 
switch (info_level) {
case SMB_FILE_STANDARD_INFORMATION:
-   memset(pdata,24,0);
+   memset(pdata,0,24);
SOFF_T(pdata,0,4096LL);
SIVAL(pdata,16,1);
SIVAL(pdata,20,1);

Modified: branches/SAMBA_3_2_0/source/smbd/trans2.c
===
--- branches/SAMBA_3_2_0/source/smbd/trans2.c   2007-08-27 10:16:54 UTC (rev 
24698)
+++ branches/SAMBA_3_2_0/source/smbd/trans2.c   2007-08-27 11:01:13 UTC (rev 
24699)
@@ -3385,7 +3385,7 @@
 
switch (info_level) {
case SMB_FILE_STANDARD_INFORMATION:
-   memset(pdata,24,0);
+   memset(pdata,0,24);
SOFF_T(pdata,0,4096LL);
SIVAL(pdata,16,1);
SIVAL(pdata,20,1);



svn commit: samba r24698 - in branches/SAMBA_4_0/source/client: .

2007-08-27 Thread abartlet
Author: abartlet
Date: 2007-08-27 10:16:54 + (Mon, 27 Aug 2007)
New Revision: 24698

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

Log:
Patch from Andrew Kroeger <[EMAIL PROTECTED]> to fix Bug
#4521: smbclient crashes during tab completion when tab hit twice.

The readline magic is beyond me, but this seems to do the trick.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/client/client.c


Changeset:
Modified: branches/SAMBA_4_0/source/client/client.c
===
--- branches/SAMBA_4_0/source/client/client.c   2007-08-27 02:31:51 UTC (rev 
24697)
+++ branches/SAMBA_4_0/source/client/client.c   2007-08-27 10:16:54 UTC (rev 
24698)
@@ -2922,9 +2922,10 @@
return matches;
 
 cleanup:
-   while (i >= 0) {
-   free(matches[i]);
-   i--;
+   count--;
+   while (count >= 0) {
+   free(matches[count]);
+   count--;
}
free(matches);
return NULL;



Rev 596: merge from ronnie in http://samba.org/~tridge/ctdb

2007-08-27 Thread tridge

revno: 596
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell <[EMAIL PROTECTED]>
branch nick: tridge
timestamp: Mon 2007-08-27 18:04:53 +1000
message:
  merge from ronnie
added:
  server/ctdb_serverids.c
ctdb_serverids.c-20070824054041-oco3oebinbft02fl-1
modified:
  Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1
  client/ctdb_client.c   ctdb_client.c-20070411010216-3kd8v37k61steeya-1
  common/cmdline.c   cmdline.c-20070416041216-w1zvz91bkdsgjckw-1
  doc/ctdb.1 ctdb.1-20070609004027-2618fsab2br6vqha-1
  doc/ctdb.1.htmlctdb.1.html-20070609004024-w2r7qblwi5s3iw4a-1
  doc/ctdbd.1ctdbd.1-20070610004249-06awdka4n3gyea3w-1
  doc/ctdbd.1.html   ctdbd.1.html-20070610004253-y2xxgjfgnpsucekc-1
  include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11
  include/ctdb_private.h 
ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13
  server/ctdb_control.c  
ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1
  server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1
  server/eventscript.c   eventscript.c-20070704074533-95f10rsay8um8wrr-1
  tests/ctdb_bench.c ctdb_bench.c-20061219052637-2liagoglohxb6p7s-1
  tests/ctdb_fetch.c ctdb_fetch.c-20070405031748-f7gslozfj3rwh5ie-1
  tests/ctdb_store.c ctdb_store.c-20070617011248-7ze8iaf75dwi0tk0-1
  tools/ctdb.c   
ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1

revno: 432.1.236
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Mon 2007-08-27 17:33:46 +1000
message:
  add an extra debug statement when we send a SIGTERM to a process

revno: 432.1.235
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Mon 2007-08-27 15:03:52 +1000
message:
  make the ctdb shutdown command use the async _send() function to send 
  the shutdown command
  and return success to the caller if the _send() was successful

revno: 432.1.234
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Mon 2007-08-27 10:31:22 +1000
message:
  add async versions of the freeze node control and freeze all nodes in 
  parallell 

revno: 432.1.233
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Mon 2007-08-27 09:40:10 +1000
message:
  change the monitoring of recmode in the recovery daemon to use a fully 
  async eventdriven api for controls

revno: 432.1.232
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Sun 2007-08-26 10:57:02 +1000
message:
  add a control to pull the server id list off a node

revno: 432.1.231
merged: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Ronnie Sahlberg <[EMAIL PROTECTED]>
branch nick: ctdb
timestamp: Fri 2007-08-24 15:53:41 +1000
message:
  add an initial implementation of a service_id structure and three 
  controls to  register/unregister/check a server id.
  
  a server id consists of TYPE:VNN:IDwhere type is specific to the 
  application.  VNN is the node where the serverid was registered and ID 
  might be a node unique identifier such as a pid or similar.
  
  
  Clients can register a server id for themself at the local ctdb daemon.
  When a client dissappears   or when the domain socket connection for the 
  client drops  then any and all server ids registered across that domain 
  socket will also be automatically removed from the store.
  
  clients can register as many server_ids as they want at the same time
  but each TYPE:VNN:ID must be globally unique.
  
  Clients have the option of explicitely unregister a server id by using 
  the UNREGISTER control.
  
  
  Registration and unregistration can only be done by clients to the local 
  daemon. clients can not register their server id to a remote node.
  
  
  clients can check if a server id does exist o