svn commit: samba r9733 - in branches/SAMBA_4_0/source/torture/rpc: .

2005-08-29 Thread abartlet
Author: abartlet
Date: 2005-08-29 12:16:49 + (Mon, 29 Aug 2005)
New Revision: 9733

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

Log:
Test conversion from known sids in CrackNames.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/torture/rpc/drsuapi.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/drsuapi.c
===
--- branches/SAMBA_4_0/source/torture/rpc/drsuapi.c 2005-08-29 07:22:41 UTC 
(rev 9732)
+++ branches/SAMBA_4_0/source/torture/rpc/drsuapi.c 2005-08-29 12:16:49 UTC 
(rev 9733)
@@ -668,6 +668,62 @@
return ret;
}
 
+   r.in.req.req1.format_offered= 
DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY;
+   r.in.req.req1.format_desired= DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+   names[0].str = SID_BUILTIN;
+
+   printf(testing DsCrackNames with SID '%s' desired format:%d\n,
+   names[0].str, r.in.req.req1.format_desired);
+
+   status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, r);
+   if (!NT_STATUS_IS_OK(status)) {
+   const char *errstr = nt_errstr(status);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+   errstr = dcerpc_errstr(mem_ctx, p-last_fault_code);
+   }
+   printf(dcerpc_drsuapi_DsCrackNames failed - %s\n, errstr);
+   ret = False;
+   } else if (!W_ERROR_IS_OK(r.out.result)) {
+   printf(DsCrackNames failed - %s\n, win_errstr(r.out.result));
+   ret = False;
+   } else if (r.out.ctr.ctr1-array[0].status != 
DRSUAPI_DS_NAME_STATUS_OK) {
+   printf(DsCrackNames failed on name - %d\n, 
r.out.ctr.ctr1-array[0].status);
+   ret = False;
+   }
+
+   if (!ret) {
+   return ret;
+   }
+
+
+   r.in.req.req1.format_offered= 
DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY;
+   r.in.req.req1.format_desired= DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+   names[0].str = SID_BUILTIN_ADMINISTRATORS;
+
+   printf(testing DsCrackNames with SID '%s' desired format:%d\n,
+   names[0].str, r.in.req.req1.format_desired);
+
+   status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, r);
+   if (!NT_STATUS_IS_OK(status)) {
+   const char *errstr = nt_errstr(status);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+   errstr = dcerpc_errstr(mem_ctx, p-last_fault_code);
+   }
+   printf(dcerpc_drsuapi_DsCrackNames failed - %s\n, errstr);
+   ret = False;
+   } else if (!W_ERROR_IS_OK(r.out.result)) {
+   printf(DsCrackNames failed - %s\n, win_errstr(r.out.result));
+   ret = False;
+   } else if (r.out.ctr.ctr1-array[0].status != 
DRSUAPI_DS_NAME_STATUS_OK) {
+   printf(DsCrackNames failed on name - %d\n, 
r.out.ctr.ctr1-array[0].status);
+   ret = False;
+   }
+
+   if (!ret) {
+   return ret;
+   }
+
+
/* NEGATIVE test.  This should parse, but not succeed */
r.in.req.req1.format_offered= DRSUAPI_DS_NAME_FORMAT_GUID;
r.in.req.req1.format_desired= DRSUAPI_DS_NAME_FORMAT_FQDN_1779;



svn commit: samba r9734 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal: .

2005-08-29 Thread tpot
Author: tpot
Date: 2005-08-29 12:22:48 + (Mon, 29 Aug 2005)
New Revision: 9734

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

Log:
The ethereal parser generator was generating duplicate functions for
fields in structures with the same name as a structure (i.e
security_ace.object and security_ace_object).  I've twiddled the naming
scheme a bit and things are a bit more unique but there is still may be
some naming conflicts in other IDL files.

We are now getting confused over fields with the same name in unions
(e.g security_ace_object_ctr.object) plus some other union weirdness.

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm
===
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm   
2005-08-29 12:16:49 UTC (rev 9733)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Ethereal/NDR.pm   
2005-08-29 12:22:48 UTC (rev 9734)
@@ -115,7 +115,7 @@
 {
my ($e,$name,$ifname) = @_;
my $valsstring = $ifname\_$name\_vals;
-   my $dissectorname = $ifname\_dissect\_.StripPrefixes($name)._enum;
+   my $dissectorname = $ifname\_dissect\_enum\_.StripPrefixes($name);
 
return if (defined($conformance-{noemit}-{$dissectorname}));
 
@@ -154,7 +154,7 @@
 sub Bitmap($$$)
 {
my ($e,$name,$ifname) = @_;
-   my $dissectorname = $ifname\_dissect\_.StripPrefixes($name)._bitmap;
+   my $dissectorname = $ifname\_dissect\_bitmap\_.StripPrefixes($name);
 
register_ett(ett_$ifname\_$name);
 
@@ -313,7 +313,7 @@
 {
my ($e,$pn,$ifname) = @_;
 
-   my $dissectorname = 
$ifname\_dissect\_.StripPrefixes($pn).\_.StripPrefixes($e-{NAME});
+   my $dissectorname = 
$ifname\_dissect\_element\_.StripPrefixes($pn).\_.StripPrefixes($e-{NAME});
 
my $call_code = offset = $dissectorname(tvb, offset, pinfo, tree, 
drep);;
 
@@ -402,7 +402,7 @@
 sub Struct($$$)
 {
my ($e,$name,$ifname) = @_;
-   my $dissectorname = $ifname\_dissect\_.StripPrefixes($name);
+   my $dissectorname = $ifname\_dissect\_struct\_.StripPrefixes($name);
 
return if (defined($conformance-{noemit}-{$dissectorname}));
 



svn commit: samba r9735 - in branches/SAMBA_4_0: source/lib/samba3 source/scripting/bin source/scripting/ejs source/scripting/libjs source/setup swat/install

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-29 12:31:32 + (Mon, 29 Aug 2005)
New Revision: 9735

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

Log:
More work on generating a valid Samba4 configuration using the 
Samba3 data (both console and SWAT)

Added:
   branches/SAMBA_4_0/source/setup/upgrade
Modified:
   branches/SAMBA_4_0/source/lib/samba3/PLAN
   branches/SAMBA_4_0/source/scripting/bin/samba3dump
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_samba3.c
   branches/SAMBA_4_0/source/scripting/libjs/upgrade.js
   branches/SAMBA_4_0/swat/install/samba3.esp


Changeset:
Sorry, the patch is too large (640 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9735


svn commit: samba r9736 - branches/SAMBA_3_0/source/client trunk/source/client

2005-08-29 Thread gd
Author: gd
Date: 2005-08-29 13:10:20 + (Mon, 29 Aug 2005)
New Revision: 9736

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

Log:
be a little more verbose on error.

Guenther

Modified:
   branches/SAMBA_3_0/source/client/smbspool.c
   trunk/source/client/smbspool.c


Changeset:
Modified: branches/SAMBA_3_0/source/client/smbspool.c
===
--- branches/SAMBA_3_0/source/client/smbspool.c 2005-08-29 12:31:32 UTC (rev 
9735)
+++ branches/SAMBA_3_0/source/client/smbspool.c 2005-08-29 13:10:20 UTC (rev 
9736)
@@ -226,12 +226,12 @@
 {
   if (getenv(CLASS) == NULL)
   {
-fprintf(stderr, ERROR: Unable to connect to SAMBA host, will retry in 
60 seconds...);
-sleep (60);
+fprintf(stderr, ERROR: Unable to connect to CIFS host, will retry in 
60 seconds...);
+sleep (60); /* should just waiting and retrying fix authentication  
??? */
   }
   else
   {
-fprintf(stderr, ERROR: Unable to connect to SAMBA host, trying next 
printer...);
+fprintf(stderr, ERROR: Unable to connect to CIFS host, trying next 
printer...);
 return (1);
   }
 }
@@ -425,10 +425,10 @@
 return NULL;
   }
 
-  if (!cli_send_tconX(cli, share, ?,password, strlen(password)+1)) 
+  if (!cli_send_tconX(cli, share, ?, password, strlen(password)+1)) 
   {
+fprintf(stderr, ERROR: Tree connect failed (%s)\n, cli_errstr(cli));
 cli_shutdown(cli);
-fprintf(stderr, ERROR: Tree connect failed\n );
 return NULL;
   }
 

Modified: trunk/source/client/smbspool.c
===
--- trunk/source/client/smbspool.c  2005-08-29 12:31:32 UTC (rev 9735)
+++ trunk/source/client/smbspool.c  2005-08-29 13:10:20 UTC (rev 9736)
@@ -226,12 +226,12 @@
 {
   if (getenv(CLASS) == NULL)
   {
-fprintf(stderr, ERROR: Unable to connect to SAMBA host, will retry in 
60 seconds...);
-sleep (60);
+fprintf(stderr, ERROR: Unable to connect to CIFS host, will retry in 
60 seconds...);
+sleep (60); /* should just waiting and retrying fix authentication  
??? */
   }
   else
   {
-fprintf(stderr, ERROR: Unable to connect to SAMBA host, trying next 
printer...);
+fprintf(stderr, ERROR: Unable to connect to CIFS host, trying next 
printer...);
 return (1);
   }
 }
@@ -425,10 +425,10 @@
 return NULL;
   }
 
-  if (!cli_send_tconX(cli, share, ?,password, strlen(password)+1)) 
+  if (!cli_send_tconX(cli, share, ?, password, strlen(password)+1)) 
   {
+fprintf(stderr, ERROR: Tree connect failed (%s)\n, cli_errstr(cli));
 cli_shutdown(cli);
-fprintf(stderr, ERROR: Tree connect failed\n );
 return NULL;
   }
 



svn commit: samba r9737 - in branches/tmp/vl-cluster/source/tdb: .

2005-08-29 Thread vlendec
Author: vlendec
Date: 2005-08-29 13:22:34 + (Mon, 29 Aug 2005)
New Revision: 9737

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

Log:
Adapt tdb_torture to the new CLEAR_IF_FIRST semantics. We need one parent
process holding the active if two cluster nodes access the same tdb.

For consistency, this might be stuff to merge to 3_0 and trunk.

Comments?

Volker

Modified:
   branches/tmp/vl-cluster/source/tdb/tdbtorture.c


Changeset:
Modified: branches/tmp/vl-cluster/source/tdb/tdbtorture.c
===
--- branches/tmp/vl-cluster/source/tdb/tdbtorture.c 2005-08-29 13:10:20 UTC 
(rev 9736)
+++ branches/tmp/vl-cluster/source/tdb/tdbtorture.c 2005-08-29 13:22:34 UTC 
(rev 9737)
@@ -183,45 +183,45 @@
int loops = NLOOPS;
pid_t pids[NPROC];
 
-   pids[0] = getpid();
-
-   for (i=0;iNPROC-1;i++) {
-   if ((pids[i+1]=fork()) == 0) break;
-   }
-
-   db = tdb_open(torture.tdb, 2, TDB_CLEAR_IF_FIRST, 
+   db = tdb_open(torture.tdb, 0, TDB_CLEAR_IF_FIRST, 
  O_RDWR | O_CREAT, 0600);
if (!db) {
fatal(db open failed);
}
-   tdb_logging_function(db, tdb_log);
 
-   srand(seed + getpid());
-   srandom(seed + getpid() + time(NULL));
-   for (i=0;iloops;i++) addrec_db();
+   for (i=0;iNPROC;i++) {
+   pids[i] = fork();
+   if (pids[i] == 0) {
+   tdb_reopen_all();
 
-   tdb_traverse(db, NULL, NULL);
-   tdb_traverse(db, traverse_fn, NULL);
-   tdb_traverse(db, traverse_fn, NULL);
+   tdb_logging_function(db, tdb_log);
 
-   tdb_close(db);
+   srand(seed + getpid());
+   srandom(seed + getpid() + time(NULL));
+   for (i=0;iloops;i++) addrec_db();
 
-   if (getpid() == pids[0]) {
-   for (i=0;iNPROC-1;i++) {
-   int status;
-   if (waitpid(pids[i+1], status, 0) != pids[i+1]) {
-   printf(failed to wait for %d\n,
-  (int)pids[i+1]);
-   exit(1);
-   }
-   if (WEXITSTATUS(status) != 0) {
-   printf(child %d exited with status %d\n,
-  (int)pids[i+1], WEXITSTATUS(status));
-   exit(1);
-   }
+   tdb_traverse(db, NULL, NULL);
+   tdb_traverse(db, traverse_fn, NULL);
+   tdb_traverse(db, traverse_fn, NULL);
+
+   tdb_close(db);
+   exit(0);
}
-   printf(OK\n);
}
 
+   for (i=0;iNPROC;i++) {
+   int status;
+   if (waitpid(pids[i], status, 0) != pids[i]) {
+   printf(failed to wait for %d\n,
+  (int)pids[i]);
+   exit(1);
+   }
+   if (WEXITSTATUS(status) != 0) {
+   printf(child %d exited with status %d\n,
+  (int)pids[i], WEXITSTATUS(status));
+   exit(1);
+   }
+   }
+   printf(OK\n);
return 0;
 }



svn commit: samba r9738 - branches/SAMBA_3_0/source/tdb trunk/source/tdb

2005-08-29 Thread vlendec
Author: vlendec
Date: 2005-08-29 13:45:13 + (Mon, 29 Aug 2005)
New Revision: 9738

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

Log:
Adapt tdb_torture to the new CLEAR_IF_FIRST semantics. We need one parent
process holding the active if two cluster nodes access the same tdb.

Volker

Modified:
   branches/SAMBA_3_0/source/tdb/tdbtorture.c
   trunk/source/tdb/tdbtorture.c


Changeset:
Modified: branches/SAMBA_3_0/source/tdb/tdbtorture.c
===
--- branches/SAMBA_3_0/source/tdb/tdbtorture.c  2005-08-29 13:22:34 UTC (rev 
9737)
+++ branches/SAMBA_3_0/source/tdb/tdbtorture.c  2005-08-29 13:45:13 UTC (rev 
9738)
@@ -183,45 +183,45 @@
int loops = NLOOPS;
pid_t pids[NPROC];
 
-   pids[0] = getpid();
-
-   for (i=0;iNPROC-1;i++) {
-   if ((pids[i+1]=fork()) == 0) break;
-   }
-
-   db = tdb_open(torture.tdb, 2, TDB_CLEAR_IF_FIRST, 
+   db = tdb_open(torture.tdb, 0, TDB_CLEAR_IF_FIRST, 
  O_RDWR | O_CREAT, 0600);
if (!db) {
fatal(db open failed);
}
-   tdb_logging_function(db, tdb_log);
 
-   srand(seed + getpid());
-   srandom(seed + getpid() + time(NULL));
-   for (i=0;iloops;i++) addrec_db();
+   for (i=0;iNPROC;i++) {
+   pids[i] = fork();
+   if (pids[i] == 0) {
+   tdb_reopen_all();
 
-   tdb_traverse(db, NULL, NULL);
-   tdb_traverse(db, traverse_fn, NULL);
-   tdb_traverse(db, traverse_fn, NULL);
+   tdb_logging_function(db, tdb_log);
 
-   tdb_close(db);
+   srand(seed + getpid());
+   srandom(seed + getpid() + time(NULL));
+   for (i=0;iloops;i++) addrec_db();
 
-   if (getpid() == pids[0]) {
-   for (i=0;iNPROC-1;i++) {
-   int status;
-   if (waitpid(pids[i+1], status, 0) != pids[i+1]) {
-   printf(failed to wait for %d\n,
-  (int)pids[i+1]);
-   exit(1);
-   }
-   if (WEXITSTATUS(status) != 0) {
-   printf(child %d exited with status %d\n,
-  (int)pids[i+1], WEXITSTATUS(status));
-   exit(1);
-   }
+   tdb_traverse(db, NULL, NULL);
+   tdb_traverse(db, traverse_fn, NULL);
+   tdb_traverse(db, traverse_fn, NULL);
+
+   tdb_close(db);
+   exit(0);
}
-   printf(OK\n);
}
 
+   for (i=0;iNPROC;i++) {
+   int status;
+   if (waitpid(pids[i], status, 0) != pids[i]) {
+   printf(failed to wait for %d\n,
+  (int)pids[i]);
+   exit(1);
+   }
+   if (WEXITSTATUS(status) != 0) {
+   printf(child %d exited with status %d\n,
+  (int)pids[i], WEXITSTATUS(status));
+   exit(1);
+   }
+   }
+   printf(OK\n);
return 0;
 }

Modified: trunk/source/tdb/tdbtorture.c
===
--- trunk/source/tdb/tdbtorture.c   2005-08-29 13:22:34 UTC (rev 9737)
+++ trunk/source/tdb/tdbtorture.c   2005-08-29 13:45:13 UTC (rev 9738)
@@ -183,45 +183,45 @@
int loops = NLOOPS;
pid_t pids[NPROC];
 
-   pids[0] = getpid();
-
-   for (i=0;iNPROC-1;i++) {
-   if ((pids[i+1]=fork()) == 0) break;
-   }
-
-   db = tdb_open(torture.tdb, 2, TDB_CLEAR_IF_FIRST, 
+   db = tdb_open(torture.tdb, 0, TDB_CLEAR_IF_FIRST, 
  O_RDWR | O_CREAT, 0600);
if (!db) {
fatal(db open failed);
}
-   tdb_logging_function(db, tdb_log);
 
-   srand(seed + getpid());
-   srandom(seed + getpid() + time(NULL));
-   for (i=0;iloops;i++) addrec_db();
+   for (i=0;iNPROC;i++) {
+   pids[i] = fork();
+   if (pids[i] == 0) {
+   tdb_reopen_all();
 
-   tdb_traverse(db, NULL, NULL);
-   tdb_traverse(db, traverse_fn, NULL);
-   tdb_traverse(db, traverse_fn, NULL);
+   tdb_logging_function(db, tdb_log);
 
-   tdb_close(db);
+   srand(seed + getpid());
+   srandom(seed + getpid() + time(NULL));
+   for (i=0;iloops;i++) addrec_db();
 
-   if (getpid() == pids[0]) {
-   for (i=0;iNPROC-1;i++) {
-   int status;
-   if (waitpid(pids[i+1], status, 0) != pids[i+1]) {
-   printf(failed to wait for 

svn commit: samba r9739 - in branches/SAMBA_3_0/source: include libads printing registry rpc_client rpc_parse rpc_server rpcclient utils

2005-08-29 Thread jerry
Author: jerry
Date: 2005-08-29 14:55:40 + (Mon, 29 Aug 2005)
New Revision: 9739

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

Log:
conver the reg_objects (REGSUBKEY_CTR  REGVAL_CTR) to use
the new talloc() features:

 Note that the REGSUB_CTR and REGVAL_CTR objects *must* be talloc()'d
 since the methods use the object pointer as the talloc context for
 internal private data.

 There is no longer a regXXX_ctr_intit() and regXXX_ctr_destroy()
 pair of functions.  Simply TALLOC_ZERO_P() and TALLOC_FREE() the
 object.

Also had to convert the printer_info_2-NT_PRINTER_DATA field
to be talloc()'d as well.  This is just a stop on the road to 
cleaning up the printer memory management.


Modified:
   branches/SAMBA_3_0/source/include/nt_printing.h
   branches/SAMBA_3_0/source/include/reg_objects.h
   branches/SAMBA_3_0/source/include/smb_macros.h
   branches/SAMBA_3_0/source/libads/ldap_printer.c
   branches/SAMBA_3_0/source/printing/nt_printing.c
   branches/SAMBA_3_0/source/registry/reg_db.c
   branches/SAMBA_3_0/source/registry/reg_frontend.c
   branches/SAMBA_3_0/source/registry/reg_objects.c
   branches/SAMBA_3_0/source/registry/reg_printing.c
   branches/SAMBA_3_0/source/rpc_client/cli_spoolss.c
   branches/SAMBA_3_0/source/rpc_parse/parse_spoolss.c
   branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c
   branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
   branches/SAMBA_3_0/source/rpcclient/cmd_spoolss.c
   branches/SAMBA_3_0/source/utils/net_rpc_printer.c
   branches/SAMBA_3_0/source/utils/net_rpc_registry.c
   branches/SAMBA_3_0/source/utils/profiles.c


Changeset:
Sorry, the patch is too large (2654 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9739


svn commit: samba r9740 - in branches/SOC/SAMBA_4_0/source/torture/rpc: .

2005-08-29 Thread metze
Author: metze
Date: 2005-08-29 14:58:03 + (Mon, 29 Aug 2005)
New Revision: 9740

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

Log:
fix up the DsGetNCchanges loop,
and remove misleading comments

metze
Modified:
   branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c


Changeset:
Modified: branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c
===
--- branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c  2005-08-29 14:55:40 UTC 
(rev 9739)
+++ branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c  2005-08-29 14:58:03 UTC 
(rev 9740)
@@ -737,7 +737,7 @@
NTSTATUS status;
BOOL ret = True;
int i, y = 0;
-   int tmp_usn = 0;
+   uint64_t highest_usn = 0;
const char *partition = NULL;
struct drsuapi_DsGetNCChanges r;
struct drsuapi_DsReplicaObjectIdentifier nc;
@@ -759,12 +759,14 @@
ZERO_STRUCT(null_guid);
ZERO_STRUCT(null_sid);
 
-   partition = lp_parm_string(-1, drsuapi, partition);
+   partition = lp_parm_string(-1, dssync, partition);
if (partition == NULL) {
partition = ctx-domain_dn;
-   printf(drsuapi:partition not specified, defaulting to %s.\n, 
ctx-domain_dn);
+   printf(dssync:partition not specified, defaulting to %s.\n, 
ctx-domain_dn);
}
-   
+
+   highest_usn = lp_parm_int(-1, dssync, highest_usn, 0);
+
for (i=0; i  ARRAY_SIZE(array); i++) {
printf(testing DsGetNCChanges level %d\n,
array[i].level);
@@ -781,15 +783,15 @@
r.in.req.req5.destination_dsa_guid  = 
ctx-new_dc.invocation_id;
r.in.req.req5.source_dsa_guid   = 
null_guid;
r.in.req.req5.naming_context= nc;
-   r.in.req.req5.highwatermark.tmp_highest_usn = 0;
+   r.in.req.req5.highwatermark.tmp_highest_usn = 
highest_usn;
r.in.req.req5.highwatermark.reserved_usn= 0;
-   r.in.req.req5.highwatermark.highest_usn = 0;
+   r.in.req.req5.highwatermark.highest_usn = 
highest_usn;
r.in.req.req5.uptodateness_vector   = NULL;
r.in.req.req5.replica_flags = 0;
-   if (lp_parm_bool(-1,drsuapi,compression,False)) {
+   if (lp_parm_bool(-1,dssync,compression,False)) {
r.in.req.req5.replica_flags |= 
DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
}
-   if 
(lp_parm_bool(-1,drsuapi,neighbour_writeable,True)) {
+   if 
(lp_parm_bool(-1,dssync,neighbour_writeable,True)) {
r.in.req.req5.replica_flags |= 
DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
}
r.in.req.req5.replica_flags |= 
DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
@@ -812,15 +814,15 @@
r.in.req.req8.destination_dsa_guid  = 
ctx-new_dc.invocation_id;
r.in.req.req8.source_dsa_guid   = 
null_guid;
r.in.req.req8.naming_context= nc;
-   r.in.req.req8.highwatermark.tmp_highest_usn = 0;
+   r.in.req.req8.highwatermark.tmp_highest_usn = 
highest_usn;
r.in.req.req8.highwatermark.reserved_usn= 0;
-   r.in.req.req8.highwatermark.highest_usn = 0;
+   r.in.req.req8.highwatermark.highest_usn = 
highest_usn;
r.in.req.req8.uptodateness_vector   = NULL;
r.in.req.req8.replica_flags = 0;
-   if (lp_parm_bool(-1,drsuapi,compression,False)) {
+   if (lp_parm_bool(-1,dssync,compression,False)) {
r.in.req.req8.replica_flags |= 
DRSUAPI_DS_REPLICA_NEIGHBOUR_COMPRESS_CHANGES;
}
-   if 
(lp_parm_bool(-1,drsuapi,neighbour_writeable,True)) {
+   if 
(lp_parm_bool(-1,dssync,neighbour_writeable,True)) {
r.in.req.req8.replica_flags |= 
DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE;
}
r.in.req.req8.replica_flags |= 
DRSUAPI_DS_REPLICA_NEIGHBOUR_SYNC_ON_STARTUP
@@ -842,27 +844,18 @@

ZERO_STRUCT(r.out);
printf(Dumping AD partition: %s\n, nc.dn);
-   do {
-   /*r.in.req.req8.highwatermark = 

svn commit: samba r9744 - in branches/SAMBA_4_0/source: lib/ldb/ldb_map lib/ldb/samba lib/ldb/tests lib/samba3 scripting/libjs setup

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-29 15:54:10 + (Mon, 29 Aug 2005)
New Revision: 9744

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

Log:
- [upgrade.js] Start working on smb.conf conversion.
- [ldb_map] Support storing non-mappable data in a fallback LDB 

Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_map/ldb_map.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_map/ldb_map.h
   branches/SAMBA_4_0/source/lib/ldb/samba/samba3sam.c
   branches/SAMBA_4_0/source/lib/ldb/tests/test-samba3sam.sh
   branches/SAMBA_4_0/source/lib/samba3/PLAN
   branches/SAMBA_4_0/source/scripting/libjs/upgrade.js
   branches/SAMBA_4_0/source/setup/upgrade


Changeset:
Sorry, the patch is too large (981 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9744


svn commit: samba r9745 - in branches/SOC/SAMBA_3_0/source: include libmsrpc

2005-08-29 Thread skel
Author: skel
Date: 2005-08-29 15:55:15 + (Mon, 29 Aug 2005)
New Revision: 9745

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

Log:
CacLookupRidsRecord now stores a type, user or group


Modified:
   branches/SOC/SAMBA_3_0/source/include/libmsrpc.h
   branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c


Changeset:
Modified: branches/SOC/SAMBA_3_0/source/include/libmsrpc.h
===
--- branches/SOC/SAMBA_3_0/source/include/libmsrpc.h2005-08-29 15:54:10 UTC 
(rev 9744)
+++ branches/SOC/SAMBA_3_0/source/include/libmsrpc.h2005-08-29 15:55:15 UTC 
(rev 9745)
@@ -164,13 +164,20 @@
  * @defgroup sam_defs SAM Definitions
  * @{
  */
-struct cac_LookupRidsRecord {
+typedef struct _CACLOOKUPRIDSRECORD {
char *name;
uint32 rid;
+
+   /**If found, this will be one of:
+* - USER_RID_TYPE
+* - GROUP_RID_TYPE
+* (found in include/rpc_misc.h)
+*/
+   uint32 type;

/*if the name or RID was looked up, then found = True*/
BOOL found;
-};
+} CacLookupRidsRecord;
 
 typedef struct _CACUSERINFO {
/**Last logon time*/
@@ -1779,7 +1786,7 @@
   uint32 num_names;
 
   /**array contiaing the Names and RIDs*/
-  struct cac_LookupRidsRecord *map;
+  CacLookupRidsRecord *map;
} out;
 };
 
@@ -1810,7 +1817,7 @@
   uint32 num_rids;
 
   /**array contiaing the Names and RIDs*/
-  struct cac_LookupRidsRecord *map;
+  CacLookupRidsRecord *map;
} out;
 };
 

Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c
===
--- branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c   2005-08-29 15:54:10 UTC 
(rev 9744)
+++ branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c   2005-08-29 15:55:15 UTC 
(rev 9745)
@@ -22,7 +22,6 @@
 #include libmsrpc_internal.h
 
 /*used by cac_SamGetNamesFromRids*/
-#define SAMR_RID_FOUND   1
 #define SAMR_RID_UNKNOWN 8
 
 #define SAMR_ENUM_MAX_SIZE 0x
@@ -470,7 +469,7 @@
 
uint32 i = 0;
 
-   struct cac_LookupRidsRecord *map_out;
+   CacLookupRidsRecord *map_out;
 
if(!hnd) 
   return CAC_FAILURE;
@@ -498,7 +497,7 @@
if(!NT_STATUS_IS_OK(hnd-status)  !NT_STATUS_EQUAL(hnd-status, 
STATUS_SOME_UNMAPPED))
   return CAC_FAILURE;
 
-   map_out = TALLOC_ARRAY(mem_ctx, struct cac_LookupRidsRecord, num_names_out);
+   map_out = TALLOC_ARRAY(mem_ctx, CacLookupRidsRecord, num_names_out);
if(!map_out) {
   hnd-status = NT_STATUS_NO_MEMORY;
   return CAC_FAILURE;
@@ -508,10 +507,12 @@
   if(name_types_out[i] == SAMR_RID_UNKNOWN) {
  map_out[i].found = False;
  map_out[i].name  = NULL;
+ map_out[i].type  = 0;
   }
   else {
  map_out[i].found = True;
  map_out[i].name = talloc_strdup(mem_ctx, names_out[i]);
+ map_out[i].type = name_types_out[i];
   }
   map_out[i].rid = op-in.rids[i];
}
@@ -537,7 +538,7 @@
 
uint32 i = 0;
 
-   struct cac_LookupRidsRecord *map_out;
+   CacLookupRidsRecord *map_out;
 
if(!hnd) 
   return CAC_FAILURE;
@@ -566,20 +567,23 @@
if(!NT_STATUS_IS_OK(hnd-status)  !NT_STATUS_EQUAL(hnd-status, 
STATUS_SOME_UNMAPPED))
   return CAC_FAILURE;
 
-   map_out = TALLOC_ARRAY(mem_ctx, struct cac_LookupRidsRecord, num_rids_out);
+   map_out = TALLOC_ARRAY(mem_ctx, CacLookupRidsRecord, num_rids_out);
if(!map_out) {
   hnd-status = NT_STATUS_NO_MEMORY;
   return CAC_FAILURE;
}
 
for(i = 0; i  num_rids_out; i++) {
+
   if(rid_types_out[i] == SAMR_RID_UNKNOWN) {
  map_out[i].found = False;
  map_out[i].rid   = 0;
+ map_out[i].type  = 0;
   }
   else {
  map_out[i].found = True;
  map_out[i].rid   = rids_out[i];
+ map_out[i].type  = rid_types_out[i];
   }
 
   map_out[i].name = talloc_strdup(mem_ctx, op-in.names[i]);



svn commit: samba r9746 - in branches/SAMBA_4_0/source/scripting/libjs: .

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-29 15:55:35 + (Mon, 29 Aug 2005)
New Revision: 9746

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

Log:
Add staff as possible alternative to wheel 
(should fix standard provisioning on AIX)

Modified:
   branches/SAMBA_4_0/source/scripting/libjs/provision.js


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/libjs/provision.js
===
--- branches/SAMBA_4_0/source/scripting/libjs/provision.js  2005-08-29 
15:55:15 UTC (rev 9745)
+++ branches/SAMBA_4_0/source/scripting/libjs/provision.js  2005-08-29 
15:55:35 UTC (rev 9746)
@@ -291,7 +291,7 @@
subobj.ROOT = findnss(nss.getpwnam, root);
subobj.NOBODY   = findnss(nss.getpwnam, nobody);
subobj.NOGROUP  = findnss(nss.getgrnam, nogroup, nobody);
-   subobj.WHEEL= findnss(nss.getgrnam, wheel, root);
+   subobj.WHEEL= findnss(nss.getgrnam, wheel, root, staff);
subobj.USERS= findnss(nss.getgrnam, users, guest, other);
subobj.DNSDOMAIN= strlower(subobj.REALM);
subobj.DNSNAME  = sprintf(%s.%s, 



svn commit: samba r9747 - in branches/tmp/vl-cluster/source: client include libads nsswitch printing registry rpc_client rpc_parse rpc_server rpcclient utils

2005-08-29 Thread vlendec
Author: vlendec
Date: 2005-08-29 16:11:48 + (Mon, 29 Aug 2005)
New Revision: 9747

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

Log:
Merge head up to r9746.
Modified:
   branches/tmp/vl-cluster/source/client/smbspool.c
   branches/tmp/vl-cluster/source/include/nt_printing.h
   branches/tmp/vl-cluster/source/include/reg_objects.h
   branches/tmp/vl-cluster/source/include/smb_macros.h
   branches/tmp/vl-cluster/source/libads/ldap_printer.c
   branches/tmp/vl-cluster/source/nsswitch/winbindd_dual.c
   branches/tmp/vl-cluster/source/nsswitch/winbindd_util.c
   branches/tmp/vl-cluster/source/printing/nt_printing.c
   branches/tmp/vl-cluster/source/registry/reg_db.c
   branches/tmp/vl-cluster/source/registry/reg_frontend.c
   branches/tmp/vl-cluster/source/registry/reg_objects.c
   branches/tmp/vl-cluster/source/registry/reg_printing.c
   branches/tmp/vl-cluster/source/rpc_client/cli_spoolss.c
   branches/tmp/vl-cluster/source/rpc_parse/parse_spoolss.c
   branches/tmp/vl-cluster/source/rpc_server/srv_reg_nt.c
   branches/tmp/vl-cluster/source/rpc_server/srv_spoolss_nt.c
   branches/tmp/vl-cluster/source/rpcclient/cmd_spoolss.c
   branches/tmp/vl-cluster/source/utils/net_rpc_printer.c
   branches/tmp/vl-cluster/source/utils/net_rpc_registry.c
   branches/tmp/vl-cluster/source/utils/profiles.c


Changeset:
Sorry, the patch is too large (2797 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9747


svn commit: samba r9748 - in branches/tmp/RPCREWRITE/source: include libads printing registry rpc_client rpc_parse rpc_server rpcclient utils

2005-08-29 Thread jra
Author: jra
Date: 2005-08-29 16:12:56 + (Mon, 29 Aug 2005)
New Revision: 9748

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

Log:
Keep up to date with HEAD whilst I'm working on this...
Jeremy.

Modified:
   branches/tmp/RPCREWRITE/source/include/nt_printing.h
   branches/tmp/RPCREWRITE/source/include/reg_objects.h
   branches/tmp/RPCREWRITE/source/include/smb_macros.h
   branches/tmp/RPCREWRITE/source/libads/ldap_printer.c
   branches/tmp/RPCREWRITE/source/printing/nt_printing.c
   branches/tmp/RPCREWRITE/source/registry/reg_db.c
   branches/tmp/RPCREWRITE/source/registry/reg_frontend.c
   branches/tmp/RPCREWRITE/source/registry/reg_objects.c
   branches/tmp/RPCREWRITE/source/registry/reg_printing.c
   branches/tmp/RPCREWRITE/source/rpc_client/cli_spoolss.c
   branches/tmp/RPCREWRITE/source/rpc_parse/parse_spoolss.c
   branches/tmp/RPCREWRITE/source/rpc_server/srv_reg_nt.c
   branches/tmp/RPCREWRITE/source/rpc_server/srv_spoolss_nt.c
   branches/tmp/RPCREWRITE/source/rpcclient/cmd_spoolss.c
   branches/tmp/RPCREWRITE/source/utils/net_rpc_printer.c
   branches/tmp/RPCREWRITE/source/utils/net_rpc_registry.c
   branches/tmp/RPCREWRITE/source/utils/profiles.c


Changeset:
Sorry, the patch is too large (2714 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9748


svn commit: samba r9749 - in branches/tmp/RPCREWRITE/source/tdb: .

2005-08-29 Thread jra
Author: jra
Date: 2005-08-29 16:23:58 + (Mon, 29 Aug 2005)
New Revision: 9749

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

Log:
Keep up to date with HEAD...
Jeremy.

Modified:
   branches/tmp/RPCREWRITE/source/tdb/tdbtorture.c


Changeset:
Modified: branches/tmp/RPCREWRITE/source/tdb/tdbtorture.c
===
--- branches/tmp/RPCREWRITE/source/tdb/tdbtorture.c 2005-08-29 16:12:56 UTC 
(rev 9748)
+++ branches/tmp/RPCREWRITE/source/tdb/tdbtorture.c 2005-08-29 16:23:58 UTC 
(rev 9749)
@@ -183,45 +183,45 @@
int loops = NLOOPS;
pid_t pids[NPROC];
 
-   pids[0] = getpid();
-
-   for (i=0;iNPROC-1;i++) {
-   if ((pids[i+1]=fork()) == 0) break;
-   }
-
-   db = tdb_open(torture.tdb, 2, TDB_CLEAR_IF_FIRST, 
+   db = tdb_open(torture.tdb, 0, TDB_CLEAR_IF_FIRST, 
  O_RDWR | O_CREAT, 0600);
if (!db) {
fatal(db open failed);
}
-   tdb_logging_function(db, tdb_log);
 
-   srand(seed + getpid());
-   srandom(seed + getpid() + time(NULL));
-   for (i=0;iloops;i++) addrec_db();
+   for (i=0;iNPROC;i++) {
+   pids[i] = fork();
+   if (pids[i] == 0) {
+   tdb_reopen_all();
 
-   tdb_traverse(db, NULL, NULL);
-   tdb_traverse(db, traverse_fn, NULL);
-   tdb_traverse(db, traverse_fn, NULL);
+   tdb_logging_function(db, tdb_log);
 
-   tdb_close(db);
+   srand(seed + getpid());
+   srandom(seed + getpid() + time(NULL));
+   for (i=0;iloops;i++) addrec_db();
 
-   if (getpid() == pids[0]) {
-   for (i=0;iNPROC-1;i++) {
-   int status;
-   if (waitpid(pids[i+1], status, 0) != pids[i+1]) {
-   printf(failed to wait for %d\n,
-  (int)pids[i+1]);
-   exit(1);
-   }
-   if (WEXITSTATUS(status) != 0) {
-   printf(child %d exited with status %d\n,
-  (int)pids[i+1], WEXITSTATUS(status));
-   exit(1);
-   }
+   tdb_traverse(db, NULL, NULL);
+   tdb_traverse(db, traverse_fn, NULL);
+   tdb_traverse(db, traverse_fn, NULL);
+
+   tdb_close(db);
+   exit(0);
}
-   printf(OK\n);
}
 
+   for (i=0;iNPROC;i++) {
+   int status;
+   if (waitpid(pids[i], status, 0) != pids[i]) {
+   printf(failed to wait for %d\n,
+  (int)pids[i]);
+   exit(1);
+   }
+   if (WEXITSTATUS(status) != 0) {
+   printf(child %d exited with status %d\n,
+  (int)pids[i], WEXITSTATUS(status));
+   exit(1);
+   }
+   }
+   printf(OK\n);
return 0;
 }



svn commit: samba r9750 - in branches/tmp/RPCREWRITE/source/client: .

2005-08-29 Thread jra
Author: jra
Date: 2005-08-29 16:26:18 + (Mon, 29 Aug 2005)
New Revision: 9750

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

Log:
Final commit to keep in sync with head.
Jeremy

Modified:
   branches/tmp/RPCREWRITE/source/client/smbspool.c


Changeset:
Modified: branches/tmp/RPCREWRITE/source/client/smbspool.c
===
--- branches/tmp/RPCREWRITE/source/client/smbspool.c2005-08-29 16:23:58 UTC 
(rev 9749)
+++ branches/tmp/RPCREWRITE/source/client/smbspool.c2005-08-29 16:26:18 UTC 
(rev 9750)
@@ -226,12 +226,12 @@
 {
   if (getenv(CLASS) == NULL)
   {
-fprintf(stderr, ERROR: Unable to connect to SAMBA host, will retry in 
60 seconds...);
-sleep (60);
+fprintf(stderr, ERROR: Unable to connect to CIFS host, will retry in 
60 seconds...);
+sleep (60); /* should just waiting and retrying fix authentication  
??? */
   }
   else
   {
-fprintf(stderr, ERROR: Unable to connect to SAMBA host, trying next 
printer...);
+fprintf(stderr, ERROR: Unable to connect to CIFS host, trying next 
printer...);
 return (1);
   }
 }
@@ -425,10 +425,10 @@
 return NULL;
   }
 
-  if (!cli_send_tconX(cli, share, ?,password, strlen(password)+1)) 
+  if (!cli_send_tconX(cli, share, ?, password, strlen(password)+1)) 
   {
+fprintf(stderr, ERROR: Tree connect failed (%s)\n, cli_errstr(cli));
 cli_shutdown(cli);
-fprintf(stderr, ERROR: Tree connect failed\n );
 return NULL;
   }
 



svn commit: samba r9751 - in branches/SAMBA_4_0/source/lib: ldb/ldb_map samba3

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-29 17:31:19 + (Mon, 29 Aug 2005)
New Revision: 9751

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

Log:
Remove C version of samba3dump (the EJS version works nicely as well).
Fix a couple of bugs in ldb_map.

Removed:
   branches/SAMBA_4_0/source/lib/samba3/samba3dump.c
Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_map/ldb_map.c
   branches/SAMBA_4_0/source/lib/samba3/config.mk


Changeset:
Sorry, the patch is too large (457 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9751


svn commit: samba r9752 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

2005-08-29 Thread jerry
Author: jerry
Date: 2005-08-29 17:48:01 + (Mon, 29 Aug 2005)
New Revision: 9752

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

Log:
figured out why talloc_steal() is a bad idea for SEC_DESC*
Add a comment so someone else doesn't get bitten by this as well.


Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
   trunk/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c   2005-08-29 
17:31:19 UTC (rev 9751)
+++ branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c   2005-08-29 
17:48:01 UTC (rev 9752)
@@ -4171,7 +4171,11 @@
if ( ntprinter-info_2-secdesc_buf 
 ntprinter-info_2-secdesc_buf-len != 0 ) 
{
-   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
ntprinter-info_2-secdesc_buf-sec );
+   /* don't use talloc_steal() here unless you do a deep steal of 
all 
+  the SEC_DESC members */
+
+   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
+   ntprinter-info_2-secdesc_buf-sec );
}
 
free_a_printer(ntprinter, 2);
@@ -4205,7 +4209,11 @@
printer-flags = 0x4; 
 
if (ntprinter-info_2-secdesc_buf  
ntprinter-info_2-secdesc_buf-len != 0) {
-   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
ntprinter-info_2-secdesc_buf-sec );
+   /* don't use talloc_steal() here unless you do a deep steal of 
all 
+  the SEC_DESC members */
+
+   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
+   ntprinter-info_2-secdesc_buf-sec );
}
 
free_a_printer(ntprinter, 2);

Modified: trunk/source/rpc_server/srv_spoolss_nt.c
===
--- trunk/source/rpc_server/srv_spoolss_nt.c2005-08-29 17:31:19 UTC (rev 
9751)
+++ trunk/source/rpc_server/srv_spoolss_nt.c2005-08-29 17:48:01 UTC (rev 
9752)
@@ -4171,7 +4171,11 @@
if ( ntprinter-info_2-secdesc_buf 
 ntprinter-info_2-secdesc_buf-len != 0 ) 
{
-   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
ntprinter-info_2-secdesc_buf-sec );
+   /* don't use talloc_steal() here unless you do a deep steal of 
all 
+  the SEC_DESC members */
+
+   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
+   ntprinter-info_2-secdesc_buf-sec );
}
 
free_a_printer(ntprinter, 2);
@@ -4205,7 +4209,11 @@
printer-flags = 0x4; 
 
if (ntprinter-info_2-secdesc_buf  
ntprinter-info_2-secdesc_buf-len != 0) {
-   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
ntprinter-info_2-secdesc_buf-sec );
+   /* don't use talloc_steal() here unless you do a deep steal of 
all 
+  the SEC_DESC members */
+
+   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
+   ntprinter-info_2-secdesc_buf-sec );
}
 
free_a_printer(ntprinter, 2);



svn commit: samba r9753 - in branches/tmp/RPCREWRITE/source/rpc_server: .

2005-08-29 Thread jra
Author: jra
Date: 2005-08-29 17:54:14 + (Mon, 29 Aug 2005)
New Revision: 9753

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

Log:
Merge with head.
Jeremy.

Modified:
   branches/tmp/RPCREWRITE/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: branches/tmp/RPCREWRITE/source/rpc_server/srv_spoolss_nt.c
===
--- branches/tmp/RPCREWRITE/source/rpc_server/srv_spoolss_nt.c  2005-08-29 
17:48:01 UTC (rev 9752)
+++ branches/tmp/RPCREWRITE/source/rpc_server/srv_spoolss_nt.c  2005-08-29 
17:54:14 UTC (rev 9753)
@@ -4171,7 +4171,11 @@
if ( ntprinter-info_2-secdesc_buf 
 ntprinter-info_2-secdesc_buf-len != 0 ) 
{
-   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
ntprinter-info_2-secdesc_buf-sec );
+   /* don't use talloc_steal() here unless you do a deep steal of 
all 
+  the SEC_DESC members */
+
+   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
+   ntprinter-info_2-secdesc_buf-sec );
}
 
free_a_printer(ntprinter, 2);
@@ -4205,7 +4209,11 @@
printer-flags = 0x4; 
 
if (ntprinter-info_2-secdesc_buf  
ntprinter-info_2-secdesc_buf-len != 0) {
-   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
ntprinter-info_2-secdesc_buf-sec );
+   /* don't use talloc_steal() here unless you do a deep steal of 
all 
+  the SEC_DESC members */
+
+   printer-secdesc = dup_sec_desc( get_talloc_ctx(), 
+   ntprinter-info_2-secdesc_buf-sec );
}
 
free_a_printer(ntprinter, 2);



svn commit: samba-web r784 - in trunk/patches: .

2005-08-29 Thread lmuelle
Author: lmuelle
Date: 2005-08-29 18:01:03 + (Mon, 29 Aug 2005)
New Revision: 784

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

Log:
Add quilt support to this nice patches dir.  I'll write also a reply to
Jerry's announcement on samba-technical.

Added:
   trunk/patches/fetch-patches
   trunk/patches/series
Modified:
   trunk/patches/index.html


Changeset:
Added: trunk/patches/fetch-patches
===
--- trunk/patches/fetch-patches 2005-08-26 19:21:59 UTC (rev 783)
+++ trunk/patches/fetch-patches 2005-08-29 18:01:03 UTC (rev 784)
@@ -0,0 +1,27 @@
+#! /bin/bash
+
+PATH=/usr/bin:/usr/X11R6/bin:/bin
+
+# URL to the series file
+SERIES_FILE=http://www.samba.org/samba/patches/series;
+
+if ! which wget/dev/null; then
+   echo Error: You have to install wget.
+   exit 1
+fi
+
+test -d patches || mkdir patches
+pushd patches /dev/null
+
+wget -N $SERIES_FILE
+
+while read patch rest; do
+   case $patch in
+   \#*|) continue ;;
+   *)
+   wget -N http://www.samba.org/samba/patches/$patch
+   ;;
+   esac
+done series
+
+popd /dev/null


Property changes on: trunk/patches/fetch-patches
___
Name: svn:executable
   + *

Modified: trunk/patches/index.html
===
--- trunk/patches/index.html2005-08-26 19:21:59 UTC (rev 783)
+++ trunk/patches/index.html2005-08-29 18:01:03 UTC (rev 784)
@@ -18,6 +18,15 @@
 build Samba as normal
 /pre
 
+Or use the quilt tool to apply all patches to a known series.
+pre$ tar zxvf samba-3.0.x.tar.gz
+$ cd samba-3.0.x
+$ wget http://www.samba.org/samba/patches/fetch-patches
+$ sh ./fetch-patches
+$ quilt push -a
+$ cd source
+/pre
+
 pPlease note that in some cases it will be necessary to regenerate
the configure script by executing autogen.sh located in the 
source/ directory.  In all cases, it is best to do a clean build 

Added: trunk/patches/series
===
--- trunk/patches/series2005-08-26 19:21:59 UTC (rev 783)
+++ trunk/patches/series2005-08-29 18:01:03 UTC (rev 784)
@@ -0,0 +1,7 @@
+# File to be used with the quilt tool to apply the patches in the right order.
+#
+# See http://savannah.nongnu.org/projects/quilt and 
+# http://www.suse.de/~agruen/quilt.pdf
+
+bug3010_v1.patch
+groupname_enumeration_v3.patch



svn commit: samba-web r785 - in trunk/news/advocacy: .

2005-08-29 Thread deryck
Author: deryck
Date: 2005-08-29 18:34:52 + (Mon, 29 Aug 2005)
New Revision: 785

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

Log:
Add news story on French Ag/Fishing Ministry's migration
to Linux/Samba.  (Thanks, ab, for the link!)

deryck

Added:
   trunk/news/advocacy/french_ag_migrates.html


Changeset:
Added: trunk/news/advocacy/french_ag_migrates.html
===
--- trunk/news/advocacy/french_ag_migrates.html 2005-08-29 18:01:03 UTC (rev 
784)
+++ trunk/news/advocacy/french_ag_migrates.html 2005-08-29 18:34:52 UTC (rev 
785)
@@ -0,0 +1,17 @@
+h3a name=french_ag_migratesFrench Agriculture Ministry Migrates to 
Linux/Samba/a/h3 
+
+div class=article
+  pa href=http://www.infogiciel.info/;Infogiciel.info/a is running 
an
+  article on the French Agriculture and Fishing Ministry moving 500 NT4 
servers
+  to Mandriva Linux.  Samba is handling the file and print server duties in
+  the Mandriva setup.  The article offers some insight into the French 
Agriculture
+  Ministry's migration concerns and how Mandriva tried to address those 
+  concerns./p
+
+  pThe article is in French and is available 
+  a href=http://www.infogiciel.info/article0195.html;here/a.  (Or 
+  a 
href=http://google.com/translate?u=http%3A%2F%2Fwww.infogiciel.info%2Farticle0195.htmllangpair=fr%7Cenhl=enie=UTF8;here/a,
 in English via 
+  a href=http://www.google.com/translate;Google translate/a.)/p
+/div
+
+   



svn commit: samba-web r786 - in trunk/patches: .

2005-08-29 Thread jerry
Author: jerry
Date: 2005-08-29 18:45:05 + (Mon, 29 Aug 2005)
New Revision: 786

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

Log:
adding volker's winbindd patch to list and cleaning up html some
Added:
   trunk/patches/winbindd_v1.patch
Modified:
   trunk/patches/index.html


Changeset:
Modified: trunk/patches/index.html
===
--- trunk/patches/index.html2005-08-29 18:34:52 UTC (rev 785)
+++ trunk/patches/index.html2005-08-29 18:45:05 UTC (rev 786)
@@ -15,18 +15,20 @@
 $ cd samba-3.0.x
 $ patch -p1 lt; quot;downloaded_patch_filequot;
 $ cd source
-build Samba as normal
 /pre
 
-Or use the quilt tool to apply all patches to a known series.
+pOr use the quilt tool to apply all patches to a known series./p
+
 pre$ tar zxvf samba-3.0.x.tar.gz
 $ cd samba-3.0.x
 $ wget http://www.samba.org/samba/patches/fetch-patches
 $ sh ./fetch-patches
-$ quilt push -a
+$ a href=http://savannah.nongnu.org/projects/quilt;quilt/a push -a
 $ cd source
 /pre
 
+pbuild Samba as normal/p
+
 pPlease note that in some cases it will be necessary to regenerate
the configure script by executing autogen.sh located in the 
source/ directory.  In all cases, it is best to do a clean build 
@@ -55,6 +57,12 @@
 tdFixes a href=https://bugzilla.samba.org/bug/3010;Bug #3010/a: 
endless directory loop on AIX 5
 with Win9x clients. Requires re-running autogen.sh and a clean 
build./td
   /tr
+  tr
+tda href=/samba/patches/winbindd_v1.patchWinbindd/a/td
+tdFixes a few small issues with winbindd at startup and ensures that 
+the correct NT_STATUS code is returned to the calling processes
+when authentication fails./td
+  /tr
   /tbody 
 /table
 

Added: trunk/patches/winbindd_v1.patch
===
--- trunk/patches/winbindd_v1.patch 2005-08-29 18:34:52 UTC (rev 785)
+++ trunk/patches/winbindd_v1.patch 2005-08-29 18:45:05 UTC (rev 786)
@@ -0,0 +1,39 @@
+diff -urBbN --exclude-from=diff.excludes 
samba-3.0.20-orig/source/nsswitch/winbindd_dual.c 
samba-3.0.20-new/source/nsswitch/winbindd_dual.c
+--- samba-3.0.20-orig/source/nsswitch/winbindd_dual.c  2005-08-19 
12:16:27.0 -0500
 samba-3.0.20-new/source/nsswitch/winbindd_dual.c   2005-08-29 
13:34:16.0 -0500
+@@ -158,7 +158,6 @@
+   return;
+   }
+ 
+-  if (state-response-result == WINBINDD_OK)
+   SMB_ASSERT(cache_retrieve_response(child-pid,
+  state-response));
+ 
+@@ -486,12 +485,11 @@
+   DEBUG(4,(child daemon request %d\n,
+(int)state.request.cmd));
+ 
++  ZERO_STRUCT(state.response);
+   state.request.null_term = '\0';
+   child_process_request(child-domain, state);
+ 
+-  if (state.response.result == WINBINDD_OK)
+-  cache_store_response(sys_getpid(),
+-   state.response);
++  cache_store_response(sys_getpid(), state.response);
+ 
+   SAFE_FREE(state.response.extra_data);
+ 
+diff -urBbN --exclude-from=diff.excludes 
samba-3.0.20-orig/source/nsswitch/winbindd_util.c 
samba-3.0.20-new/source/nsswitch/winbindd_util.c
+--- samba-3.0.20-orig/source/nsswitch/winbindd_util.c  2005-07-28 
08:19:44.0 -0500
 samba-3.0.20-new/source/nsswitch/winbindd_util.c   2005-08-29 
13:34:16.0 -0500
+@@ -444,7 +444,9 @@
+   state-request.data.init_conn.dcname
+   [sizeof(state-request.data.init_conn.dcname)-1]='\0';
+ 
++  if (strlen(state-request.data.init_conn.dcname)  0) {
+   fstrcpy(domain-dcname, state-request.data.init_conn.dcname);
++  }
+ 
+   if (strlen(domain-dcname)  0) {
+   if (!resolve_name(domain-dcname, ipaddr, 0x20)) {



svn commit: samba-web r787 - in trunk/patches: .

2005-08-29 Thread jerry
Author: jerry
Date: 2005-08-29 18:54:08 + (Mon, 29 Aug 2005)
New Revision: 787

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

Log:
adding new patch to series file
Modified:
   trunk/patches/series


Changeset:
Modified: trunk/patches/series
===
--- trunk/patches/series2005-08-29 18:45:05 UTC (rev 786)
+++ trunk/patches/series2005-08-29 18:54:08 UTC (rev 787)
@@ -5,3 +5,4 @@
 
 bug3010_v1.patch
 groupname_enumeration_v3.patch
+winbindd_v1.patch



svn commit: samba-web r788 - in trunk/patches: .

2005-08-29 Thread lmuelle
Author: lmuelle
Date: 2005-08-29 19:04:12 + (Mon, 29 Aug 2005)
New Revision: 788

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

Log:
Add support for a non default series file.  This might allow us to
provide more than one patch series.  E.g. series-3.0.21pre2

It's now possible to override the PATCH_DIR if it is set in the
environment from where the script is called.

Modified:
   trunk/patches/fetch-patches


Changeset:
Modified: trunk/patches/fetch-patches
===
--- trunk/patches/fetch-patches 2005-08-29 18:54:08 UTC (rev 787)
+++ trunk/patches/fetch-patches 2005-08-29 19:04:12 UTC (rev 788)
@@ -1,9 +1,38 @@
 #! /bin/bash
 
+# Copyright (c) 2005 Lars Mueller lmuelle at samba.org
+#
+# If called without any argument the default series filename 'series' is used.
+# It's possible to pass a non default series filename, e.g. series-3.0.20, as
+# first argument.
+#
+# If PATCH_DIR is defined, we don't use our default at Samba.org.  That's
+# at least handy for testing changes to the script.
+#
+#
+# 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 2 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, write to the Free Software Foundation, Inc., 59 Temple
+# Place, Suite 330, Boston, MA 02111-1307 USA
+
+
 PATH=/usr/bin:/usr/X11R6/bin:/bin
 
-# URL to the series file
-SERIES_FILE=http://www.samba.org/samba/patches/series;
+# Path to the series file and patches
+test ${PATCH_DIR} || \
+   PATCH_DIR=http://www.samba.org/samba/patches;
+test $1 
+   SERIES_FILE=$1 || \
+   SERIES_FILE=series
 
 if ! which wget/dev/null; then
echo Error: You have to install wget.
@@ -13,13 +42,18 @@
 test -d patches || mkdir patches
 pushd patches /dev/null
 
-wget -N $SERIES_FILE
+if ! wget -N ${PATCH_DIR}/${SERIES_FILE}; then
+   echo Error: Can not download ${PATCH_DIR}/${SERIES_FILE}
+   exit 1
+fi
+test ${SERIES_FILE} = series || \
+   ln -fs $1 series
 
 while read patch rest; do
-   case $patch in
+   case ${patch} in
\#*|) continue ;;
*)
-   wget -N http://www.samba.org/samba/patches/$patch
+   wget -N ${PATCH_DIR}/${patch}
;;
esac
 done series



svn commit: samba r9755 - in branches/SAMBA_4_0/source/scripting/ejs: .

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-29 19:08:18 + (Mon, 29 Aug 2005)
New Revision: 9755

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

Log:
Fix crash bug in SWAT login

Modified:
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c 2005-08-29 
18:52:24 UTC (rev 9754)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c 2005-08-29 
19:08:18 UTC (rev 9755)
@@ -119,6 +119,9 @@
ejsSetErrorMsg(eid, userAuth requires a 'creds' element);
return -1;
}
+
+   tmp_ctx = talloc_new(mprMemCtx());  
+   
username= cli_credentials_get_username(creds, tmp_ctx);
password= cli_credentials_get_password(creds);
domain  = cli_credentials_get_domain(creds);
@@ -126,10 +129,10 @@
 
if (username == NULL || password == NULL || domain == NULL) {
mpr_Return(eid, mprCreateUndefinedVar());
+   talloc_free(tmp_ctx);
return 0;
}
 
-   tmp_ctx = talloc_new(mprMemCtx());  
auth = mprObject(auth);
 
if (domain  strcmp(System User, domain) == 0) {



svn commit: samba-web r789 - in trunk: style support

2005-08-29 Thread deryck
Author: deryck
Date: 2005-08-29 19:37:15 + (Mon, 29 Aug 2005)
New Revision: 789

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

Log:
Support updates/additions at the request of someone with each company.

deryck
Added:
   trunk/support/holland.html
Modified:
   trunk/style/wide.css
   trunk/support/countries.html
   trunk/support/hongkong.html


Changeset:
Modified: trunk/style/wide.css
===
--- trunk/style/wide.css2005-08-29 19:04:12 UTC (rev 788)
+++ trunk/style/wide.css2005-08-29 19:37:15 UTC (rev 789)
@@ -17,6 +17,7 @@
position:absolute;
top:100px;
clear:left;
+   min-width:70%;
margin:0 1% 0 175px;
padding-top:30px;
padding-left:35px;

Modified: trunk/support/countries.html
===
--- trunk/support/countries.html2005-08-29 19:04:12 UTC (rev 788)
+++ trunk/support/countries.html2005-08-29 19:37:15 UTC (rev 789)
@@ -14,6 +14,7 @@
  lia href=france.htmlFrance/a/li
  lia href=germany.htmlGermany/a/li
  lia href=greece.htmlGreece/a/li
+ lia href=holland.htmlHolland/a/li
  lia href=hongkong.htmlHong Kong - China/a/li
  lia href=hungary.htmlHungary/a/li
  lia href=india.htmlIndia/a/li  

Added: trunk/support/holland.html
===
--- trunk/support/holland.html  2005-08-29 19:04:12 UTC (rev 788)
+++ trunk/support/holland.html  2005-08-29 19:37:15 UTC (rev 789)
@@ -0,0 +1,22 @@
+!--#include virtual=/samba/header.html -- 
+  titleSamba Commercial Support Providers -- Holland/title
+!--#include virtual=header_support.html --
+
+h2Commercial Support - Holland/h2
+hr /
+
+
+!-- Added: 29 Aug 2005 --
+presmall
+Free2use.
+Groenendaal 2
+4003 EL  Tiel
+a href=http://www.free2use.org/;www.free2use.org/a
+
+Tel: 0344-707414
+fax: 0344-707413
+/small/pre
+
+
+
+!--#include virtual=footer_support.html--

Modified: trunk/support/hongkong.html
===
--- trunk/support/hongkong.html 2005-08-29 19:04:12 UTC (rev 788)
+++ trunk/support/hongkong.html 2005-08-29 19:37:15 UTC (rev 789)
@@ -49,4 +49,29 @@
 /small/pre
 
 
+!-- Added: 29 August 2005 --
+hr /
+presmall
+WebForce Network Technology Ltd.
+ 
+16/F, Cheung kong Center, 
+2 Queen's Road, Central, Hong Kong.
+  
+Tel: +852 2788 0836
+Fax : +852 8101 2202
+Email: a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a
+URL: a href=http://www.webforce.com.hk;http://www.webforce.com.hk/a
+   
+Contact Person: Jerry Sham, 
+LPIC-2, MCSE, MCDBA
+Project Manager
+
+Samba Experience:
+WebForce is a Linux service company founded in 1996 in Hong Kong. We
+provide configuration and support services for Samba in setting up
+departmental file and print server, NT-domain (PDC and BDC) environment,
+with ACL and real time virus blocking function. 
+/small/pre
+
+
 !--#include virtual=footer_support.html --



svn commit: samba-web r790 - in trunk/patches: .

2005-08-29 Thread lmuelle
Author: lmuelle
Date: 2005-08-29 19:43:10 + (Mon, 29 Aug 2005)
New Revision: 790

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

Log:
Move quilt link to the position where we mention it first.

Modified:
   trunk/patches/index.html


Changeset:
Modified: trunk/patches/index.html
===
--- trunk/patches/index.html2005-08-29 19:37:15 UTC (rev 789)
+++ trunk/patches/index.html2005-08-29 19:43:10 UTC (rev 790)
@@ -17,13 +17,14 @@
 $ cd source
 /pre
 
-pOr use the quilt tool to apply all patches to a known series./p
+pOr use the a href=http://savannah.nongnu.org/projects/quilt;quilt/a
+tool to apply all patches to a known series./p
 
 pre$ tar zxvf samba-3.0.x.tar.gz
 $ cd samba-3.0.x
 $ wget http://www.samba.org/samba/patches/fetch-patches
 $ sh ./fetch-patches
-$ a href=http://savannah.nongnu.org/projects/quilt;quilt/a push -a
+$ quilt push -a
 $ cd source
 /pre
 



svn commit: samba-web r791 - in trunk/patches: .

2005-08-29 Thread lmuelle
Author: lmuelle
Date: 2005-08-29 19:59:33 + (Mon, 29 Aug 2005)
New Revision: 791

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

Log:
Add HTML link to fetch-patches script.

Modified:
   trunk/patches/index.html


Changeset:
Modified: trunk/patches/index.html
===
--- trunk/patches/index.html2005-08-29 19:43:10 UTC (rev 790)
+++ trunk/patches/index.html2005-08-29 19:59:33 UTC (rev 791)
@@ -22,7 +22,7 @@
 
 pre$ tar zxvf samba-3.0.x.tar.gz
 $ cd samba-3.0.x
-$ wget http://www.samba.org/samba/patches/fetch-patches
+$ wget a 
href=http://www.samba.org/samba/patches/fetch-patcheshttp://www.samba.org/samba/patches/fetch-patches/a
 $ sh ./fetch-patches
 $ quilt push -a
 $ cd source



svn commit: samba-web r792 - in trunk/news/calendar: .

2005-08-29 Thread deryck
Author: deryck
Date: 2005-08-29 20:06:19 + (Mon, 29 Aug 2005)
New Revision: 792

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

Log:
jht updates for the Team calendar.

deryck

Added:
   trunk/news/calendar/jht_chicago_05.txt
   trunk/news/calendar/jht_network_powerhouse.txt
Modified:
   trunk/news/calendar/index.html
   trunk/news/calendar/showDate.js


Changeset:
Modified: trunk/news/calendar/index.html
===
--- trunk/news/calendar/index.html  2005-08-29 19:59:33 UTC (rev 791)
+++ trunk/news/calendar/index.html  2005-08-29 20:06:19 UTC (rev 792)
@@ -165,10 +165,10 @@
/tr
tr
td14/td
-   tda href=jht_training_general.txt 
onclick=showDate(29); return false15/a/td
-   tda href=jht_training_general.txt 
onclick=showDate(29); return false16/a/td
-   tda href=jht_training_general.txt 
onclick=showDate(29); return false17/a/td
-   tda href=jht_training_general.txt 
onclick=showDate(29); return false18/a/td
+   td15/td
+   td16/td
+   td17/td
+   td18/td
td19/td
td20/td
/tr
@@ -192,10 +192,6 @@
/tr
/table
 
-   /div  !-- Close dates_l section --
-
-  div class=dates_r
-
  table class=months
tr
th colspan=7September 2005/th
@@ -212,10 +208,10 @@
 tr
td4/td
td5/td
-   tda href=jht_training_general.txt 
onclick=showDate(30); return false6/a/td
-   tda href=jht_training_general.txt 
onclick=showDate(30); return false7/a/td
-   tda href=jht_training_general.txt 
onclick=showDate(30); return false8/a/td
-   tda href=jht_training_general.txt 
onclick=showDate(30); return false9/a/td
+   td6/td
+   td7/td
+   td8/td
+   td9/td
td10/td
/tr
tr
@@ -229,11 +225,11 @@
/tr
tr
td18/td
-   td19/td
-   td20/td
-   td21/td
-   td22/td
-   td23/td
+   tda href=jht_chicago_05.txt onclick=showDate(34); 
return false19/a/td
+   tda href=jht_network_powerhouse.txt 
onclick=showDate(35); return false20/a/td
+   tda href=jht_network_powerhouse.txt 
onclick=showDate(35); return false21/a/td
+   tda href=jht_network_powerhouse.txt 
onclick=showDate(35); return false22/a/td
+   tda href=jht_network_powerhouse.txt 
onclick=showDate(35); return false23/a/td
td24/td
/tr
tr
@@ -307,6 +303,10 @@
/tr
/table
 
+   /div  !-- Close dates_l section --
+
+  div class=dates_r
+
  table class=months
tr
th colspan=7November 2005/th
@@ -331,10 +331,10 @@
/tr
tr
td13/td
-   tda href=jht_training_general.txt 
onclick=showDate(31); return false14/a/td
-   tda href=jht_training_general.txt 
onclick=showDate(31); return false15/a/td
-   tda href=jht_training_general.txt 
onclick=showDate(31); return false16/a/td
-   tda href=jht_training_general.txt 
onclick=showDate(31); return false17/a/td
+   td14/td
+   td15/td
+   td16/td
+   td17/td
td18/td
td19/td
/tr
@@ -358,6 +358,107 @@
/tr
/table
 
+ table class=months
+   tr
+   th colspan=7December 2005/th
+   /tr
+   tr
+   td/td
+ td/td
+   td/td
+   td/td
+   td1/td
+   td2/td
+   td3/td
+   /tr
+tr
+   td4/td
+   td5/td
+   td6/td
+   td7/td
+   td8/td
+   td9/td
+   td10/td
+   /tr
+   tr
+   td11/td
+   td12/td
+   td13/td
+   td14/td
+   td15/td
+   td16/td
+   td17/td
+   /tr
+   tr
+   td18/td
+   td19/td
+   td20/td
+   

Re: svn commit: samba r9752 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

2005-08-29 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[EMAIL PROTECTED] schrieb:

 figured out why talloc_steal() is a bad idea for SEC_DESC*
 Add a comment so someone else doesn't get bitten by this as well.

we hit the same problem in samba4 a few week ago,
the solution is to correctly create the SEC_DESC buffers,
and mad the sub elements childs of the main structure.

- --
metze

Stefan Metzmacher metze at samba.org www.samba.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDE2vEm70gjA5TCD8RArEIAJwMj0QuaNGiqb0SIO75B22J7dcJowCfcshD
eXaJgwU1SDOt/t2EifIecW0=
=T/Yg
-END PGP SIGNATURE-


svn commit: samba r9756 - in branches/SAMBA_4_0: source/lib/samba3 source/scripting/ejs source/scripting/libjs swat/install

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-29 20:18:51 + (Mon, 29 Aug 2005)
New Revision: 9756

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

Log:
One-way upgrade from Samba3-Samba4 basically works now
Still need to polish some rough edges

Removed:
   branches/SAMBA_4_0/source/lib/samba3/upgrade.c
Modified:
   branches/SAMBA_4_0/source/lib/samba3/config.mk
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_string.c
   branches/SAMBA_4_0/source/scripting/libjs/provision.js
   branches/SAMBA_4_0/source/scripting/libjs/upgrade.js
   branches/SAMBA_4_0/swat/install/samba3.esp


Changeset:
Sorry, the patch is too large (549 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9756


svn commit: samba r9757 - in branches/SOC/SAMBA_3_0/source: include libmsrpc

2005-08-29 Thread skel
Author: skel
Date: 2005-08-29 20:51:21 + (Mon, 29 Aug 2005)
New Revision: 9757

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

Log:
cac_SamEnableUser() and cac_SamDisableUser() now use cli_samr_set_userinfo2()


Modified:
   branches/SOC/SAMBA_3_0/source/include/libmsrpc.h
   branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c


Changeset:
Modified: branches/SOC/SAMBA_3_0/source/include/libmsrpc.h
===
--- branches/SOC/SAMBA_3_0/source/include/libmsrpc.h2005-08-29 20:18:51 UTC 
(rev 9756)
+++ branches/SOC/SAMBA_3_0/source/include/libmsrpc.h2005-08-29 20:51:21 UTC 
(rev 9757)
@@ -164,14 +164,17 @@
  * @defgroup sam_defs SAM Definitions
  * @{
  */
+
+#define CAC_USER_RID  0x1
+#define CAC_GROUP_RID 0x2
+
 typedef struct _CACLOOKUPRIDSRECORD {
char *name;
uint32 rid;
 
/**If found, this will be one of:
-* - USER_RID_TYPE
-* - GROUP_RID_TYPE
-* (found in include/rpc_misc.h)
+* - CAC_USER_RID
+* - CAC_GROUP_RID
 */
uint32 type;

@@ -1668,7 +1671,7 @@
   char *name;
 
   /**See Allowable account control bits in include/smb.h*/
-  uint32 acb;
+  uint32 acb_mask;
} in;
 
struct {

Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c
===
--- branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c   2005-08-29 20:18:51 UTC 
(rev 9756)
+++ branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c   2005-08-29 20:51:21 UTC 
(rev 9757)
@@ -342,7 +342,7 @@
   return CAC_FAILURE;
}
 
-   if(!op || !op-in.dom_hnd || !op-in.name || op-in.acb == 0 || !mem_ctx) {
+   if(!op || !op-in.dom_hnd || !op-in.name || op-in.acb_mask == 0 || 
!mem_ctx) {
   hnd-status = NT_STATUS_INVALID_PARAMETER;
   return CAC_FAILURE;
}
@@ -361,7 +361,7 @@
   return CAC_FAILURE;
}
 
-   hnd-status = cli_samr_create_dom_user( (srv-cli), mem_ctx, 
op-in.dom_hnd, op-in.name, op-in.acb, unknown, user_out, rid_out);
+   hnd-status = cli_samr_create_dom_user( (srv-cli), mem_ctx, 
op-in.dom_hnd, op-in.name, op-in.acb_mask, unknown, user_out, rid_out);
 
if(!NT_STATUS_IS_OK(hnd-status))
   return CAC_FAILURE;
@@ -1582,15 +1582,15 @@
srv-cli.pipe_idx = PI_SAMR;
 
/*info_level = 21 is the only level that I have found to work reliably. It 
would be nice if user_level = 10 worked.*/
-   hnd-status = cli_samr_query_userinfo( (srv-cli), mem_ctx, user_hnd, 21, 
ctr);
+   hnd-status = cli_samr_query_userinfo( (srv-cli), mem_ctx, user_hnd, 
0x10, ctr);
 
if(!NT_STATUS_IS_OK(hnd-status))
   return CAC_FAILURE;
 
/**check the ACB mask*/
-   if((ctr-info.id21-acb_info  ACB_DISABLED) == ACB_DISABLED) {
+   if((ctr-info.id10-acb_info  ACB_DISABLED) == ACB_DISABLED) {
   /*toggle the disabled bit*/
-  ctr-info.id21-acb_info ^= ACB_DISABLED;
+  ctr-info.id10-acb_info ^= ACB_DISABLED;
}
else {
   /*the user is already enabled so just return success*/
@@ -1598,8 +1598,9 @@
}
 
/*now set the userinfo*/
-   hnd-status = cli_samr_set_userinfo( (srv-cli), mem_ctx, user_hnd, 0x10, 
(srv-cli.user_session_key), ctr);
+   hnd-status = cli_samr_set_userinfo2( (srv-cli), mem_ctx, user_hnd, 0x10, 
(srv-cli.user_session_key), ctr);
 
+   /*this will only work properly if we use set_userinfo2 - fail if it is not 
supported*/
if(!NT_STATUS_IS_OK(hnd-status))
   return CAC_FAILURE;
 
@@ -1645,8 +1646,10 @@
/*toggle the disabled bit*/
ctr-info.id10-acb_info ^= ACB_DISABLED;
 
-   hnd-status = cli_samr_set_userinfo( (srv-cli), mem_ctx, user_hnd, 0x10, 
(srv-cli.user_session_key), ctr);
+   /*this will only work properly if we use set_userinfo2*/
+   hnd-status = cli_samr_set_userinfo2( (srv-cli), mem_ctx, user_hnd, 0x10, 
(srv-cli.user_session_key), ctr);
 
+   /*this will only work properly if we use set_userinfo2 fail if it is not 
supported*/
if(!NT_STATUS_IS_OK(hnd-status))
   return CAC_FAILURE;
 



svn commit: samba r9758 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

2005-08-29 Thread jerry
Author: jerry
Date: 2005-08-29 21:04:22 + (Mon, 29 Aug 2005)
New Revision: 9758

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

Log:
make sure to lower case usernames in winbindd's getpwnam()


Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_user.c
   trunk/source/nsswitch/winbindd_user.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_user.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_user.c  2005-08-29 20:51:21 UTC 
(rev 9757)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_user.c  2005-08-29 21:04:22 UTC 
(rev 9758)
@@ -230,6 +230,7 @@
const char *shell,
uint32 group_rid)
 {
+   fstring username;
struct getpwsid_state *s =
talloc_get_type_abort(private_data, struct getpwsid_state);
 
@@ -240,7 +241,9 @@
return;
}
 
-   s-username = talloc_strdup(s-state-mem_ctx, acct_name);
+   fstrcpy( username, acct_name );
+   strlower_m( username );
+   s-username = talloc_strdup(s-state-mem_ctx, username);
s-fullname = talloc_strdup(s-state-mem_ctx, full_name);
s-homedir = talloc_strdup(s-state-mem_ctx, homedir);
s-shell = talloc_strdup(s-state-mem_ctx, shell);

Modified: trunk/source/nsswitch/winbindd_user.c
===
--- trunk/source/nsswitch/winbindd_user.c   2005-08-29 20:51:21 UTC (rev 
9757)
+++ trunk/source/nsswitch/winbindd_user.c   2005-08-29 21:04:22 UTC (rev 
9758)
@@ -230,6 +230,7 @@
const char *shell,
uint32 group_rid)
 {
+   fstring username;
struct getpwsid_state *s =
talloc_get_type_abort(private_data, struct getpwsid_state);
 
@@ -240,7 +241,9 @@
return;
}
 
-   s-username = talloc_strdup(s-state-mem_ctx, acct_name);
+   fstrcpy( username, acct_name );
+   strlower_m( username );
+   s-username = talloc_strdup(s-state-mem_ctx, username);
s-fullname = talloc_strdup(s-state-mem_ctx, full_name);
s-homedir = talloc_strdup(s-state-mem_ctx, homedir);
s-shell = talloc_strdup(s-state-mem_ctx, shell);



svn commit: samba-web r793 - in trunk/patches: .

2005-08-29 Thread jerry
Author: jerry
Date: 2005-08-29 21:06:08 + (Mon, 29 Aug 2005)
New Revision: 793

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

Log:
updating winbindd patch
Modified:
   trunk/patches/winbindd_v1.patch


Changeset:
Modified: trunk/patches/winbindd_v1.patch
===
--- trunk/patches/winbindd_v1.patch 2005-08-29 20:06:19 UTC (rev 792)
+++ trunk/patches/winbindd_v1.patch 2005-08-29 21:06:08 UTC (rev 793)
@@ -24,6 +24,28 @@
  
SAFE_FREE(state.response.extra_data);
  
+diff -urBbN --exclude-from=diff.excludes 
samba-3.0.20-orig/source/nsswitch/winbindd_user.c 
samba-3.0.20-new/source/nsswitch/winbindd_user.c
+--- samba-3.0.20-orig/source/nsswitch/winbindd_user.c  2005-07-28 
08:19:44.0 -0500
 samba-3.0.20-new/source/nsswitch/winbindd_user.c   2005-08-29 
16:04:22.0 -0500
+@@ -230,6 +230,7 @@
+   const char *shell,
+   uint32 group_rid)
+ {
++  fstring username;
+   struct getpwsid_state *s =
+   talloc_get_type_abort(private_data, struct getpwsid_state);
+ 
+@@ -240,7 +241,9 @@
+   return;
+   }
+ 
+-  s-username = talloc_strdup(s-state-mem_ctx, acct_name);
++  fstrcpy( username, acct_name );
++  strlower_m( username );
++  s-username = talloc_strdup(s-state-mem_ctx, username);
+   s-fullname = talloc_strdup(s-state-mem_ctx, full_name);
+   s-homedir = talloc_strdup(s-state-mem_ctx, homedir);
+   s-shell = talloc_strdup(s-state-mem_ctx, shell);
 diff -urBbN --exclude-from=diff.excludes 
samba-3.0.20-orig/source/nsswitch/winbindd_util.c 
samba-3.0.20-new/source/nsswitch/winbindd_util.c
 --- samba-3.0.20-orig/source/nsswitch/winbindd_util.c  2005-07-28 
08:19:44.0 -0500
 +++ samba-3.0.20-new/source/nsswitch/winbindd_util.c   2005-08-29 
13:34:16.0 -0500



svn commit: samba r9759 - in branches/SAMBA_4_0/swat: desktop scripting/client

2005-08-29 Thread deryck
Author: deryck
Date: 2005-08-29 21:15:04 + (Mon, 29 Aug 2005)
New Revision: 9759

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

Log:
Create some wrappers for QxWidget.  This gives us some pre-fabbed
windows, which set size and positioning.

To use:

var myWin = new Window.large(Some Window Title);
var myWin = new Window.standard(Some Window Title);
var myWin = new Window.small(Some Window Title);

You can omit the title if you don't need one.  Also,
var myWin = new Window();  will give you the random
positioning and no predetermined sizing.

deryck

Modified:
   branches/SAMBA_4_0/swat/desktop/index.esp
   branches/SAMBA_4_0/swat/scripting/client/desktop.js


Changeset:
Modified: branches/SAMBA_4_0/swat/desktop/index.esp
===
--- branches/SAMBA_4_0/swat/desktop/index.esp   2005-08-29 21:04:22 UTC (rev 
9758)
+++ branches/SAMBA_4_0/swat/desktop/index.esp   2005-08-29 21:15:04 UTC (rev 
9759)
@@ -44,7 +44,7 @@
 
 function blankW()
 {
-   var blank = new Window(SWAT);
+   var blank = new Window.standard('SWAT');
w.add(blank);
blank.setVisible(true);
 }
@@ -105,7 +105,6 @@
}
w.add(win);
getServerStatus(win);
-   
 }
 
 window.onresize = function() 

Modified: branches/SAMBA_4_0/swat/scripting/client/desktop.js
===
--- branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-08-29 21:04:22 UTC 
(rev 9758)
+++ branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-08-29 21:15:04 UTC 
(rev 9759)
@@ -11,6 +11,7 @@
 revisited for fuller browser coverage. */
 var browser = QxClient().engine;
 
+// DocX/Y returns the width/height of the page in browser
 function docX()
 {
var x;
@@ -34,27 +35,42 @@
return y;
 }
 
-function sizeX()
+//  If given a number, sizeX/Y returns in pixels a percentage of the browser
+//  window. If given a Window object, sizeX/Y returns the size of that object. 
+function sizeX(s)
 {
-   var sX = Math.floor(docX() * .45);
+   var sX;
+
+   if (typeof(s) == 'number') {
+   sX = Math.floor(docX() * s);
+   } else {
+   sX = s.getMinWidth();
+   }
+
return sX;
 }
 
-function sizeY()
+function sizeY(s)
 {
-   var sY = Math.floor(docY() * .45);
+   var sY;
+   if (typeof(s) == 'number') {
+   sY = Math.floor(docY() * s);
+   } else {
+   sY = s.getMinHeight();
+   }
+
return sY;
 }
 
-function getPosX()
+function getPosX(win)
 {
-   var y = Math.floor( (docY() - sizeY()) * Math.random() );
+   var y = Math.floor( (docY() - sizeY(win)) * Math.random() );
return y;
 }
 
-function getPosY()
+function getPosY(win)
 {
-   var x = Math.floor( (docX() - sizeX()) * Math.random() );
+   var x = Math.floor( (docX() - sizeX(win)) * Math.random() );
return x;
 }
 
@@ -85,15 +101,41 @@
inset.setVisible(true);
 }
 
-function Window(title)
+function Window(h, src, s)
 {
-   var self = new QxWindow(title);
-   self.setTop(getPosX());
-   self.setLeft(getPosY());
-   self.setMinWidth(sizeX());
-   self.setMinHeight(sizeY());
-   self.addEventListener(contextmenu, winMenu);
-   return self;
+   this.self = new QxWindow(h);
+
+   // Settings for all windows
+   if (s) {
+   this.self.setMinWidth(sizeX(s));
+   this.self.setMinHeight(sizeY(s));
+   }
+   this.self.setTop(getPosX(this.self));
+   this.self.setLeft(getPosY(this.self));
+
+   this.self.addEventListener(contextmenu, winMenu);
+
+   return this.self;
 }
 
+function SmallWindow(h, src)
+{
+   this.self = new Window(h, src, .20);
+   return this.self;
+}
 
+function StandardWindow(h, src)
+{
+   this.self = new Window(h, src, .45);
+   return this.self;
+}
+
+function LargeWindow(h, src)
+{
+   this.self = new Window(h, src, .70);
+   return this.self;
+}
+
+Window.small = SmallWindow;
+Window.standard = StandardWindow;
+Window.large = LargeWindow;



svn commit: samba-web r794 - in trunk/patches: .

2005-08-29 Thread jmcd
Author: jmcd
Date: 2005-08-29 21:20:56 + (Mon, 29 Aug 2005)
New Revision: 794

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

Log:
Fix typos.

Modified:
   trunk/patches/index.html


Changeset:
Modified: trunk/patches/index.html
===
--- trunk/patches/index.html2005-08-29 21:06:08 UTC (rev 793)
+++ trunk/patches/index.html2005-08-29 21:20:56 UTC (rev 794)
@@ -49,9 +49,9 @@
   /tr
   tr
 tda href=/samba/patches/groupname_enumeration_v3.patchgroup_enum_v3 
(ldap)/a/td
-tdFixes a regression in which groups in the mapping table where 
displayed by the 
-Unix group name and no the display name (e.g. ntadmin rather that 
'Domain Admins').
-Only neede for installations using the ldapsam passdb backend./td
+tdFixes a regression in which groups in the mapping table were displayed 
by the 
+Unix group name and not the display name (e.g. ntadmin rather that 
'Domain Admins').
+Only needed for installations using the ldapsam passdb backend./td
   /tr
   tr
 tda href=/samba/patches/bug3010_v1.patchAIX 5 amp; Win98 endless 
directory loop/a/td



svn commit: samba r9760 - in branches/tmp/RPCREWRITE/source/nsswitch: .

2005-08-29 Thread jra
Author: jra
Date: 2005-08-29 21:21:36 + (Mon, 29 Aug 2005)
New Revision: 9760

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

Log:
Keep up to date.
Jeremy.

Modified:
   branches/tmp/RPCREWRITE/source/nsswitch/winbindd_user.c


Changeset:
Modified: branches/tmp/RPCREWRITE/source/nsswitch/winbindd_user.c
===
--- branches/tmp/RPCREWRITE/source/nsswitch/winbindd_user.c 2005-08-29 
21:15:04 UTC (rev 9759)
+++ branches/tmp/RPCREWRITE/source/nsswitch/winbindd_user.c 2005-08-29 
21:21:36 UTC (rev 9760)
@@ -230,6 +230,7 @@
const char *shell,
uint32 group_rid)
 {
+   fstring username;
struct getpwsid_state *s =
talloc_get_type_abort(private_data, struct getpwsid_state);
 
@@ -240,7 +241,9 @@
return;
}
 
-   s-username = talloc_strdup(s-state-mem_ctx, acct_name);
+   fstrcpy( username, acct_name );
+   strlower_m( username );
+   s-username = talloc_strdup(s-state-mem_ctx, username);
s-fullname = talloc_strdup(s-state-mem_ctx, full_name);
s-homedir = talloc_strdup(s-state-mem_ctx, homedir);
s-shell = talloc_strdup(s-state-mem_ctx, shell);



svn commit: samba r9761 - in branches/SAMBA_4_0/swat: desktop scripting/client

2005-08-29 Thread deryck
Author: deryck
Date: 2005-08-29 21:28:48 + (Mon, 29 Aug 2005)
New Revision: 9761

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

Log:
Move initial widget setup to desktop library.  Now, just by including
desktop.js, you get the basic desktop layout.

deryck

Modified:
   branches/SAMBA_4_0/swat/desktop/index.esp
   branches/SAMBA_4_0/swat/scripting/client/desktop.js


Changeset:
Modified: branches/SAMBA_4_0/swat/desktop/index.esp
===
--- branches/SAMBA_4_0/swat/desktop/index.esp   2005-08-29 21:21:36 UTC (rev 
9760)
+++ branches/SAMBA_4_0/swat/desktop/index.esp   2005-08-29 21:28:48 UTC (rev 
9761)
@@ -7,6 +7,7 @@
 script type=text/javascript src=/scripting/client/call.js/script
 script type=text/javascript src=/scripting/client/js_scripts.js/script
 script type=text/javascript src=/scripting/client/desktop.js/script
+script type=text/javascript src=/scripting/client/status.js/script
 
 script type=text/javascript
 
@@ -73,46 +74,23 @@
cmenu.setVisible(true);
 }
 
-/*** init the page for qooxdoo ***/
+// Always open with stats
+var win = new QxWindow();
 document.js.add('/scripting/client/status.js');
-window.application.main = function()
+win._onclosebuttonclick = function(e)
 {
-   var doc = this.getClientWindow().getClientDocument();
-   // Don't declare local with var
-   w = new QxWidget();
-   with(w) {
-   setTop(0);
-   setLeft(0);
-   setWidth(docX());
-   setHeight(docY());
-   }
-   doc.addEventListener(contextmenu, showContextMenu);
-   doc.add(w);
-
-
-   // Always open with stats
-   var win = new QxWindow();
-   win._onclosebuttonclick = function(e)
-   {
-   this.close();
-   e.stopPropagation();
-   document.js.remove('/scripting/client/status.js');
-   };
-   with(win) {
-   setTop(50);
-   setRight(50);
-   setHeight(175);
-   }
-   w.add(win);
-   getServerStatus(win);
+   this.close();
+   e.stopPropagation();
+   document.js.remove('/scripting/client/status.js');
+};
+with(win) {
+   setTop(50);
+   setRight(50);
+   setHeight(175);
 }
+w.add(win);
+getServerStatus(win);
 
-window.onresize = function() 
-{
-   w.setWidth(docX());
-   w.setHeight(docY());
-}
-
 function showReg()
 {
document.js.add('/scripting/client/regedit.js');

Modified: branches/SAMBA_4_0/swat/scripting/client/desktop.js
===
--- branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-08-29 21:21:36 UTC 
(rev 9760)
+++ branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-08-29 21:28:48 UTC 
(rev 9761)
@@ -6,6 +6,15 @@
 */
 
 
+// The global widget we attach everything to
+var w = new QxWidget();
+with(w) {
+   setTop(0);
+   setLeft(0);
+   setWidth(docX());
+   setHeight(docY());
+}
+
 /* Qooxdoo's browser sniffer doesn't distinguish IE version.
 We'll cover IE 6 for now, but these checks need to be
 revisited for fuller browser coverage. */
@@ -139,3 +148,17 @@
 Window.small = SmallWindow;
 Window.standard = StandardWindow;
 Window.large = LargeWindow;
+
+window.application.main = function()
+{
+   var doc = this.getClientWindow().getClientDocument();
+   doc.addEventListener(contextmenu, showContextMenu);
+   doc.add(w);
+}
+
+window.onresize = function() 
+{
+   w.setWidth(docX());
+   w.setHeight(docY());
+}
+



Re: svn commit: samba r9752 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

2005-08-29 Thread Gerald (Jerry) Carter

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stefan (metze) Metzmacher wrote:
| [EMAIL PROTECTED] schrieb:
|
|figured out why talloc_steal() is a bad idea for SEC_DESC*
|Add a comment so someone else doesn't get bitten by this as well.
|
| we hit the same problem in samba4 a few week ago,
| the solution is to correctly create the SEC_DESC buffers,
| and mad the sub elements childs of the main structure.

so then is talloc_steal supposed to move a pointer and
all its children from one context to another?  Or just
the pointer itself.  If I ensure that the members of
SEC_DESC are create from the top level SEC_DESC pointer,
talloc_steal() would work?







cheers, jerry
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDE4ENIR7qMdg1EfYRAgmxAJ4y1LNH/bYP/wrgvqH4xyMLqShVfgCfRHG6
9/A6kzepTaG3rB8EhEcJqVM=
=5i1t
-END PGP SIGNATURE-


svn commit: samba r9762 - in branches/SAMBA_4_0/source: lib/samba3 scripting/ejs scripting/libjs

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-29 22:01:18 + (Mon, 29 Aug 2005)
New Revision: 9762

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

Log:
Add support for reading good old smbpasswd files
Fix password support
Make base64 decode/encode functions available to EJS

Modified:
   branches/SAMBA_4_0/source/lib/samba3/samba3.h
   branches/SAMBA_4_0/source/lib/samba3/smbpasswd.c
   branches/SAMBA_4_0/source/lib/samba3/tdbsam.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_samba3.c
   branches/SAMBA_4_0/source/scripting/libjs/upgrade.js


Changeset:
Sorry, the patch is too large (504 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9762


svn commit: samba r9763 - in branches/SAMBA_4_0/swat: desktop scripting/client

2005-08-29 Thread deryck
Author: deryck
Date: 2005-08-29 22:04:11 + (Mon, 29 Aug 2005)
New Revision: 9763

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

Log:
Add the start bar as a widget from the
desktop file.  This is more portable to IE, though
there are still some IE issues hanging around.

deryck
Modified:
   branches/SAMBA_4_0/swat/desktop/index.esp
   branches/SAMBA_4_0/swat/scripting/client/desktop.js


Changeset:
Modified: branches/SAMBA_4_0/swat/desktop/index.esp
===
--- branches/SAMBA_4_0/swat/desktop/index.esp   2005-08-29 22:01:18 UTC (rev 
9762)
+++ branches/SAMBA_4_0/swat/desktop/index.esp   2005-08-29 22:04:11 UTC (rev 
9763)
@@ -8,6 +8,7 @@
 script type=text/javascript src=/scripting/client/js_scripts.js/script
 script type=text/javascript src=/scripting/client/desktop.js/script
 script type=text/javascript src=/scripting/client/status.js/script
+script type=text/javascript src=/scripting/client/regedit.js/script
 
 script type=text/javascript
 
@@ -115,7 +116,7 @@
regWin.setVisible('true');
 }
 
-function startSwat()
+function startMenu() 
 {
var sMenu = new QxMenu;
with(sMenu) {
@@ -204,8 +205,4 @@
 }
 /script
 
-div id=toolbar
-h3a href=javascript:startSwat()SWAT (Start)/a/h3
-/div
-
 % page_footer(); %

Modified: branches/SAMBA_4_0/swat/scripting/client/desktop.js
===
--- branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-08-29 22:01:18 UTC 
(rev 9762)
+++ branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-08-29 22:04:11 UTC 
(rev 9763)
@@ -35,9 +35,8 @@
 function docY()
 {
var y;
-   // Less 25px to not cover the toolbar
if (browser != mshtml) {
-   y = window.innerHeight - 25;
+   y = window.innerHeight;
} else {
y = document.documentElement.clientHeight;
}
@@ -154,6 +153,23 @@
var doc = this.getClientWindow().getClientDocument();
doc.addEventListener(contextmenu, showContextMenu);
doc.add(w);
+
+   var bar = new QxMenuBar;
+   with (bar) {
+   setBottom(0);
+   setLeft(0);
+   setWidth(100%);
+   setHeight(25);
+   setBackgroundColor(ThreeDFace);
+   }
+
+   var start = new QxMenuButton(START);
+   start.addEventListener(click, function() {
+   startMenu();
+   });
+   bar.add(start);
+
+   w.add(bar);
 }
 
 window.onresize = function() 



svn commit: samba r9764 - in branches/SOC/SAMBA_3_0/source: include libmsrpc

2005-08-29 Thread skel
Author: skel
Date: 2005-08-29 23:03:14 + (Mon, 29 Aug 2005)
New Revision: 9764

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

Log:
cac_SamSetUserInfo() now works with a SAM_USER_INFO_21 instead of 
SAM_USER_INFO_23


Modified:
   branches/SOC/SAMBA_3_0/source/include/libmsrpc.h
   branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c
   branches/SOC/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c


Changeset:
Modified: branches/SOC/SAMBA_3_0/source/include/libmsrpc.h
===
--- branches/SOC/SAMBA_3_0/source/include/libmsrpc.h2005-08-29 22:04:11 UTC 
(rev 9763)
+++ branches/SOC/SAMBA_3_0/source/include/libmsrpc.h2005-08-29 23:03:14 UTC 
(rev 9764)
@@ -254,9 +254,6 @@
/**Possible logon hours*/
LOGON_HRS *logon_hours;
 
-   /**this must be set when calling cac_SamSetUserInfo()*/
-   char *new_password;
-   
 } CacUserInfo;
 
 typedef struct _CACGROUPINFO {

Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c
===
--- branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c   2005-08-29 22:04:11 UTC 
(rev 9763)
+++ branches/SOC/SAMBA_3_0/source/libmsrpc/cac_samr.c   2005-08-29 23:03:14 UTC 
(rev 9764)
@@ -1776,11 +1776,11 @@
srv-cli.pipe_idx = PI_SAMR;
 
if(hnd-_internal.srv_level = SRV_WIN_NT4) {
-  hnd-status = cli_samr_set_userinfo2( (srv-cli), mem_ctx, 
op-in.user_hnd, 23, (srv-cli.user_session_key), ctr);
+  hnd-status = cli_samr_set_userinfo2( (srv-cli), mem_ctx, 
op-in.user_hnd, 21, (srv-cli.user_session_key), ctr);
}
 
if(hnd-_internal.srv_level  SRV_WIN_NT4 || !NT_STATUS_IS_OK(hnd-status)) 
{
-  hnd-status = cli_samr_set_userinfo( (srv-cli), mem_ctx, 
op-in.user_hnd, 23, (srv-cli.user_session_key), ctr);
+  hnd-status = cli_samr_set_userinfo( (srv-cli), mem_ctx, 
op-in.user_hnd, 21, (srv-cli.user_session_key), ctr);
 
   if(NT_STATUS_IS_OK(hnd-status)  hnd-_internal.srv_level  
SRV_WIN_NT4) {
  hnd-_internal.srv_level = SRV_WIN_NT4;

Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c
===
--- branches/SOC/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c  2005-08-29 
22:04:11 UTC (rev 9763)
+++ branches/SOC/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c  2005-08-29 
23:03:14 UTC (rev 9764)
@@ -310,7 +310,16 @@
NTTIME pass_can_change_time;
NTTIME pass_must_change_time;
 
-   uchar pw[516];
+   UNISTR2 user_name;
+   UNISTR2 full_name;
+   UNISTR2 home_dir;
+   UNISTR2 dir_drive;
+   UNISTR2 log_scr;
+   UNISTR2 prof_path;
+   UNISTR2 desc;
+   UNISTR2 wkstas;
+   UNISTR2 mung_dial;
+   UNISTR2 unk;
 
ctr = talloc(mem_ctx, SAM_USERINFO_CTR);
if(!ctr)
@@ -318,13 +327,13 @@
 
ZERO_STRUCTP(ctr-info.id23);
 
-   ctr-info.id23 = talloc(mem_ctx, SAM_USER_INFO_23);
-   if(!ctr-info.id23)
+   ctr-info.id21 = talloc(mem_ctx, SAM_USER_INFO_21);
+   if(!ctr-info.id21)
   return NULL;
 
-   ctr-switch_value = 23;
+   ctr-switch_value = 21;
 
-   ZERO_STRUCTP(ctr-info.id23);
+   ZERO_STRUCTP(ctr-info.id21);
 
unix_to_nt_time(logon_time, info-logon_time);
unix_to_nt_time(logoff_time, info-logoff_time);
@@ -333,28 +342,40 @@
unix_to_nt_time(pass_can_change_time, info-pass_can_change_time);
unix_to_nt_time(pass_must_change_time, info-pass_must_change_time);
 
-   encode_pw_buffer(pw, info-new_password, STR_UNICODE);
-   
+   /*initialize the strings*/
+   init_unistr2(user_name, info-username, STR_TERMINATE);
+   init_unistr2(full_name, info-full_name, STR_TERMINATE);
+   init_unistr2(home_dir, info-home_dir, STR_TERMINATE);
+   init_unistr2(dir_drive, info-home_drive, STR_TERMINATE);
+   init_unistr2(log_scr, info-logon_script, STR_TERMINATE);
+   init_unistr2(prof_path, info-profile_path, STR_TERMINATE);
+   init_unistr2(desc, info-description, STR_TERMINATE);
+   init_unistr2(wkstas, info-workstations, STR_TERMINATE);
+   init_unistr2(unk, \0, STR_TERMINATE);
+   init_unistr2(mung_dial, info-dial, STR_TERMINATE);
+
/*manually set passmustchange*/
-   ctr-info.id23-passmustchange = (info-pass_must_change) ? 0x01 : 0x00;
+   ctr-info.id21-passmustchange = (info-pass_must_change) ? 0x01 : 0x00;
 
-   init_sam_user_info23A(ctr-info.id23,
+   init_sam_user_info21W(ctr-info.id21,
  logon_time,
  logoff_time,
  kickoff_time,
  pass_last_set_time,
  pass_can_change_time,
  pass_must_change_time,
- info-username,
- info-full_name,
- info-home_dir,
- info-home_drive,
- info-logon_script,
- info-profile_path,
- info-description,
- info-workstations,
-

svn commit: samba r9765 - in branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr: .

2005-08-29 Thread skel
Author: skel
Date: 2005-08-29 23:05:26 + (Mon, 29 Aug 2005)
New Revision: 9765

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

Log:
added create account/group functions and some of the user functionality


Added:
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/mgr_group.c
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/mgr_user.c
Modified:
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/Makefile
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/cacusermgr.c
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/cacusermgr.h
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/util.c


Changeset:
Sorry, the patch is too large (764 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9765


svn commit: samba r9766 - in branches/SAMBA_4_0/source/lib/ldb/common: .

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-29 23:20:40 + (Mon, 29 Aug 2005)
New Revision: 9766

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

Log:
Prevent erroneous OOM message
ldb_dup_val() sets out-data to NULL if in-length == 0

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c  2005-08-29 
23:05:26 UTC (rev 9765)
+++ branches/SAMBA_4_0/source/lib/ldb/common/attrib_handlers.c  2005-08-29 
23:20:40 UTC (rev 9766)
@@ -38,7 +38,7 @@
 const struct ldb_val *in, struct ldb_val *out)
 {
*out = ldb_val_dup(mem_ctx, in);
-   if (out-data == NULL) {
+   if (in-length  0  out-data == NULL) {
ldb_oom(ldb);
return -1;
}



Build status as of Tue Aug 30 00:00:01 2005

2005-08-29 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2005-08-29 
00:00:11.0 +
+++ /home/build/master/cache/broken_results.txt 2005-08-30 00:00:10.0 
+
@@ -1,17 +1,17 @@
-Build status as of Mon Aug 29 00:00:02 2005
+Build status as of Tue Aug 30 00:00:01 2005
 
 Build counts:
 Tree Total  Broken Panic 
-ccache   37 5  0 
-distcc   37 4  0 
-lorikeet-heimdal 34 33 0 
+ccache   38 5  0 
+distcc   38 4  0 
+lorikeet-heimdal 34 34 0 
 ppp  25 0  0 
-rsync37 2  0 
+rsync38 2  0 
 samba0  0  0 
 samba-docs   0  0  0 
-samba4   45 26 0 
-samba_3_039 8  0 
+samba4   45 25 0 
+samba_3_039 9  0 
 smb-build32 2  0 
-talloc   35 9  0 
-tdb  35 13 0 
+talloc   36 11 0 
+tdb  36 14 0 
 


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

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-30 00:25:46 + (Tue, 30 Aug 2005)
New Revision: 9767

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

Log:
Fix typo

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c   2005-08-29 
23:20:40 UTC (rev 9766)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c   2005-08-30 
00:25:46 UTC (rev 9767)
@@ -541,7 +541,7 @@
 
ldb_debug(module-ldb, LDB_DEBUG_TRACE, samldb_add_record\n);
 
-   if (strcmp(msg-dn-components[0].name, @SPEACIAL) == 0) { /* do not 
manipulate our control entries */
+   if (strcmp(msg-dn-components[0].name, LDB_SPECIAL) == 0) { /* do not 
manipulate our control entries */
return ldb_next_add_record(module, msg);
}
 



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

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-30 00:26:44 + (Tue, 30 Aug 2005)
New Revision: 9768

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

Log:
Arrrgh.. Right this time.

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c   2005-08-30 
00:25:46 UTC (rev 9767)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/samldb.c   2005-08-30 
00:26:44 UTC (rev 9768)
@@ -541,7 +541,7 @@
 
ldb_debug(module-ldb, LDB_DEBUG_TRACE, samldb_add_record\n);
 
-   if (strcmp(msg-dn-components[0].name, LDB_SPECIAL) == 0) { /* do not 
manipulate our control entries */
+   if (strcmp(msg-dn-components[0].name, @SPECIAL) == 0) { /* do not 
manipulate our control entries */
return ldb_next_add_record(module, msg);
}
 



svn commit: samba r9769 - in branches/SAMBA_4_0: . source/lib/tdb/common

2005-08-29 Thread tridge
Author: tridge
Date: 2005-08-30 00:36:12 + (Tue, 30 Aug 2005)
New Revision: 9769

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

Log:
 [EMAIL PROTECTED]:  tridge | 2005-08-30 10:40:19 +1000
 added a tdb optimisation that speeds up non-indexed ldb by a large
 margin (often 10x or more). I'd be interested in any comments on the
 safety of this optimisation. See the comment in the code for an
 explanation.
 

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/tdb/common/tdb.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: svk:merge
   - a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11080
   + a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11592

Modified: branches/SAMBA_4_0/source/lib/tdb/common/tdb.c
===
--- branches/SAMBA_4_0/source/lib/tdb/common/tdb.c  2005-08-30 00:26:44 UTC 
(rev 9768)
+++ branches/SAMBA_4_0/source/lib/tdb/common/tdb.c  2005-08-30 00:36:12 UTC 
(rev 9769)
@@ -1250,6 +1250,43 @@
 
/* Lock each chain from the start one. */
for (; tlock-hash  tdb-header.hash_size; tlock-hash++) {
+
+   /* this is an optimisation for the common case where
+  the hash chain is empty, which is particularly
+  common for the use of tdb with ldb, where large
+  hashes are used. In that case we spend most of our
+  time in tdb_brlock(), locking empty hash chains.
+
+  To avoid this, we do an unlocked pre-check to see
+  if the hash chain is empty before starting to look
+  inside it. If it is empty then we can avoid that
+  hash chain. If it isn't empty then we can't believe
+  the value we get back, as we read it without a
+  lock, so instead we get the lock and re-fetch the
+  value below.
+
+  Notice that not doing this optimisation on the
+  first hash chain is critical. We must guarantee
+  that we have done at least one fcntl lock at the
+  start of a search to guarantee that memory is
+  coherent on SMP systems. If records are added by
+  others during the search then thats OK, and we
+  could possibly miss those with this trick, but we
+  could miss them anyway without this trick, so the
+  semantics don't change.
+
+  With a non-indexed ldb search this trick gains us a
+  factor of more than 10 in speed on a linux 2.6.x
+  system.
+*/
+   if (!tlock-off  tlock-hash != 0) {
+   u32 off;
+   if (ofs_read(tdb, TDB_HASH_TOP(tlock-hash), off) == 0 

+   off == 0) {
+   continue;
+   }
+   }
+
if (tdb_lock(tdb, tlock-hash, F_WRLCK) == -1)
return -1;
 



svn commit: samba r9770 - in branches/SAMBA_4_0/source: lib/ldb/ldb_map lib/ldb/tests lib/samba3 scripting/ejs scripting/libjs

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-30 00:41:02 + (Tue, 30 Aug 2005)
New Revision: 9770

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

Log:
Couple other bugfixes
Update TODO-list

Modified:
   branches/SAMBA_4_0/source/lib/ldb/ldb_map/ldb_map.c
   branches/SAMBA_4_0/source/lib/ldb/tests/samba3.ldif
   branches/SAMBA_4_0/source/lib/ldb/tests/test-samba3sam.sh
   branches/SAMBA_4_0/source/lib/samba3/PLAN
   branches/SAMBA_4_0/source/lib/samba3/tdbsam.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_ldb.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_samba3.c
   branches/SAMBA_4_0/source/scripting/libjs/provision.js
   branches/SAMBA_4_0/source/scripting/libjs/upgrade.js


Changeset:
Sorry, the patch is too large (491 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9770


svn commit: samba r9771 - in branches/SAMBA_4_0/source/lib/ldb/common: .

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-30 00:43:26 + (Tue, 30 Aug 2005)
New Revision: 9771

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

Log:
- Prevent ldb crash when a invalid DN is added
- Don't silently drop records with empty attributes

tridge/simo: Could you please verify this patch is correct?

Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_ldif.c
   branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c   2005-08-30 
00:41:02 UTC (rev 9770)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_attributes.c   2005-08-30 
00:43:26 UTC (rev 9771)
@@ -66,7 +66,7 @@
 {
*out = ldb_val_dup(mem_ctx, in);
 
-   if (out-length == 0) {
+   if (out-data == NULL  in-data != NULL) {
return -1;
}
 

Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_ldif.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_ldif.c 2005-08-30 00:41:02 UTC 
(rev 9770)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_ldif.c 2005-08-30 00:43:26 UTC 
(rev 9771)
@@ -590,6 +590,12 @@
 
msg-dn = ldb_dn_explode(msg, value.data);
 
+   if (msg-dn == NULL) {
+   ldb_debug(ldb, LDB_DEBUG_ERROR, Error: Unable to parse dn 
'%s'\n, 
+ value.data);
+   goto failed;
+   }
+
while (next_attr(ldif, s, attr, value) == 0) {
const struct ldb_attrib_handler *h; 
struct ldb_message_element *el;

Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c  2005-08-30 00:41:02 UTC 
(rev 9770)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_msg.c  2005-08-30 00:43:26 UTC 
(rev 9771)
@@ -99,7 +99,7 @@
 {
struct ldb_val v2;
v2.length = v-length;
-   if (v-length == 0) {
+   if (v-data == NULL) {
v2.data = NULL;
return v2;
}



svn commit: samba r9772 - in branches/SAMBA_4_0/source: gtk/common lib lib/cmdline utils

2005-08-29 Thread abartlet
Author: abartlet
Date: 2005-08-30 01:19:41 + (Tue, 30 Aug 2005)
New Revision: 9772

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

Log:
Make credentials callbacks more consistant with the abstraction
function interface used in the credentials code.

Fix bug in ntlm_auth, where we would overwrite the PW specified as a
first input.  (Reported and chased by Kai Blin [EMAIL PROTECTED], bug
#3040)

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/gtk/common/credentials.c
   branches/SAMBA_4_0/source/lib/cmdline/credentials.c
   branches/SAMBA_4_0/source/lib/credentials.c
   branches/SAMBA_4_0/source/utils/ntlm_auth.c


Changeset:
Sorry, the patch is too large (480 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9772


svn commit: smb-build r25 - in trunk/testprog: .

2005-08-29 Thread tpot
Author: tpot
Date: 2005-08-30 01:23:44 + (Tue, 30 Aug 2005)
New Revision: 25

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=smb-buildrev=25

Log:
Break the build.

Modified:
   trunk/testprog/testprog.c


Changeset:
Modified: trunk/testprog/testprog.c
===
--- trunk/testprog/testprog.c   2005-08-03 01:05:01 UTC (rev 24)
+++ trunk/testprog/testprog.c   2005-08-30 01:23:44 UTC (rev 25)
@@ -1,3 +1,4 @@
+foo
 #include includes.h
 
 #ifndef TESTPROG_FLAGS



svn commit: samba-web r795 - in trunk/devel: .

2005-08-29 Thread abartlet
Author: abartlet
Date: 2005-08-30 01:25:50 + (Tue, 30 Aug 2005)
New Revision: 795

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

Log:
A first cut at updating the Samba4 status page.  Comments/patches welcome.



Modified:
   trunk/devel/roadmap-4.0.html


Changeset:
Modified: trunk/devel/roadmap-4.0.html
===
--- trunk/devel/roadmap-4.0.html2005-08-29 21:20:56 UTC (rev 794)
+++ trunk/devel/roadmap-4.0.html2005-08-30 01:25:50 UTC (rev 795)
@@ -4,11 +4,29 @@
 
 h2 align=centerRoadmap to Samba 4.0.0/h2 
 
-p align=rightemPage Last Updated/em: 24 February 2005/p
+p align=rightemPage Last Updated/em: 30 Aug 2005/p
 
 h3Samba4/h3
 
-pWhat is Samba 4 meant to accomplish?  In simplest terms, Samba 4 is an 
ambitious, yet achievable, reworking of the Samba code.  Major features for 
Samba 4 will include: protocol completeness, extreme testability, non-POSIX 
backends, fully asynchronous internals, flexible process models, auto-generated 
RPC infrastructure, and flexible database architecture./p
+pWhat is Samba 4 meant to accomplish?  In simplest terms, Samba 4 is
+an ambitious, yet achievable, reworking of the Samba code.  Major
+features for Samba 4 already include: /p
+ ul
+  lisupport of the 'Active Directory'
+logon and administration protocols/li
+  linew 'full coverage' testsuites/li
+  lifull NTFS semantics for sharing backends/li
+  liInternal LDAP server, with AD semantics/li
+  liInternal Kerberos server, including PAC support/li
+  lifully asynchronous internalsli
+  liflexible process models/li
+  libetter scalablilty from micro to very large installations/li
+  linew RPC infrastructure (PIDL)/li
+  liflexible database architecture (LDB)/li
+  liembedded scripting language (ejs)/li
+  ligeneric security subsystem (GENSEC)/li
+  liover 50% auto-generated code!/li
+/ul
 
 pOne of the goals of Samba4 is to implement an Active Directory compatible 
Domain
 Controller.  Andrew Bartlett has written an excellent thesis on issues involved
@@ -17,13 +35,18 @@
 a href=http://news.samba.org/;news.samba.org/a and is available 
 a href=/samba/news/articles/abartlet_thesis.pdfhere (in PDF)/a./p
 
+h3Current Status/h3
 pVolker Lendecke has also written an excellent 
 a href=/samba/news/articles/samba4_vl.pdfAdvances in Samba4/a paper (in 
PDF),
-and Tridge has some slides on Samba4 available  
-a href=/samba/ftp/slides/here/a./p
-  
+and in May 2005, Tridge gave a 
+a href=http://samba.org/ftp/samba/slides/tridge_sambaxp05.pdf;Samba4
+Progress report and Roadmap/a.  Since that time, we have implemented
+an embedded web server, a KDC and made vast improvements to the
+embedded LDAP server./p  
 
-h3Current Status/h3
+pIn short, you can join a WinNT, Win2000, WinXP or Win2003 member
+server to a Samba4 domain, and it will behave much as it does in AD,
+including Kerberos domain logins where applicable.  /p
 
 pSamba4 development is moving very rapidly, but there is still much work to 
be
 done.  A date has not been set for an official release, but the current source 
is
@@ -32,7 +55,6 @@
 Samba4's websvn pages/a.  For more info on obtaining the sources via a 
Subversion
 client, see the a href=/samba/develsamba.org devel page/a./p
 
-
 h3Roadmap Overview/h3
 
 pSince Samba4 is a test-driven development process, the roadmap here follows 
that



svn commit: samba-web r796 - in trunk/devel: .

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-30 01:28:56 + (Tue, 30 Aug 2005)
New Revision: 796

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

Log:
Add link to roadmap

Modified:
   trunk/devel/index.html


Changeset:
Modified: trunk/devel/index.html
===
--- trunk/devel/index.html  2005-08-30 01:25:50 UTC (rev 795)
+++ trunk/devel/index.html  2005-08-30 01:28:56 UTC (rev 796)
@@ -70,6 +70,7 @@
   ul
 lih4emSAMBA_4_0/em/h4
 pThis is the tree for the next major release. It is currently under 
heavy development.  Though it hasn't yet reached an alpha release, it has 
reached the a 
href=http://lists.samba.org/archive/samba-technical/2004-October/037834.html;Susan
 stage/a./p
+   pFor more information, see the a href=roadmap-4.0.htmlroadmap 
document/a./p
 pExample checkout command:/p/li
   /ul
 



svn commit: samba-web r797 - in trunk/devel: .

2005-08-29 Thread jelmer
Author: jelmer
Date: 2005-08-30 01:30:19 + (Tue, 30 Aug 2005)
New Revision: 797

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

Log:
Fix typo

Modified:
   trunk/devel/roadmap-4.0.html


Changeset:
Modified: trunk/devel/roadmap-4.0.html
===
--- trunk/devel/roadmap-4.0.html2005-08-30 01:28:56 UTC (rev 796)
+++ trunk/devel/roadmap-4.0.html2005-08-30 01:30:19 UTC (rev 797)
@@ -18,7 +18,7 @@
   lifull NTFS semantics for sharing backends/li
   liInternal LDAP server, with AD semantics/li
   liInternal Kerberos server, including PAC support/li
-  lifully asynchronous internalsli
+  lifully asynchronous internals/li
   liflexible process models/li
   libetter scalablilty from micro to very large installations/li
   linew RPC infrastructure (PIDL)/li



svn commit: smb-build r26 - in trunk/testprog: .

2005-08-29 Thread tpot
Author: tpot
Date: 2005-08-30 01:33:10 + (Tue, 30 Aug 2005)
New Revision: 26

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=smb-buildrev=26

Log:
Fix the build.

Modified:
   trunk/testprog/testprog.c


Changeset:
Modified: trunk/testprog/testprog.c
===
--- trunk/testprog/testprog.c   2005-08-30 01:23:44 UTC (rev 25)
+++ trunk/testprog/testprog.c   2005-08-30 01:33:10 UTC (rev 26)
@@ -1,4 +1,3 @@
-foo
 #include includes.h
 
 #ifndef TESTPROG_FLAGS



svn commit: samba r9773 - in branches/SAMBA_4_0: . source/lib/tdb/common

2005-08-29 Thread tridge
Author: tridge
Date: 2005-08-30 01:51:36 + (Tue, 30 Aug 2005)
New Revision: 9773

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

Log:
 [EMAIL PROTECTED]:  tridge | 2005-08-30 11:55:57 +1000
 optimise this case a bit more. The total speedup using non-indexed
 ldbtest is now around a factor of 80x. The code is ugly as hell, but
 I think this speed is worth it.
 
 Of course, if we only ever do indexed searches in ldb then this
 doesn't help, but it seems all too common that we get unindexable
 searches, so the optimisation is worthwhile
 

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/tdb/common/tdb.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: svk:merge
   - a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11592
   + a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11599

Modified: branches/SAMBA_4_0/source/lib/tdb/common/tdb.c
===
--- branches/SAMBA_4_0/source/lib/tdb/common/tdb.c  2005-08-30 01:19:41 UTC 
(rev 9772)
+++ branches/SAMBA_4_0/source/lib/tdb/common/tdb.c  2005-08-30 01:51:36 UTC 
(rev 9773)
@@ -1276,14 +1276,22 @@
   semantics don't change.
 
   With a non-indexed ldb search this trick gains us a
-  factor of more than 10 in speed on a linux 2.6.x
-  system.
+  factor of around 80 in speed on a linux 2.6.x
+  system (testing using ldbtest).
 */
if (!tlock-off  tlock-hash != 0) {
u32 off;
-   if (ofs_read(tdb, TDB_HASH_TOP(tlock-hash), off) == 0 

-   off == 0) {
-   continue;
+   if (tdb-map_ptr) {
+   for (;tlock-hash  
tdb-header.hash_size;tlock-hash++) {
+   if (0 != *(u32 
*)(TDB_HASH_TOP(tlock-hash) + (unsigned char *)tdb-map_ptr)) {
+   break;
+   }
+   }
+   } else {
+   if (ofs_read(tdb, TDB_HASH_TOP(tlock-hash), 
off) == 0 
+   off == 0) {
+   continue;
+   }
}
}
 



svn commit: samba r9774 - in branches/SAMBA_4_0: . source/lib/tdb/common

2005-08-29 Thread tridge
Author: tridge
Date: 2005-08-30 01:58:03 + (Tue, 30 Aug 2005)
New Revision: 9774

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

Log:
 [EMAIL PROTECTED]:  tridge | 2005-08-30 12:02:19 +1000
 make sure we don't walk off the end of the hash array

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/tdb/common/tdb.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: svk:merge
   - a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11599
   + a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11605

Modified: branches/SAMBA_4_0/source/lib/tdb/common/tdb.c
===
--- branches/SAMBA_4_0/source/lib/tdb/common/tdb.c  2005-08-30 01:51:36 UTC 
(rev 9773)
+++ branches/SAMBA_4_0/source/lib/tdb/common/tdb.c  2005-08-30 01:58:03 UTC 
(rev 9774)
@@ -1287,6 +1287,9 @@
break;
}
}
+   if (tlock-hash == tdb-header.hash_size) {
+   continue;
+   }
} else {
if (ofs_read(tdb, TDB_HASH_TOP(tlock-hash), 
off) == 0 
off == 0) {



svn commit: samba r9775 - in branches/SAMBA_4_0: . source/lib/ldb/tools

2005-08-29 Thread tridge
Author: tridge
Date: 2005-08-30 02:11:56 + (Tue, 30 Aug 2005)
New Revision: 9775

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

Log:
 [EMAIL PROTECTED]:  tridge | 2005-08-30 12:16:19 +1000
 fixed the help message

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: svk:merge
   - a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11605
   + a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11607

Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c
===
--- branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c   2005-08-30 01:58:03 UTC 
(rev 9774)
+++ branches/SAMBA_4_0/source/lib/ldb/tools/ldbtest.c   2005-08-30 02:11:56 UTC 
(rev 9775)
@@ -363,8 +363,8 @@
printf(Usage: ldbtest options\n);
printf(Options:\n);
printf(  -H ldb_url   choose the database (or $LDB_URL)\n);
-   printf(  -r nrecords  database size to use\n);
-   printf(  -s nsearches number of searches to do\n);
+   printf(  --num-records  nrecords  database size to use\n);
+   printf(  --num-searches nsearches number of searches to do\n);
printf(\n);
printf(tests ldb API\n\n);
exit(1);



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

2005-08-29 Thread tridge
Author: tridge
Date: 2005-08-30 02:15:52 + (Tue, 30 Aug 2005)
New Revision: 9776

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

Log:
 [EMAIL PROTECTED]:  tridge | 2005-08-30 12:20:11 +1000
 make the selftest script a bit less existential

Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/script/tests/test_functions.sh


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: svk:merge
   - a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11607
   + a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11609

Modified: branches/SAMBA_4_0/source/script/tests/test_functions.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_functions.sh2005-08-30 
02:11:56 UTC (rev 9775)
+++ branches/SAMBA_4_0/source/script/tests/test_functions.sh2005-08-30 
02:15:52 UTC (rev 9776)
@@ -26,11 +26,11 @@
rm -f $SOCKET_WRAPPER_DIR/*
fi
if [ x$ret = x0 ];then
-   echo smbd exists with status $ret;
-   echo smbd exists with status $ret 
$SMBD_TEST_LOG;
+   echo smbd exits with status $ret;
+   echo smbd exits with status $ret 
$SMBD_TEST_LOG;
elif [ x$ret = x137 ];then
-   echo smbd got SIGXCPU and exists with status 
$ret!
-   echo smbd got SIGXCPU and exists with status 
$ret!$SMBD_TEST_LOG;
+   echo smbd got SIGXCPU and exits with status 
$ret!
+   echo smbd got SIGXCPU and exits with status 
$ret!$SMBD_TEST_LOG;
else
echo smbd failed with status $ret!
echo smbd failed with status 
$ret!$SMBD_TEST_LOG;



svn commit: samba r9777 - in branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr: .

2005-08-29 Thread skel
Author: skel
Date: 2005-08-30 02:36:48 + (Tue, 30 Aug 2005)
New Revision: 9777

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

Log:
finished user functionality


Modified:
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/cacusermgr.h
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/mgr_group.c
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/mgr_user.c
   branches/SOC/SAMBA_3_0/examples/libmsrpc/cacusermgr/util.c


Changeset:
Sorry, the patch is too large (366 lines) to include; please use WebSVN to see 
it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=9777


svn commit: samba r9778 - in branches/SAMBA_4_0/source/torture/rpc: .

2005-08-29 Thread abartlet
Author: abartlet
Date: 2005-08-30 03:37:14 + (Tue, 30 Aug 2005)
New Revision: 9778

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

Log:
Test for particular error returns, rather than just OK/not OK.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/torture/rpc/drsuapi.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/drsuapi.c
===
--- branches/SAMBA_4_0/source/torture/rpc/drsuapi.c 2005-08-30 02:36:48 UTC 
(rev 9777)
+++ branches/SAMBA_4_0/source/torture/rpc/drsuapi.c 2005-08-30 03:37:14 UTC 
(rev 9778)
@@ -127,12 +127,27 @@
return ret;
}
switch (formats[i]) {
+   case DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL:  
+   if (r.out.ctr.ctr1-array[0].status != 
DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE) {
+   printf(__location__ : Unexpected error (%d): 
This name lookup should fail\n, 
+  r.out.ctr.ctr1-array[0].status);
+   return False;
+   }
+   printf ((expected) error\n);
+   break;
case DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL:
-   case DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL:  
+   if (r.out.ctr.ctr1-array[0].status != 
DRSUAPI_DS_NAME_STATUS_NO_MAPPING) {
+   printf(__location__ : Unexpected error (%d): 
This name lookup should fail\n, 
+  r.out.ctr.ctr1-array[0].status);
+   return False;
+   }
+   printf ((expected) error\n);
+   break;
+   case DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN: 
case DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY: 
-   case DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN: 
-   if (r.out.ctr.ctr1-array[0].status == 
DRSUAPI_DS_NAME_STATUS_OK) {
-   printf(Unexpected success: This name lookup 
should fail\n);
+   if (r.out.ctr.ctr1-array[0].status != 
DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR) {
+   printf(__location__ : Unexpected error (%d): 
This name lookup should fail\n, 
+  r.out.ctr.ctr1-array[0].status);
return False;
}
printf ((expected) error\n);
@@ -724,9 +739,67 @@
}
 
 
-   /* NEGATIVE test.  This should parse, but not succeed */
+   /* NEGATIVE tests.  This should parse, but not succeed */
+   r.in.req.req1.format_offered= 
DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL;
+   r.in.req.req1.format_desired= DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+   names[0].str = talloc_asprintf(mem_ctx, cifs/[EMAIL PROTECTED], 
+  priv-dcinfo.netbios_name, dns_domain,
+  dns_domain);
+
+   printf(testing DsCrackNames with Service Principal '%s' desired 
format:%d\n,
+   names[0].str, r.in.req.req1.format_desired);
+
+   status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, r);
+   if (!NT_STATUS_IS_OK(status)) {
+   const char *errstr = nt_errstr(status);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+   errstr = dcerpc_errstr(mem_ctx, p-last_fault_code);
+   }
+   printf(dcerpc_drsuapi_DsCrackNames failed - %s\n, errstr);
+   ret = False;
+   } else if (!W_ERROR_IS_OK(r.out.result)) {
+   printf(DsCrackNames failed - %s\n, win_errstr(r.out.result));
+   ret = False;
+   } else if (r.out.ctr.ctr1-array[0].status != 
DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY) {
+   printf(DsCrackNames incorrect error on name - %d\n, 
r.out.ctr.ctr1-array[0].status);
+   ret = False;
+   }
+
+   if (!ret) {
+   return ret;
+   }
+
+   /* NEGATIVE tests.  This should parse, but not succeed */
r.in.req.req1.format_offered= DRSUAPI_DS_NAME_FORMAT_GUID;
r.in.req.req1.format_desired= DRSUAPI_DS_NAME_FORMAT_FQDN_1779;
+   names[0].str = NOT A GUID;
+
+   printf(testing DsCrackNames with BIND GUID '%s' desired format:%d\n,
+   names[0].str, r.in.req.req1.format_desired);
+
+   status = dcerpc_drsuapi_DsCrackNames(p, mem_ctx, r);
+   if (!NT_STATUS_IS_OK(status)) {
+   const char *errstr = nt_errstr(status);
+   if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+   errstr = dcerpc_errstr(mem_ctx, p-last_fault_code);
+   }
+   printf(dcerpc_drsuapi_DsCrackNames failed - %s\n, errstr);
+   ret = False;
+  

svn commit: samba r9779 - in branches/SAMBA_4_0/swat: desktop scripting/client

2005-08-29 Thread deryck
Author: deryck
Date: 2005-08-30 03:55:08 + (Tue, 30 Aug 2005)
New Revision: 9779

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

Log:
Add a contextmenu function to be used by all window/widget objects.

deryck

Modified:
   branches/SAMBA_4_0/swat/desktop/index.esp
   branches/SAMBA_4_0/swat/scripting/client/desktop.js


Changeset:
Modified: branches/SAMBA_4_0/swat/desktop/index.esp
===
--- branches/SAMBA_4_0/swat/desktop/index.esp   2005-08-30 03:37:14 UTC (rev 
9778)
+++ branches/SAMBA_4_0/swat/desktop/index.esp   2005-08-30 03:55:08 UTC (rev 
9779)
@@ -51,30 +51,6 @@
blank.setVisible(true);
 }
 
-function showContextMenu(e)
-{
-   var aboutCmd = new QxCommand();
-   aboutCmd.addEventListener(execute, function() {
-   showMessage(SWAT, the Samba Web Administration Tool.br/This 
tool is currently under development.);
-   });
-
-   var newWin = new QxCommand();
-   newWin.addEventListener(execute, blankW);
-
-   cmenu = new QxMenu;
-
-   var sub1 = new QxMenuButton(About SWAT, null, aboutCmd);
-   var sep = new QxMenuSeparator();
-   var sub2 = new QxMenuButton(New Window, null, newWin);
-
-   cmenu.add(sub1, sep, sub2);
-
-   cmenu.setLeft(e.getClientX());
-   cmenu.setTop(e.getClientY());
-   w.add(cmenu);
-   cmenu.setVisible(true);
-}
-
 // Always open with stats
 var win = new QxWindow();
 document.js.add('/scripting/client/status.js');
@@ -116,6 +92,48 @@
regWin.setVisible('true');
 }
 
+function clientContextMenu(e)
+{
+   var aboutCmd = new QxCommand();
+   aboutCmd.addEventListener(execute, function() {
+   showMessage(SWAT, the Samba Web Administration Tool.br/This 
tool is currently under development.);
+   });
+
+   var newWin = new QxCommand();
+   newWin.addEventListener(execute, blankW);
+
+   var cmenu = new QxMenu;
+
+   var sub1 = new QxMenuButton(About SWAT, null, aboutCmd);
+   var sep = new QxMenuSeparator();
+   var sub2 = new QxMenuButton(New Window, null, newWin);
+
+   cmenu.add(sub1, sep, sub2);
+
+   cmenu.setLeft(e.getClientX());
+   cmenu.setTop(e.getClientY());
+   w.add(cmenu);
+   cmenu.setVisible(true);
+}
+
+function windowContextMenu(t, e)
+{
+   var WinWin = new QxCommand();
+   WinWin.addEventListener(execute, function() {
+   var blank = new QxWindow();
+   t.add(blank);
+   blank.setVisible(true);
+   }); 
+
+   var inset = new QxMenu;
+   var sub1 = new QxMenuButton(Open window in a window, null, WinWin);
+
+   inset.add(sub1);
+   t.add(inset)
+
+   inset.setVisible(true);
+}
+
 function startMenu() 
 {
var sMenu = new QxMenu;

Modified: branches/SAMBA_4_0/swat/scripting/client/desktop.js
===
--- branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-08-30 03:37:14 UTC 
(rev 9778)
+++ branches/SAMBA_4_0/swat/scripting/client/desktop.js 2005-08-30 03:55:08 UTC 
(rev 9779)
@@ -89,26 +89,6 @@
blank.setVisible(true);
 }

-function winMenu(e)
-{
-   var self = this;
-   var WinWin = new QxCommand();
-   WinWin.addEventListener(execute, function() {
-   var blank = new QxWindow();
-   self.add(blank);
-   blank.setVisible(true);
-   }); 
-
-   var inset = new QxMenu;
-   var sub1 = new QxMenuButton(Open window in a window, null, WinWin);
-
-   inset.add(sub1);
-   self.add(inset)
-
-   cmenu.setVisible(false);
-   inset.setVisible(true);
-}
-
 function Window(h, src, s)
 {
this.self = new QxWindow(h);
@@ -121,7 +101,7 @@
this.self.setTop(getPosX(this.self));
this.self.setLeft(getPosY(this.self));
 
-   this.self.addEventListener(contextmenu, winMenu);
+   this.self.addEventListener(contextmenu, contextMenu);
 
return this.self;
 }
@@ -148,10 +128,23 @@
 Window.standard = StandardWindow;
 Window.large = LargeWindow;
 
+function contextMenu(e)
+{  
+   var t = e.getTarget()
+   var tObj = t.getHtmlAttribute(class)
+
+   if (tObj == 'QxWidget') {
+   clientContextMenu(e);
+   } else if (tObj == 'QxWindowPane') {
+   windowContextMenu(t, e);
+   }
+}
+
+
 window.application.main = function()
 {
var doc = this.getClientWindow().getClientDocument();
-   doc.addEventListener(contextmenu, showContextMenu);
+   doc.addEventListener(contextmenu, contextMenu);
doc.add(w);
 
var bar = new QxMenuBar;



Re: svn commit: samba r9752 - branches/SAMBA_3_0/source/rpc_server trunk/source/rpc_server

2005-08-29 Thread Stefan (metze) Metzmacher
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 so then is talloc_steal supposed to move a pointer and
 all its children from one context to another?  Or just
 the pointer itself.  If I ensure that the members of
 SEC_DESC are create from the top level SEC_DESC pointer,
 talloc_steal() would work?

yes, it moves the pointer and the childs

- --
metze

Stefan Metzmacher metze at samba.org www.samba.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3-nr1 (Windows XP)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDE/H0m70gjA5TCD8RAre1AJ9DwiOcRVYGDoivDsG4vHmldQUAhwCeMCri
wKULzyLEioTZDKjReRNSaiM=
=ioOb
-END PGP SIGNATURE-