svn commit: samba r9163 - branches/SAMBA_3_0/source/include branches/SAMBA_3_0/source/libads trunk/source/include trunk/source/libads

2005-08-05 Thread gd
Author: gd
Date: 2005-08-06 04:35:11 + (Sat, 06 Aug 2005)
New Revision: 9163

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

Log:
Rename UNKNOWN_TYPE_10 to PAC_LOGON_NAME (merge from samba4)

Guenther

Modified:
   branches/SAMBA_3_0/source/include/authdata.h
   branches/SAMBA_3_0/source/libads/authdata.c
   trunk/source/include/authdata.h
   trunk/source/libads/authdata.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/authdata.h
===
--- branches/SAMBA_3_0/source/include/authdata.h2005-08-06 04:01:00 UTC 
(rev 9162)
+++ branches/SAMBA_3_0/source/include/authdata.h2005-08-06 04:35:11 UTC 
(rev 9163)
@@ -27,13 +27,13 @@
 #define PAC_TYPE_LOGON_INFO 1
 #define PAC_TYPE_SERVER_CHECKSUM 6
 #define PAC_TYPE_PRIVSVR_CHECKSUM 7
-#define PAC_TYPE_UNKNOWN_10 10
+#define PAC_TYPE_LOGON_NAME 10
 
-typedef struct unknown_type_10 {
-   NTTIME unknown_time;
+typedef struct pac_logon_name {
+   NTTIME logon_time;
uint16 len;
uint16 *username; /* might not be null terminated, so not UNISTR */
-} UNKNOWN_TYPE_10;
+} PAC_LOGON_NAME;
 
 typedef struct pac_signature_data {
uint32 type;
@@ -130,7 +130,7 @@
PAC_LOGON_INFO *logon_info;
PAC_SIGNATURE_DATA *srv_cksum;
PAC_SIGNATURE_DATA *privsrv_cksum;
-   UNKNOWN_TYPE_10 *type_10;
+   PAC_LOGON_NAME *logon_name;
} pac;
 } PAC_INFO_CTR;
 

Modified: branches/SAMBA_3_0/source/libads/authdata.c
===
--- branches/SAMBA_3_0/source/libads/authdata.c 2005-08-06 04:01:00 UTC (rev 
9162)
+++ branches/SAMBA_3_0/source/libads/authdata.c 2005-08-06 04:35:11 UTC (rev 
9163)
@@ -43,31 +43,31 @@
return pac_contents;
 }
 
-static BOOL pac_io_unknown_type_10(const char *desc, UNKNOWN_TYPE_10 *type_10,
-  prs_struct *ps, int depth)
+static BOOL pac_io_logon_name(const char *desc, PAC_LOGON_NAME *logon_name,
+ prs_struct *ps, int depth)
 {
-   if (NULL == type_10)
+   if (NULL == logon_name)
return False;
 
-   prs_debug(ps, depth, desc, "pac_io_unknown_type_10");
+   prs_debug(ps, depth, desc, "pac_io_logon_name");
depth++;
 
-   if (!smb_io_time("unknown_time", &type_10->unknown_time, ps, depth))
+   if (!smb_io_time("logon_time", &logon_name->logon_time, ps, depth))
return False;
 
-   if (!prs_uint16("len", ps, depth, &type_10->len))
+   if (!prs_uint16("len", ps, depth, &logon_name->len))
return False;
 
-   if (UNMARSHALLING(ps) && type_10->len) {
-   type_10->username = PRS_ALLOC_MEM(ps, uint16, type_10->len);
-   if (!type_10->username) {
+   if (UNMARSHALLING(ps) && logon_name->len) {
+   logon_name->username = PRS_ALLOC_MEM(ps, uint16, 
logon_name->len);
+   if (!logon_name->username) {
DEBUG(3, ("No memory available\n"));
return False;
}
}
 
-   if (!prs_uint16s(True, "name", ps, depth, type_10->username, 
-(type_10->len / sizeof(uint16
+   if (!prs_uint16s(True, "name", ps, depth, logon_name->username, 
+(logon_name->len / sizeof(uint16
return False;
 
return True;
@@ -499,15 +499,15 @@
return False;
break;
 
-   case PAC_TYPE_UNKNOWN_10:
-   DEBUG(5, ("PAC_TYPE_UNKNOWN_10\n"));
+   case PAC_TYPE_LOGON_NAME:
+   DEBUG(5, ("PAC_TYPE_LOGON_NAME\n"));
if (UNMARSHALLING(ps))
-   hdr->ctr->pac.type_10 = PRS_ALLOC_MEM(ps, 
UNKNOWN_TYPE_10, 1);
-   if (!hdr->ctr->pac.type_10) {
+   hdr->ctr->pac.logon_name = PRS_ALLOC_MEM(ps, 
PAC_LOGON_NAME, 1);
+   if (!hdr->ctr->pac.logon_name) {
DEBUG(3, ("No memory available\n"));
return False;
}
-   if (!pac_io_unknown_type_10(desc, hdr->ctr->pac.type_10,
+   if (!pac_io_logon_name(desc, hdr->ctr->pac.logon_name,
ps, depth))
return False;
break;

Modified: trunk/source/include/authdata.h
===
--- trunk/source/include/authdata.h 2005-08-06 04:01:00 UTC (rev 9162)
+++ trunk/source/include/authdata.h 2005-08-06 04:35:11 UTC (rev 9163)
@@ -27,13 +27,13 @@
 #define PAC_TYPE_LOGON_INFO 1
 #define PAC_TYPE_SERVER_CHECKSUM 6
 #define PAC_TYPE_PRIVSVR_CHECKSUM 7
-#define PAC_TYPE_UNKNOWN_10 10
+#define PAC_TYPE_LOGON_NAME 10
 
-typedef struct unknown_type_10 {
-   NTTIME unknown_time;
+typedef struct pac_logon

svn commit: samba r9162 - in branches/SAMBA_4_0/source/librpc/idl: .

2005-08-05 Thread jelmer
Author: jelmer
Date: 2005-08-06 04:01:00 + (Sat, 06 Aug 2005)
New Revision: 9162

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

Log:
Fix a couple of data types

Modified:
   branches/SAMBA_4_0/source/librpc/idl/efs.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/efs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/efs.idl2005-08-06 01:54:55 UTC 
(rev 9161)
+++ branches/SAMBA_4_0/source/librpc/idl/efs.idl2005-08-06 04:01:00 UTC 
(rev 9162)
@@ -1,3 +1,4 @@
+#include "idl_types.h"
 /*
IDL definitions from original packet-dcerpc-efs.c
 by Jean-Baptiste Marchand
@@ -6,6 +7,7 @@
 [ 
   uuid("c681d488-d850-11d0-8c52-00c04fd90f7e"),
   version(1.0),
+  depends(security),
   pointer_default(unique)
 ] interface efs
 {
@@ -13,7 +15,7 @@
 WERROR EfsRpcOpenFileRaw(
[out,ref] policy_handle *pvContext,
[in] unistr FileName,
-   [in] long Flags
+   [in] uint32 Flags
);
 
 WERROR EfsRpcReadFileRaw(
@@ -37,23 +39,23 @@
 
 WERROR EfsRpcDecryptFileSrv(
[in] unistr FileName, 
-   [in] long Reserved
+   [in] uint32 Reserved
 );
 
 typedef struct {
-   long   cbData;
+   uint32 cbData;
[size_is(cbData), unique]  uint8  *pbData;
 } EFS_HASH_BLOB;
 
 typedef struct {
-   long cbTotalLength;
-   [unique] SID *pUserSid;
+   uint32 cbTotalLength;
+   [unique] dom_sid *pUserSid;
[unique] EFS_HASH_BLOB  *pHash;
[unique] unistr *lpDisplayInformation;
 } ENCRYPTION_CERTIFICATE_HASH;
 
 typedef struct {
-   long nCert_Hash;
+   uint32 nCert_Hash;
/* this is a pointer to an array of pointers */
[size_is(nCert_Hash)] ENCRYPTION_CERTIFICATE_HASH *pUsers[*];
 } ENCRYPTION_CERTIFICATE_HASH_LIST;
@@ -79,14 +81,14 @@
 );
 
 typedef struct {
-   long dwCertEncodingType;
-   long cbData;
+   uint32 dwCertEncodingType;
+   uint32 cbData;
   [size_is(cbData)] [unique] uint8 *pbData;
 } EFS_CERTIFICATE_BLOB;
 
 typedef struct {
-   long TotalLength;
-   [unique] SID *pUserSid;
+   uint32 TotalLength;
+   [unique] dom_sid *pUserSid;
[unique] EFS_CERTIFICATE_BLOB *pCertBlob;
 } ENCRYPTION_CERTIFICATE;
 



svn commit: samba-web r766 - in trunk: images news/images news/images/cifs05-pics news/static news/style news/team team

2005-08-05 Thread deryck
Author: deryck
Date: 2005-08-06 03:52:28 + (Sat, 06 Aug 2005)
New Revision: 766

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

Log:
Lots of photo goodness here...

Add slideshow of photos from CIFS.
Add a news announcement pointing to the slideshow.
Update the Team page pic.
Also, add link to Team photo from last year.

Thanks everyone who shared photos with me.  I took
a little from all the various collections. :-)

deryck

Added:
   trunk/images/team2004.jpg
   trunk/images/team2005-1-small.jpg
   trunk/images/team2005-1.jpg
   trunk/news/images/cifs05-pics/
   trunk/news/images/cifs05-pics/bf01.jpg
   trunk/news/images/cifs05-pics/breakfast.jpg
   trunk/news/images/cifs05-pics/breakfast2.jpg
   trunk/news/images/cifs05-pics/frys.jpg
   trunk/news/images/cifs05-pics/jelmer_lars.jpg
   trunk/news/images/cifs05-pics/jra_lars.jpg
   trunk/news/images/cifs05-pics/kbbq01.jpg
   trunk/news/images/cifs05-pics/plugfest01.jpg
   trunk/news/images/cifs05-pics/plugfest02.jpg
   trunk/news/images/cifs05-pics/plugfest04.jpg
   trunk/news/images/cifs05-pics/tridge-at-work.jpg
   trunk/news/static/cifs05-pics.html
   trunk/news/team/post_cifs2005.html
Modified:
   trunk/news/style/news.css
   trunk/team/index.html


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


svn commit: samba r9161 - in branches/SAMBA_4_0/source: build/pidl build/pidl/Parse/Pidl/Ethereal librpc/idl

2005-08-05 Thread jelmer
Author: jelmer
Date: 2005-08-06 01:54:55 + (Sat, 06 Aug 2005)
New Revision: 9161

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

Log:
More etheral parser generator fixes

Modified:
   branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/Conformance.pm
   branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm
   branches/SAMBA_4_0/source/build/pidl/pidl
   branches/SAMBA_4_0/source/librpc/idl/atsvc.idl
   branches/SAMBA_4_0/source/librpc/idl/efs.idl


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


svn commit: samba r9160 - in branches/SAMBA_4_0/testprogs/ejs: .

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-06 01:11:16 + (Sat, 06 Aug 2005)
New Revision: 9160

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

Log:
use the winreg lib in the test program



Modified:
   branches/SAMBA_4_0/testprogs/ejs/winreg.js


Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/winreg.js
===
--- branches/SAMBA_4_0/testprogs/ejs/winreg.js  2005-08-06 01:09:27 UTC (rev 
9159)
+++ branches/SAMBA_4_0/testprogs/ejs/winreg.js  2005-08-06 01:11:16 UTC (rev 
9160)
@@ -3,6 +3,9 @@
   test winreg calls from ejs
 */ 
 
+libinclude("base.js");
+libinclude("winreg.js");
+
 var options = new Object();
 
 ok = GetOptions(ARGV, options,
@@ -31,66 +34,24 @@
return -1;
 }
 
-
-
-function list(handle, path, name) {
-   var io = irpcObj();
-   var wtime = new Object();
-   wtime.low  = 2147483647;
-   wtime.high = 2147483647;
-   var keyname = new Object();
-   keyname.unknown  = 522;
-   keyname.key_name = NULL;
-   
-   var idx = 0;
-   for (idx=0;idx >= 0;idx++) {
-   io.input.handle= handle;
-   io.input.enum_index= idx;
-   io.input.key_name_len  = 0;
-   io.input.unknown   = 1044;
-   io.input.in_name   = keyname;
-   io.input.class = "";
-   io.input.last_changed_time = wtime;
-   var status = reg.winreg_EnumKey(io);
-   if (!status.is_ok) return;
-   var out = io.output;
-   if (out.result != "WERR_OK") {
-   return;
-   }
-   printf("%s\\%s\n", path, out.out_name.name);
-   
-   io = irpcObj();
-   io.input.handle= handle;
-   io.input.keyname = out.out_name.name;
-   io.input.unknown = 0;
-   io.input.access_mask = reg.SEC_FLAG_MAXIMUM_ALLOWED;
-   status = reg.winreg_OpenKey(io);
-   if (!status.is_ok) return;
-   assert(io.output.result == "WERR_OK");
-
-   list(io.output.handle, 
-path + "\\" + out.out_name.name, 
-out.out_name.name);
+function list_path(path) {
+   var list = winreg_enum_path(reg, path);
+   var i;
+   if (list == undefined) {
+   return;
}
+   for (i=0;i

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

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-06 01:09:27 + (Sat, 06 Aug 2005)
New Revision: 9159

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

Log:
abstract the winreg js functions into a nice library interface


Added:
   branches/SAMBA_4_0/source/scripting/libjs/winreg.js


Changeset:
Added: branches/SAMBA_4_0/source/scripting/libjs/winreg.js
===
--- branches/SAMBA_4_0/source/scripting/libjs/winreg.js 2005-08-06 01:08:31 UTC 
(rev 9158)
+++ branches/SAMBA_4_0/source/scripting/libjs/winreg.js 2005-08-06 01:09:27 UTC 
(rev 9159)
@@ -0,0 +1,115 @@
+/*
+   winreg rpc utility functions 
+   Copyright Andrew Tridgell 2005
+   released under the GNU GPL v2 or later
+*/ 
+
+
+/*
+  open a hive
+*/
+function winreg_open_hive(reg, hive)
+{
+   var io = irpcObj();
+   io.input.system_name = NULL;
+   io.input.access_required = reg.SEC_FLAG_MAXIMUM_ALLOWED;
+   var status;
+   if (hive == "HKLM") {
+   status = reg.winreg_OpenHKLM(io);
+   } else if (hive == "HKCR") {
+   status = reg.winreg_OpenHKCR(io);
+   } else if (hive == "HKPD") {
+   status = reg.winreg_OpenHKPD(io);
+   } else if (hive == "HKU") {
+   status = reg.winreg_OpenHKU(io);
+   } else {
+   println("Unknown hive " + hive);
+   return undefined;
+   }
+   if (!status.is_ok) {
+   return undefined;
+   }
+   return io.output.handle;
+}
+
+/*
+  open a handle to a path
+*/
+function winreg_open_path(reg, path)
+{
+   var s = string_init();
+   var i, components = s.split('\\', path);
+   var list = new Object();
+
+   list.length = 0;
+   
+   var handle = winreg_open_hive(reg, components[0]);
+   if (handle == undefined) {
+   return undefined;
+   }
+
+   for (i=1;i= 0;idx++) {
+   io.input.enum_index= idx;
+   var status = reg.winreg_EnumKey(io);
+   if (!status.is_ok) return;
+   var out = io.output;
+   if (out.result != "WERR_OK") {
+   return list;
+   }
+
+   list[list.length] = out.out_name.name;
+   list.length++;
+   }
+
+   return list;
+}



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

2005-08-05 Thread skel
Author: skel
Date: 2005-08-06 01:08:31 + (Sat, 06 Aug 2005)
New Revision: 9158

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

Log:
added cac_RegEnumKeys()

Added:
   branches/SOC/SAMBA_3_0/source/libmsrpc/test/regkeyenum.c
Modified:
   branches/SOC/SAMBA_3_0/source/include/libmsrpc.h
   branches/SOC/SAMBA_3_0/source/libmsrpc/cac_winreg.c
   branches/SOC/SAMBA_3_0/source/libmsrpc/test/Makefile


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


svn commit: samba r9157 - in branches/SAMBA_4_0/source/librpc/idl: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-06 01:01:18 + (Sat, 06 Aug 2005)
New Revision: 9157

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

Log:
fix white spaces

metze
Modified:
   branches/SAMBA_4_0/source/librpc/idl/winreg.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2005-08-06 00:58:06 UTC 
(rev 9156)
+++ branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2005-08-06 01:01:18 UTC 
(rev 9157)
@@ -313,9 +313,9 @@
WERROR winreg_QueryMultipleValues(
[in,ref] policy_handle *key_handle, 
[in,out,ref,size_is(num_values),length_is(num_values)] 
QueryMultipleValue *values,
-[in] uint32 num_values,
-[in,out,size_is(*buffer_size),length_is(*buffer_size)] uint8 *buffer,
-[in,out,ref] uint32 *buffer_size
+   [in] uint32 num_values,
+   [in,out,size_is(*buffer_size),length_is(*buffer_size)] uint8 
*buffer,
+   [in,out,ref] uint32 *buffer_size
);
 
/**/



svn commit: samba r9156 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc

2005-08-05 Thread tpot
Author: tpot
Date: 2005-08-06 00:58:06 + (Sat, 06 Aug 2005)
New Revision: 9156

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

Log:
Add IDL and test for FlushEventLog() but it always seems to return 
NT_STATUS_ACCESS_DENIED.

Modified:
   branches/SAMBA_4_0/source/librpc/idl/eventlog.idl
   branches/SAMBA_4_0/source/torture/rpc/eventlog.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/eventlog.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/eventlog.idl   2005-08-06 00:47:17 UTC 
(rev 9155)
+++ branches/SAMBA_4_0/source/librpc/idl/eventlog.idl   2005-08-06 00:58:06 UTC 
(rev 9156)
@@ -172,5 +172,7 @@
 
/*/
/* Function 0x17 */
-   NTSTATUS eventlog_FlushEventLog();  
+   NTSTATUS eventlog_FlushEventLog(
+   [in,ref] policy_handle *handle
+   );  
 }

Modified: branches/SAMBA_4_0/source/torture/rpc/eventlog.c
===
--- branches/SAMBA_4_0/source/torture/rpc/eventlog.c2005-08-06 00:47:17 UTC 
(rev 9155)
+++ branches/SAMBA_4_0/source/torture/rpc/eventlog.c2005-08-06 00:58:06 UTC 
(rev 9156)
@@ -31,7 +31,8 @@
name->size = name->length;
 }
 
-static BOOL test_GetNumRecords(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
struct policy_handle *handle)
+static BOOL test_GetNumRecords(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+  struct policy_handle *handle)
 {
NTSTATUS status;
struct eventlog_GetNumRecords r;
@@ -52,7 +53,8 @@
return True;
 }
 
-static BOOL test_ReadEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
struct policy_handle *handle, uint32_t offset)
+static BOOL test_ReadEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+ struct policy_handle *handle, uint32_t offset)
 {
NTSTATUS status;
struct eventlog_ReadEventLogW r;
@@ -91,7 +93,7 @@
 }
 
 static BOOL test_CloseEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
-   struct policy_handle *handle)
+  struct policy_handle *handle)
 {
NTSTATUS status;
struct eventlog_CloseEventLog r;
@@ -101,6 +103,7 @@
printf("Testing CloseEventLog\n");
 
status = dcerpc_eventlog_CloseEventLog(p, mem_ctx, &r);
+
if (!NT_STATUS_IS_OK(status)) {
printf("CloseEventLog failed - %s\n", nt_errstr(status));
return False;
@@ -109,6 +112,28 @@
return True;
 }
 
+static BOOL test_FlushEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+  struct policy_handle *handle)
+{
+   NTSTATUS status;
+   struct eventlog_FlushEventLog r;
+
+   r.in.handle = handle;
+
+   printf("Testing FlushEventLog\n");
+
+   status = dcerpc_eventlog_FlushEventLog(p, mem_ctx, &r);
+
+   /* Huh?  Does this RPC always return access denied? */
+
+   if (!NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
+   printf("FlushEventLog failed - %s\n", nt_errstr(status));
+   return False;
+   }
+
+   return True;
+}
+
 static BOOL test_ClearEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
   struct policy_handle *handle)
 {
@@ -121,6 +146,7 @@
printf("Testing ClearEventLog\n");
 
status = dcerpc_eventlog_ClearEventLogW(p, mem_ctx, &r);
+
if (!NT_STATUS_IS_OK(status)) {
printf("ClearEventLog failed - %s\n", nt_errstr(status));
return False;
@@ -129,7 +155,8 @@
return True;
 }
 
-static BOOL test_OpenEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
struct policy_handle *handle)
+static BOOL test_OpenEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+ struct policy_handle *handle)
 {
NTSTATUS status;
struct eventlog_OpenEventLogW r;
@@ -164,8 +191,8 @@
 
 BOOL torture_rpc_eventlog(void)
 {
-NTSTATUS status;
-struct dcerpc_pipe *p;
+   NTSTATUS status;
+   struct dcerpc_pipe *p;
struct policy_handle handle;
TALLOC_CTX *mem_ctx;
BOOL ret = True;
@@ -177,6 +204,7 @@
DCERPC_EVENTLOG_NAME, 
DCERPC_EVENTLOG_UUID, 
DCERPC_EVENTLOG_VERSION);
+
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
return False;
@@ -188,15 +216,17 @@
}
 
 #if 0
-   test_ClearEventLog(p, mem_ctx, &handle); /* Destructive test */
+   ret &= test_ClearEventLog(p, mem_ctx, &handle); /* Destructive test */
 #endif

-   test_GetNumRecords(p, mem_ctx, &handle);
+   ret &= test_GetNumRecords(p, mem_ctx, &handle);
 
-   test_ReadEventLog(p, mem_ctx, &handle, 0);
+   ret &= test_ReadEventLog(p, mem_c

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

2005-08-05 Thread tpot
Author: tpot
Date: 2005-08-06 00:47:17 + (Sat, 06 Aug 2005)
New Revision: 9155

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

Log:
Fix ReadEventLog() test so it now works.

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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/eventlog.c
===
--- branches/SAMBA_4_0/source/torture/rpc/eventlog.c2005-08-06 00:46:43 UTC 
(rev 9154)
+++ branches/SAMBA_4_0/source/torture/rpc/eventlog.c2005-08-06 00:47:17 UTC 
(rev 9155)
@@ -2,7 +2,7 @@
Unix SMB/CIFS implementation.
test suite for eventlog rpc operations
 
-   Copyright (C) Tim Potter 2003
+   Copyright (C) Tim Potter 2003,2005
Copyright (C) Jelmer Vernooij 2004

This program is free software; you can redistribute it and/or modify
@@ -59,20 +59,13 @@
 
printf("\ntesting ReadEventLog\n");
 
-   r.in.flags = 0x0;
-   r.in.offset = offset;
r.in.handle = handle;
-   r.in.number_of_bytes = 0x0;
+   r.in.flags = EVENTLOG_BACKWARDS_READ|EVENTLOG_SEQUENTIAL_READ;
+   r.in.offset = 0;
+   r.in.number_of_bytes = 0;
 
-   r.out.data = talloc(mem_ctx, uint8_t);
-
status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
 
-   if (!NT_STATUS_IS_OK(status)) {
-   printf("ReadEventLog failed - %s\n", nt_errstr(status));
-   return False;
-   }
-
if (NT_STATUS_IS_OK(r.out.result)) {
/* No data */
return True;
@@ -84,6 +77,7 @@
}
 
r.in.number_of_bytes = r.out.real_size;
+   r.out.data = talloc_size(mem_ctx, r.in.number_of_bytes);
 
status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
 



svn commit: samba r9154 - in branches/SAMBA_4_0/source/librpc/idl: .

2005-08-05 Thread tpot
Author: tpot
Date: 2005-08-06 00:46:43 + (Sat, 06 Aug 2005)
New Revision: 9154

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

Log:
Change eventlog enums to bitmaps.

Fix IDL for ReadEventLogW() function.

Modified:
   branches/SAMBA_4_0/source/librpc/idl/eventlog.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/eventlog.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/eventlog.idl   2005-08-06 00:36:17 UTC 
(rev 9153)
+++ branches/SAMBA_4_0/source/librpc/idl/eventlog.idl   2005-08-06 00:46:43 UTC 
(rev 9154)
@@ -11,20 +11,20 @@
   helpstring("Event Logger")
 ] interface eventlog
 {
-   typedef enum {
+   typedef bitmap {
EVENTLOG_SEQUENTIAL_READ = 0x0001,
-   EVENTLOG_SEEK_READ = 0x0002,
-   EVENTLOG_FORWARDS_READ = 0x0004,
-   EVENTLOG_BACKWARDS_READ = 0x0008
+   EVENTLOG_SEEK_READ   = 0x0002,
+   EVENTLOG_FORWARDS_READ   = 0x0004,
+   EVENTLOG_BACKWARDS_READ  = 0x0008
} eventlogReadFlags;
 
-   typedef enum {
-   EVENTLOG_SUCCESS = 0x,
-   EVENTLOG_ERROR_TYPE = 0x0001,
-   EVENTLOG_WARNING_TYPE = 0x0002,
+   typedef bitmap {
+   EVENTLOG_SUCCESS  = 0x,
+   EVENTLOG_ERROR_TYPE   = 0x0001,
+   EVENTLOG_WARNING_TYPE = 0x0002,
EVENTLOG_INFORMATION_TYPE = 0x0004,
-   EVENTLOG_AUDIT_SUCCESS = 0x0008,
-   EVENTLOG_AUDIT_FAILURE = 0x0010
+   EVENTLOG_AUDIT_SUCCESS= 0x0008,
+   EVENTLOG_AUDIT_FAILURE= 0x0010
} eventlogEventTypes;
 
typedef struct {
@@ -116,7 +116,7 @@
[in,ref] policy_handle *handle,
[in] uint32 flags,
[in] uint32 offset,
-   [in,out] uint32 number_of_bytes,
+   [in] uint32 number_of_bytes,
[out,ref,size_is(number_of_bytes)] uint8 *data,
[out] uint32 sent_size,
[out] uint32 real_size



svn commit: samba r9153 - in branches/SAMBA_4_0/testprogs/ejs: .

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-06 00:36:17 + (Sat, 06 Aug 2005)
New Revision: 9153

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

Log:
added a sample program for enumerating winreg via js

Added:
   branches/SAMBA_4_0/testprogs/ejs/winreg.js


Changeset:
Added: branches/SAMBA_4_0/testprogs/ejs/winreg.js
===
--- branches/SAMBA_4_0/testprogs/ejs/winreg.js  2005-08-06 00:06:34 UTC (rev 
9152)
+++ branches/SAMBA_4_0/testprogs/ejs/winreg.js  2005-08-06 00:36:17 UTC (rev 
9153)
@@ -0,0 +1,97 @@
+#!/usr/bin/env smbscript
+/*
+  test winreg calls from ejs
+*/ 
+
+var options = new Object();
+
+ok = GetOptions(ARGV, options,
+   "POPT_AUTOHELP",
+   "POPT_COMMON_SAMBA",
+   "POPT_COMMON_CREDENTIALS");
+if (ok == false) {
+   println("Failed to parse options: " + options.ERROR);
+   return -1;
+}
+
+libinclude("base.js");
+
+if (options.ARGV.length != 1) {
+   println("Usage: winreg.js ");
+   return -1;
+}
+var binding = options.ARGV[0];
+reg = winreg_init();
+security_init(reg);
+
+print("Connecting to " + binding + "\n");
+status = reg.connect(binding);
+if (status.is_ok != true) {
+   print("Failed to connect to " + binding + " - " + status.errstr + "\n");
+   return -1;
+}
+
+
+
+function list(handle, path, name) {
+   var io = irpcObj();
+   var wtime = new Object();
+   wtime.low  = 2147483647;
+   wtime.high = 2147483647;
+   var keyname = new Object();
+   keyname.unknown  = 522;
+   keyname.key_name = NULL;
+   
+   var idx = 0;
+   for (idx=0;idx >= 0;idx++) {
+   io.input.handle= handle;
+   io.input.enum_index= idx;
+   io.input.key_name_len  = 0;
+   io.input.unknown   = 1044;
+   io.input.in_name   = keyname;
+   io.input.class = "";
+   io.input.last_changed_time = wtime;
+   var status = reg.winreg_EnumKey(io);
+   if (!status.is_ok) return;
+   var out = io.output;
+   if (out.result != "WERR_OK") {
+   return;
+   }
+   printf("%s\\%s\n", path, out.out_name.name);
+   
+   io = irpcObj();
+   io.input.handle= handle;
+   io.input.keyname = out.out_name.name;
+   io.input.unknown = 0;
+   io.input.access_mask = reg.SEC_FLAG_MAXIMUM_ALLOWED;
+   status = reg.winreg_OpenKey(io);
+   if (!status.is_ok) return;
+   assert(io.output.result == "WERR_OK");
+
+   list(io.output.handle, 
+path + "\\" + out.out_name.name, 
+out.out_name.name);
+   }
+}
+
+function list_tree(name) {
+   var io = irpcObj();
+   io.input.system_name = NULL;
+   io.input.access_required = reg.SEC_FLAG_MAXIMUM_ALLOWED;
+   status = reg.winreg_OpenHKLM(io);
+   assert(status.is_ok);
+
+   var handle = io.output.handle;
+
+   list(handle, "", NULL);
+}
+
+var trees = new Array("HKCR", "HKLM", "HKPD", "HKU");
+
+for (i=0;i

svn commit: samba r9152 - in branches/SAMBA_4_0/source/utils: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-06 00:06:34 + (Sat, 06 Aug 2005)
New Revision: 9152

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

Log:
fix a crash bug

metze
Modified:
   branches/SAMBA_4_0/source/utils/ndrdump.c


Changeset:
Modified: branches/SAMBA_4_0/source/utils/ndrdump.c
===
--- branches/SAMBA_4_0/source/utils/ndrdump.c   2005-08-05 23:56:07 UTC (rev 
9151)
+++ branches/SAMBA_4_0/source/utils/ndrdump.c   2005-08-06 00:06:34 UTC (rev 
9152)
@@ -240,10 +240,9 @@
dump_data(0, ndr->data+ndr->offset, ndr->data_size - 
ndr->offset);
}
 
-   pr = talloc(NULL, struct ndr_print);
+   pr = talloc_zero(NULL, struct ndr_print);
pr->print = ndr_print_debug_helper;
pr->depth = 1;
-   pr->flags = 0;
f->ndr_print(pr, function, flags, st);
 
if (!NT_STATUS_IS_OK(status) ||



Build status as of Sat Aug 6 00:00:02 2005

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

--- /home/build/master/cache/broken_results.txt.old 2005-08-05 
00:00:09.0 +
+++ /home/build/master/cache/broken_results.txt 2005-08-06 00:00:09.0 
+
@@ -1,17 +1,17 @@
-Build status as of Fri Aug  5 00:00:01 2005
+Build status as of Sat Aug  6 00:00:02 2005
 
 Build counts:
 Tree Total  Broken Panic 
-ccache   36 6  0 
-distcc   36 5  0 
-lorikeet-heimdal 34 12 0 
-ppp  22 2  0 
+ccache   31 5  0 
+distcc   31 5  0 
+lorikeet-heimdal 30 12 0 
+ppp  21 2  0 
 rsync35 2  0 
 samba0  0  0 
 samba-docs   0  0  0 
 samba4   39 13 0 
-samba_3_036 4  0 
+samba_3_036 3  0 
 smb-build32 4  0 
 talloc   35 12 0 
-tdb  35 15 0 
+tdb  35 14 0 
 


svn commit: samba r9151 - in branches/SAMBA_4_0/source/heimdal/lib/roken: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 23:56:07 + (Fri, 05 Aug 2005)
New Revision: 9151

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

Log:
reverting to return char * again

metze
Modified:
   branches/SAMBA_4_0/source/heimdal/lib/roken/gai_strerror.c
   branches/SAMBA_4_0/source/heimdal/lib/roken/roken.h


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal/lib/roken/gai_strerror.c
===
--- branches/SAMBA_4_0/source/heimdal/lib/roken/gai_strerror.c  2005-08-05 
23:49:08 UTC (rev 9150)
+++ branches/SAMBA_4_0/source/heimdal/lib/roken/gai_strerror.c  2005-08-05 
23:56:07 UTC (rev 9151)
@@ -40,7 +40,7 @@
 
 static struct gai_error {
 int code;
-const char *str;
+char *str;
 } errors[] = {
 {EAI_NOERROR,  "no error"},
 #ifdef EAI_ADDRFAMILY
@@ -65,7 +65,7 @@
  *
  */
 
-const char * ROKEN_LIB_FUNCTION
+char * ROKEN_LIB_FUNCTION
 gai_strerror(int ecode)
 {
 struct gai_error *g;

Modified: branches/SAMBA_4_0/source/heimdal/lib/roken/roken.h
===
--- branches/SAMBA_4_0/source/heimdal/lib/roken/roken.h 2005-08-05 23:49:08 UTC 
(rev 9150)
+++ branches/SAMBA_4_0/source/heimdal/lib/roken/roken.h 2005-08-05 23:56:07 UTC 
(rev 9151)
@@ -543,7 +543,7 @@
 #endif
 
 #ifndef HAVE_GAI_STRERROR
-const char * ROKEN_LIB_FUNCTION
+char * ROKEN_LIB_FUNCTION
 gai_strerror(int ecode);
 #endif
 



svn commit: samba r9150 - in branches/SAMBA_4_0/source: build/pidl/Parse/Pidl build/pidl/Parse/Pidl/Ethereal librpc/idl

2005-08-05 Thread jelmer
Author: jelmer
Date: 2005-08-05 23:49:08 + (Fri, 05 Aug 2005)
New Revision: 9150

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

Log:
The ethereal parser generators work now. Thanks to Ronnie Sahlberg for 
help with the debugging and comments on the generated code (-:

Modified:
   branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Dump.pm
   branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/Conformance.pm
   branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm
   branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/NDR.pm
   branches/SAMBA_4_0/source/librpc/idl/atsvc.idl


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


svn commit: samba r9149 - in branches/SAMBA_4_0/source/librpc/idl: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 23:30:28 + (Fri, 05 Aug 2005)
New Revision: 9149

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

Log:
add support for string arrays in GetPrinterData

metze
Modified:
   branches/SAMBA_4_0/source/librpc/idl/spoolss.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/spoolss.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/spoolss.idl2005-08-05 23:11:00 UTC 
(rev 9148)
+++ branches/SAMBA_4_0/source/librpc/idl/spoolss.idl2005-08-05 23:30:28 UTC 
(rev 9149)
@@ -748,7 +748,8 @@
SPOOLSS_PRINTER_DATA_TYPE_NULL = 0,
SPOOLSS_PRINTER_DATA_TYPE_STRING = 1,
SPOOLSS_PRINTER_DATA_TYPE_BINARY = 3,
-   SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4
+   SPOOLSS_PRINTER_DATA_TYPE_UINT32 = 4,
+   SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY = 7
} spoolss_PrinterDataType;
 
typedef [nodiscriminant,gensize] union {
@@ -756,6 +757,7 @@
[case(SPOOLSS_PRINTER_DATA_TYPE_STRING)] nstring string;
[case(SPOOLSS_PRINTER_DATA_TYPE_BINARY),flag(NDR_REMAINING)] 
DATA_BLOB binary;
[case(SPOOLSS_PRINTER_DATA_TYPE_UINT32)] uint32 value;
+   [case(SPOOLSS_PRINTER_DATA_TYPE_STRING_ARRAY)] nstring_array 
string_array;
[default,flag(NDR_REMAINING)] DATA_BLOB data;
} spoolss_PrinterData;
 



svn commit: samba r9148 - in branches/SAMBA_4_0/source/build/m4: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 23:11:00 + (Fri, 05 Aug 2005)
New Revision: 9148

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

Log:
remove the aix stuff it didn't fix the build

metze
Modified:
   branches/SAMBA_4_0/source/build/m4/rewrite.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4
===
--- branches/SAMBA_4_0/source/build/m4/rewrite.m4   2005-08-05 23:08:13 UTC 
(rev 9147)
+++ branches/SAMBA_4_0/source/build/m4/rewrite.m4   2005-08-05 23:11:00 UTC 
(rev 9148)
@@ -28,14 +28,6 @@
   fi
 ;;
 #
-# on AIX having _LARGE_FILES and _LARGE_FILE_API defined
-# causes compile errors because function will declared 2 times
-# with different prototypes
-#
-*aix*)
-  CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE"
-;;
-#
 # VOS may need to have POSIX support and System V compatibility enabled.
 #
 *vos*)



svn commit: samba r9147 - in branches/SOC/SAMBA_3_0/source/libmsrpc: . test

2005-08-05 Thread skel
Author: skel
Date: 2005-08-05 23:08:13 + (Fri, 05 Aug 2005)
New Revision: 9147

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

Log:
changed cac_RegOpenKey() to call cac_RegConnect() instead of cli_reg_connect(). 
This is needed since cac_RegConnect() handles the housekeeping for the pipe 
session


Modified:
   branches/SOC/SAMBA_3_0/source/libmsrpc/cac_winreg.c
   branches/SOC/SAMBA_3_0/source/libmsrpc/test/regopenkey.c


Changeset:
Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/cac_winreg.c
===
--- branches/SOC/SAMBA_3_0/source/libmsrpc/cac_winreg.c 2005-08-05 23:01:57 UTC 
(rev 9146)
+++ branches/SOC/SAMBA_3_0/source/libmsrpc/cac_winreg.c 2005-08-05 23:08:13 UTC 
(rev 9147)
@@ -116,10 +116,12 @@
char *key_name = NULL;
uint32 reg_type = 0;
 
+   struct RegConnect rc;
+
if(!hnd) 
   return CAC_FAILURE;
 
-   if(!hnd->_internal.ctx || !hnd->_internal.pipes[PI_WINREG]) {
+   if(!hnd->_internal.ctx) {
   hnd->status = NT_STATUS_INVALID_HANDLE;
   return CAC_FAILURE;
}
@@ -135,7 +137,6 @@
   return CAC_FAILURE;
}
 
-   srv->cli.pipe_idx = PI_WINREG;
 
key_out = talloc(mem_ctx, POLICY_HND);
if(!key_out) {
@@ -150,30 +151,31 @@
  return CAC_FAILURE;
   }
 
-  parent_key = talloc(mem_ctx, POLICY_HND);
-  if(!parent_key) {
- hnd->status = NT_STATUS_NO_MEMORY;
- return CAC_FAILURE;
-  }
+  /*use cac_RegConnect because it handles the session setup*/
+  ZERO_STRUCT(rc);
 
-  err = cli_reg_connect( &(srv->cli), mem_ctx, reg_type, op->in.access, 
parent_key);
-  hnd->status = werror_to_ntstatus(err);
+  rc.in.access = op->in.access;
+  rc.in.root   = reg_type;
 
-  if(!NT_STATUS_IS_OK(hnd->status)) {
+  if(!cac_RegConnect(hnd, mem_ctx, &rc)) {
  return CAC_FAILURE;
   }
 
   /**if they only specified the root key, return the key we just opened*/
   if(key_name == NULL) {
- op->out.key = parent_key;
+ op->out.key = rc.out.key;
  return CAC_SUCCESS;
   }
+
+  parent_key = rc.out.key;
}
else {
   parent_key  = op->in.parent_key;
   key_name= op->in.key_name;
}
 
+   srv->cli.pipe_idx = PI_WINREG;
+
err = cli_reg_open_entry( &(srv->cli), mem_ctx, parent_key, key_name, 
op->in.access, key_out);
hnd->status = werror_to_ntstatus(err);
 

Modified: branches/SOC/SAMBA_3_0/source/libmsrpc/test/regopenkey.c
===
--- branches/SOC/SAMBA_3_0/source/libmsrpc/test/regopenkey.c2005-08-05 
23:01:57 UTC (rev 9146)
+++ branches/SOC/SAMBA_3_0/source/libmsrpc/test/regopenkey.c2005-08-05 
23:08:13 UTC (rev 9147)
@@ -56,19 +56,6 @@
exit(-1);
 }
 
-struct RegConnect rc;
-ZERO_STRUCT(rc);
-
-rc.in.access = REG_KEY_ALL;
-rc.in.root   = HKEY_LOCAL_MACHINE;
-
-if(!cac_RegConnect(hnd, mem_ctx, &rc)) {
-   fprintf(stderr, " Could not connect to registry. %s\n", 
nt_errstr(hnd->status));
-   goto done;
-}
-
-
-
 for(i = 0; i < num_keys; i++) {
printf("trying to open key %s...\n", key_names[i]);
 
@@ -91,10 +78,6 @@
}
 }
 
-if(!cac_RegClose(hnd, mem_ctx, rc.out.key)) {
-   fprintf(stderr, " Could not close handle. %s\n", 
nt_errstr(hnd->status));
-}
-
 done:
 cac_FreeHandle(hnd);
 



svn commit: samba r9146 - in branches/SAMBA_4_0/source: build/pidl/Parse/Pidl/Samba librpc librpc/idl scripting/ejs

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 23:01:57 + (Fri, 05 Aug 2005)
New Revision: 9146

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

Log:
- enable winreg pipe from ejs

- map the result code from rpc calls into the ejs objects

- treat winreg_String like lsa_String, hiding the length elements



Modified:
   branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Samba/EJS.pm
   branches/SAMBA_4_0/source/librpc/config.mk
   branches/SAMBA_4_0/source/librpc/idl/winreg.idl
   branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.c
   branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.h


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Samba/EJS.pm
===
--- branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Samba/EJS.pm
2005-08-05 22:57:47 UTC (rev 9145)
+++ branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Samba/EJS.pm
2005-08-05 23:01:57 UTC (rev 9146)
@@ -628,6 +628,11 @@
EjsPushElementTop($e, $env);
}
 
+   if ($d->{RETURN_TYPE}) {
+   my $t = $d->{RETURN_TYPE};
+   pidl "NDR_CHECK(ejs_push_$t(ejs, v, \"result\", 
&r->out.result));";
+   }
+
pidl "return NT_STATUS_OK;";
deindent;
pidl "}\n";

Modified: branches/SAMBA_4_0/source/librpc/config.mk
===
--- branches/SAMBA_4_0/source/librpc/config.mk  2005-08-05 22:57:47 UTC (rev 
9145)
+++ branches/SAMBA_4_0/source/librpc/config.mk  2005-08-05 23:01:57 UTC (rev 
9146)
@@ -623,6 +623,12 @@
 REQUIRED_SUBSYSTEMS = RPC NDR_WINREG
 NOPROTO = YES
 
+[SUBSYSTEM::RPC_EJS_INITSHUTDOWN]
+INIT_FUNCTION = ejs_init_initshutdown
+OBJ_FILES = librpc/gen_ndr/ndr_initshutdown_ejs.o
+REQUIRED_SUBSYSTEMS = RPC NDR_INITSHUTDOWN
+NOPROTO = YES
+
 [SUBSYSTEM::RPC_EJS_NETLOGON]
 INIT_FUNCTION = ejs_init_netlogon
 OBJ_FILES = librpc/gen_ndr/ndr_netlogon_ejs.o
@@ -645,6 +651,7 @@
 # Start SUBSYSTEM RPC_EJS
 [SUBSYSTEM::RPC_EJS]
 REQUIRED_SUBSYSTEMS = RPC_EJS_ECHO RPC_EJS_MISC RPC_EJS_SAMR RPC_EJS_SECURITY \
-   RPC_EJS_LSA RPC_EJS_SRVSVC RPC_EJS_SVCCTL RPC_EJS_IRPC
+   RPC_EJS_LSA RPC_EJS_SRVSVC RPC_EJS_SVCCTL RPC_EJS_IRPC RPC_EJS_WINREG \
+   RPC_EJS_INITSHUTDOWN
 # End SUBSYSTEM RPC_EJS
 

Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2005-08-05 22:57:47 UTC 
(rev 9145)
+++ branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2005-08-05 23:01:57 UTC 
(rev 9146)
@@ -14,7 +14,7 @@
   depends(lsa,initshutdown)
 ] interface winreg
 {
-   typedef struct {
+   typedef [public,noejs] struct {
[value(strlen_m_term(name)*2)] uint16 name_len;
[value(strlen_m_term(name)*2)] uint16 name_size;
unistr *name;

Modified: branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.c2005-08-05 22:57:47 UTC 
(rev 9145)
+++ branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.c2005-08-05 23:01:57 UTC 
(rev 9146)
@@ -25,6 +25,7 @@
 #include "scripting/ejs/smbcalls.h"
 #include "librpc/gen_ndr/ndr_security.h"
 #include "librpc/gen_ndr/ndr_lsa.h"
+#include "librpc/gen_ndr/ndr_winreg.h"
 #include "scripting/ejs/ejsrpc.h"
 
 /*
@@ -182,7 +183,19 @@
return ejs_push_hyper(ejs, v, name, r);
 }
 
+NTSTATUS ejs_push_WERROR(struct ejs_rpc *ejs, 
+   struct MprVar *v, const char *name, const WERROR *r)
+{
+   return ejs_push_string(ejs, v, name, win_errstr(*r));
+}
 
+NTSTATUS ejs_push_NTSTATUS(struct ejs_rpc *ejs, 
+  struct MprVar *v, const char *name, const NTSTATUS 
*r)
+{
+   return ejs_push_string(ejs, v, name, nt_errstr(*r));
+}
+
+
 /*
   pull a enum from a mpr variable to a C element
   a enum is just treating as an unsigned integer at this level
@@ -292,6 +305,24 @@
return ejs_push_string(ejs, v, name, r->string);
 }
 
+/*
+  pull a winreg_String
+*/
+NTSTATUS ejs_pull_winreg_String(struct ejs_rpc *ejs, 
+struct MprVar *v, const char *name, struct 
winreg_String *r)
+{
+   return ejs_pull_string(ejs, v, name, &r->name);
+}
+
+/*
+  push a winreg_String
+*/
+NTSTATUS ejs_push_winreg_String(struct ejs_rpc *ejs, 
+struct MprVar *v, const char *name, const struct 
winreg_String *r)
+{
+   return ejs_push_string(ejs, v, name, r->name);
+}
+
 NTSTATUS ejs_pull_DATA_BLOB(struct ejs_rpc *ejs, 
struct MprVar *v, const char *name, DATA_BLOB *r)
 {

Modified: branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.h
===
--- branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.h2005-08-05 22:57:47 UTC 

svn commit: samba r9145 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc

2005-08-05 Thread tpot
Author: tpot
Date: 2005-08-05 22:57:47 + (Fri, 05 Aug 2005)
New Revision: 9145

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

Log:
Some work on eventlog since jerry is doing some in Samba3.  (-:

 - Convert to use lsa_String instead of eventlog_String.

 - Copy across some constants.

 - Implement idl and testcase for ClearEventLog() function

Modified:
   branches/SAMBA_4_0/source/librpc/idl/eventlog.idl
   branches/SAMBA_4_0/source/torture/rpc/eventlog.c


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/eventlog.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/eventlog.idl   2005-08-05 22:51:29 UTC 
(rev 9144)
+++ branches/SAMBA_4_0/source/librpc/idl/eventlog.idl   2005-08-05 22:57:47 UTC 
(rev 9145)
@@ -5,23 +5,33 @@
 */
 [ uuid("82273fdc-e32a-18c3-3f78-827929dc23ea"),
   version(0.0),
-  depends(security),
+  depends(lsa,security),
   pointer_default(unique),
   pointer_default_top(unique),
   helpstring("Event Logger")
 ] interface eventlog
 {
+   typedef enum {
+   EVENTLOG_SEQUENTIAL_READ = 0x0001,
+   EVENTLOG_SEEK_READ = 0x0002,
+   EVENTLOG_FORWARDS_READ = 0x0004,
+   EVENTLOG_BACKWARDS_READ = 0x0008
+   } eventlogReadFlags;
+
+   typedef enum {
+   EVENTLOG_SUCCESS = 0x,
+   EVENTLOG_ERROR_TYPE = 0x0001,
+   EVENTLOG_WARNING_TYPE = 0x0002,
+   EVENTLOG_INFORMATION_TYPE = 0x0004,
+   EVENTLOG_AUDIT_SUCCESS = 0x0008,
+   EVENTLOG_AUDIT_FAILURE = 0x0010
+   } eventlogEventTypes;
+
typedef struct {
uint16 unknown0;
uint16 unknown1;
} eventlog_OpenUnknown0;
-
-   typedef struct {
-   [value(2*strlen_m(name))] uint16 name_len;
-   [value(2*strlen_m(name))] uint16 name_size;
-   unistr_noterm *name;
-   } eventlog_String;
-
+   
typedef struct { 
uint32 size;
uint32 reserved;
@@ -35,7 +45,7 @@
uint16 reserved_flag;
uint32 closingrecord;
uint32 stringoffset;
-   [size_is(num_of_strings)] eventlog_String bla[*];
+   [size_is(num_of_strings)] lsa_String bla[*];
uint32 sid_length;
[size_is(sid_length)] dom_sid *sids;
uint32 data_length;
@@ -46,7 +56,10 @@
 
/**/
/* Function: 0x00 */
-   NTSTATUS eventlog_ClearEventLogW();
+   NTSTATUS eventlog_ClearEventLogW(
+   [in,ref] policy_handle *handle,
+   [in] lsa_String *unknown
+   );
 
/**/
/* Function: 0x01 */
@@ -82,8 +95,8 @@
/* Function: 0x07 */
NTSTATUS eventlog_OpenEventLogW(
[in]eventlog_OpenUnknown0 *unknown0,
-   [in]eventlog_String source,
-   [in]eventlog_String unknown1,
+   [in]lsa_String logname,
+   [in]lsa_String servername,
[in]uint32 unknown2,
[in]uint32 unknown3,
[out,ref]   policy_handle *handle

Modified: branches/SAMBA_4_0/source/torture/rpc/eventlog.c
===
--- branches/SAMBA_4_0/source/torture/rpc/eventlog.c2005-08-05 22:51:29 UTC 
(rev 9144)
+++ branches/SAMBA_4_0/source/torture/rpc/eventlog.c2005-08-05 22:57:47 UTC 
(rev 9145)
@@ -22,12 +22,13 @@
 
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_eventlog.h"
+#include "librpc/gen_ndr/ndr_lsa.h"
 
-static void init_eventlog_String(struct eventlog_String *name, const char *s)
+static void init_lsa_String(struct lsa_String *name, const char *s)
 {
-   name->name = s;
-   name->name_len = 2*strlen_m(s);
-   name->name_size = name->name_len;
+   name->string = s;
+   name->length = 2*strlen_m(s);
+   name->size = name->length;
 }
 
 static BOOL test_GetNumRecords(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
struct policy_handle *handle)
@@ -63,6 +64,8 @@
r.in.handle = handle;
r.in.number_of_bytes = 0x0;
 
+   r.out.data = talloc(mem_ctx, uint8_t);
+
status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
 
if (!NT_STATUS_IS_OK(status)) {
@@ -112,6 +115,26 @@
return True;
 }
 
+static BOOL test_ClearEventLog(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
+  struct policy_handle *handle)
+{
+   NTSTATUS status;
+   struct eventlog_ClearEventLogW r;
+
+   r.in.handle = handle;
+   r.in.unknown = NULL;
+
+   printf("Testing ClearEventLog\n");
+
+   status = dcerpc_eventlog_ClearEventLogW(p, mem_ctx, &r);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf("ClearEventLog failed - %s\n", nt_errstr(status));
+  

svn commit: samba r9144 - in branches/SOC/SAMBA_3_0/source: . include libmsrpc libmsrpc/test

2005-08-05 Thread skel
Author: skel
Date: 2005-08-05 22:51:29 + (Fri, 05 Aug 2005)
New Revision: 9144

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

Log:
added support for cac_RegOpenKey() to connect to the registry, for example you 
can call cac_regOpenKey() with a key name like "HKEY_LOCAL_MACHINE\hardware" 
and it will 
connect to the registry and open that key (also works with acronyms like HKCR)
added a program to test/demonstrate this


Added:
   branches/SOC/SAMBA_3_0/source/libmsrpc/libmsrpc_internal.c
   branches/SOC/SAMBA_3_0/source/libmsrpc/test/regopenkey.c
Modified:
   branches/SOC/SAMBA_3_0/source/Makefile.in
   branches/SOC/SAMBA_3_0/source/include/libmsrpc.h
   branches/SOC/SAMBA_3_0/source/include/libmsrpc_internal.h
   branches/SOC/SAMBA_3_0/source/libmsrpc/cac_winreg.c
   branches/SOC/SAMBA_3_0/source/libmsrpc/test/Makefile


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


svn commit: samba-docs r790 - in trunk/smbdotconf: printing vfs

2005-08-05 Thread jht
Author: jht
Date: 2005-08-05 22:48:24 + (Fri, 05 Aug 2005)
New Revision: 790

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

Log:
Fixing missing link errors.
Modified:
   trunk/smbdotconf/printing/deleteprintercommand.xml
   trunk/smbdotconf/printing/os2drivermap.xml
   trunk/smbdotconf/vfs/hostmsdfs.xml
   trunk/smbdotconf/vfs/msdfsroot.xml


Changeset:
Modified: trunk/smbdotconf/printing/deleteprintercommand.xml
===
--- trunk/smbdotconf/printing/deleteprintercommand.xml  2005-07-28 19:45:02 UTC 
(rev 789)
+++ trunk/smbdotconf/printing/deleteprintercommand.xml  2005-08-05 22:48:24 UTC 
(rev 790)
@@ -16,7 +16,7 @@
 from the print system and from smb.conf.
 

-The  is 
+The  is 
 automatically called with only one parameter: .



Modified: trunk/smbdotconf/printing/os2drivermap.xml
===
--- trunk/smbdotconf/printing/os2drivermap.xml  2005-07-28 19:45:02 UTC (rev 
789)
+++ trunk/smbdotconf/printing/os2drivermap.xml  2005-08-05 22:48:24 UTC (rev 
790)
@@ -14,9 +14,11 @@
 printer driver would appear as HP LaserJet 5L = 
LASERJET.HP 
 LaserJet 5L.

-The need for the file is due to the printer driver namespace 
-   problem described in .  For 
more details on OS/2 clients, please 
-   refer to .
+
+   The need for the file is due to the printer driver namespace problem 
described in the chapter on Classical Printing in the 
book Samba3-HOWTO.  For more
+   details on OS/2 clients, please refer to .
+   
 
 
 

Modified: trunk/smbdotconf/vfs/hostmsdfs.xml
===
--- trunk/smbdotconf/vfs/hostmsdfs.xml  2005-07-28 19:45:02 UTC (rev 789)
+++ trunk/smbdotconf/vfs/hostmsdfs.xml  2005-08-05 22:48:24 UTC (rev 790)
@@ -10,7 +10,7 @@
 
See also the  share  level  
parameter.  For
more  information  on  setting  up a Dfs tree on Samba,
-   refer to .
+   refer to the MSFDS chapter in the book 
Samba3-HOWTO.

 
 

Modified: trunk/smbdotconf/vfs/msdfsroot.xml
===
--- trunk/smbdotconf/vfs/msdfsroot.xml  2005-07-28 19:45:02 UTC (rev 789)
+++ trunk/smbdotconf/vfs/msdfsroot.xml  2005-08-05 22:48:24 UTC (rev 790)
@@ -10,7 +10,7 @@
links of the form msdfs:serverA\\shareA,serverB\\shareB
and so on.  For more information on setting up a Dfs tree on
-   Samba, refer to .
+   Samba, refer to the MSDFS chapter in the 
Samba3-HOWTO book.
 
 
 host msdfs



svn commit: samba r9143 - in branches/SAMBA_4_0/swat/esptest: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 22:22:15 + (Fri, 05 Aug 2005)
New Revision: 9143

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

Log:
print out the rate of rounttrips

metze
Modified:
   branches/SAMBA_4_0/swat/esptest/qooxdoo.esp


Changeset:
Modified: branches/SAMBA_4_0/swat/esptest/qooxdoo.esp
===
--- branches/SAMBA_4_0/swat/esptest/qooxdoo.esp 2005-08-05 21:44:10 UTC (rev 
9142)
+++ branches/SAMBA_4_0/swat/esptest/qooxdoo.esp 2005-08-05 22:22:15 UTC (rev 
9143)
@@ -48,7 +48,6 @@
 
 var stopit = 0;
 var shared = new Object();
-shared.counter = 0;
 
 function callback(o) {
shared = o;
@@ -57,6 +56,11 @@
r = r + "\\t" + i + " : " + shared[i] + "\\n";
}
ta.setText(r);
+   if (shared.start_time == 0) {
+   shared.start_time = shared.nttime;
+   }
+   shared.time_diff = shared.nttime - shared.start_time;
+   shared.rate = shared.counter / (shared.time_diff * 0.001);
shared.counter++;
if (stopit == 0) {
server_call('remote.esp', 'testfunc', callback, shared);
@@ -67,6 +71,8 @@
server_call('remote.esp', 'printf', null, 
"Starting calls ... (stopit=%d)\\n", stopit);
stopit = 0;
+   shared.counter = 0;
+   shared.start_time = 0;
server_call('remote.esp', 'testfunc', callback, shared);
 };
 



svn commit: samba r9142 - in branches/SAMBA_4_0/source/build/smb_build: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 21:44:10 + (Fri, 05 Aug 2005)
New Revision: 9142

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

Log:
fix the output to the new names

metze
Modified:
   branches/SAMBA_4_0/source/build/smb_build/makefile.pm
   branches/SAMBA_4_0/source/build/smb_build/smb_build_h.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/smb_build/makefile.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-05 
21:22:20 UTC (rev 9141)
+++ branches/SAMBA_4_0/source/build/smb_build/makefile.pm   2005-08-05 
21:44:10 UTC (rev 9142)
@@ -573,9 +573,9 @@
my ($CTX) = @_;
my $output;
 
-   $output  = "\n";
-   $output .= "# Autogenerated by config.smb_build.pl #\n";
-   $output .= "\n";
+   $output  = "\n";
+   $output .= "# Autogenerated by build/smb_build/main.pl #\n";
+   $output .= "\n";
$output .= "\n";
 
$output .= _prepare_path_vars();
@@ -627,7 +627,7 @@
print MAKEFILE_IN _prepare_makefile_in($CTX) . $mk;
close(MAKEFILE_IN);
 
-   print "config.smb_build.pl: creating $file\n";
+   print "build/smb_build/main.pl: creating $file\n";
return; 
 }
 

Modified: branches/SAMBA_4_0/source/build/smb_build/smb_build_h.pm
===
--- branches/SAMBA_4_0/source/build/smb_build/smb_build_h.pm2005-08-05 
21:22:20 UTC (rev 9141)
+++ branches/SAMBA_4_0/source/build/smb_build/smb_build_h.pm2005-08-05 
21:44:10 UTC (rev 9142)
@@ -100,7 +100,7 @@
 sub create_smb_build_h($$)
 {
my ($CTX, $file) = @_;
-   my $output = "/* autogenerated by config.smb_build.pl */\n";
+   my $output = "/* autogenerated by build/smb_build/main.pl */\n";
 
$output .= _prepare_smb_build_h($CTX);
 
@@ -108,7 +108,7 @@
print SMB_BUILD_H $output;
close(SMB_BUILD_H);
 
-   print "config.smb_build.pl: creating $file\n";
+   print "build/smb_build/main.pl: creating $file\n";
return; 
 }
 1;



svn commit: samba r9141 - in branches/SAMBA_4_0/source: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 21:22:20 + (Fri, 05 Aug 2005)
New Revision: 9141

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

Log:
fix up output massage

metze
Modified:
   branches/SAMBA_4_0/source/configure.in


Changeset:
Modified: branches/SAMBA_4_0/source/configure.in
===
--- branches/SAMBA_4_0/source/configure.in  2005-08-05 21:10:06 UTC (rev 
9140)
+++ branches/SAMBA_4_0/source/configure.in  2005-08-05 21:22:20 UTC (rev 
9141)
@@ -83,7 +83,7 @@
 CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
 CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
 
-echo "configure: creating config.pl"
+echo "configure: creating config.pm"
 cat >config.pm<

svn commit: samba r9140 - in branches/SAMBA_4_0/swat/esptest: .

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 21:10:06 + (Fri, 05 Aug 2005)
New Revision: 9140

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

Log:
fixed a typo




Modified:
   branches/SAMBA_4_0/swat/esptest/qooxdoo.esp


Changeset:
Modified: branches/SAMBA_4_0/swat/esptest/qooxdoo.esp
===
--- branches/SAMBA_4_0/swat/esptest/qooxdoo.esp 2005-08-05 21:07:48 UTC (rev 
9139)
+++ branches/SAMBA_4_0/swat/esptest/qooxdoo.esp 2005-08-05 21:10:06 UTC (rev 
9140)
@@ -114,4 +114,4 @@
 
  
 
-<% page_footer() %>
+<% page_footer(); %>



svn commit: samba r9139 - in branches/SAMBA_4_0/swat: . esptest scripting style

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 21:07:48 + (Fri, 05 Aug 2005)
New Revision: 9139

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

Log:
cleanup the layout a bit



Modified:
   branches/SAMBA_4_0/swat/esptest/qooxdoo.esp
   branches/SAMBA_4_0/swat/menu.js
   branches/SAMBA_4_0/swat/scripting/header_columns.esp
   branches/SAMBA_4_0/swat/style/columns.css
   branches/SAMBA_4_0/swat/style/common.css


Changeset:
Modified: branches/SAMBA_4_0/swat/esptest/qooxdoo.esp
===
--- branches/SAMBA_4_0/swat/esptest/qooxdoo.esp 2005-08-05 20:08:17 UTC (rev 
9138)
+++ branches/SAMBA_4_0/swat/esptest/qooxdoo.esp 2005-08-05 21:07:48 UTC (rev 
9139)
@@ -23,7 +23,7 @@
setWidth("40%");
setMinHeight(400);
setBottom(48);
-   setMinWidth(700);
+   setMinWidth(500);
 };
 
 var gl = new QxGridLayout("auto,auto,auto,auto,auto", "100%");

Modified: branches/SAMBA_4_0/swat/menu.js
===
--- branches/SAMBA_4_0/swat/menu.js 2005-08-05 20:08:17 UTC (rev 9138)
+++ branches/SAMBA_4_0/swat/menu.js 2005-08-05 21:07:48 UTC (rev 9139)
@@ -56,6 +56,6 @@
"XHTML Spec", "http://www.w3.org/TR/xhtml1/";,
"JavaScript Spec", 
"http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf";,
"CSS Specs", "http://www.w3.org/Style/CSS/#specs";,
-   "CSS1/2 Reference", "http://www.w3schools.com/css/css_reference.asp";);
+   "CSS1/2 Reference", "http://www.w3schools.com/css/css_reference.asp";,
+   "qooxdoo info", "http://qooxdoo.sourceforge.net/";);
 
-

Modified: branches/SAMBA_4_0/swat/scripting/header_columns.esp
===
--- branches/SAMBA_4_0/swat/scripting/header_columns.esp2005-08-05 
20:08:17 UTC (rev 9138)
+++ branches/SAMBA_4_0/swat/scripting/header_columns.esp2005-08-05 
21:07:48 UTC (rev 9139)
@@ -77,9 +77,7 @@
 
 
 
-  
  <% swat_menus.docs.display(); %>
-  
 
 
  

Modified: branches/SAMBA_4_0/swat/style/columns.css
===
--- branches/SAMBA_4_0/swat/style/columns.css   2005-08-05 20:08:17 UTC (rev 
9138)
+++ branches/SAMBA_4_0/swat/style/columns.css   2005-08-05 21:07:48 UTC (rev 
9139)
@@ -10,60 +10,6 @@
 */
 
 
-/* Right-side column 
-***/
-#links {
-   float:left;
-   margin:115px 0 0 81%;  
-   padding:0;
-width:18%;
-}
-* html #links {
-   position:absolute;
-   top:115px;
-   left:82%;
-   float:none;
-   width:17%;
-   margin:0;
-}
-#links h4 {
-   margin-top:10px;
-   margin-left:1.5px;
-   font-size:small;
-}
-#links ul {
-   list-style-type:none;
-   padding:0;
-   padding-top:5px;
-   margin-left:20px;
-}
-#links a {
-   font-size:small;
-}
-#links p {
-   margin-top:25px;
-   margin-left:20px;
-}
-.releases {
-   padding:2px;
-   margin-top:35px;
-   border:1px solid #CCC;
-   background-color:#E5E9F5;
-}
-.beyond, .related, .intl {
-   padding:2px;
-   margin-top:25px;
-   border:1px solid #CCC;
-   background-color:#E5E9F5;
-}
-.beyond li {
-   margin-bottom:10px;
-}
-.contacts li{
-   list-style-type:disc;
-}
-
-
 /* Middle content column
 ***/
 #content {

Modified: branches/SAMBA_4_0/swat/style/common.css
===
--- branches/SAMBA_4_0/swat/style/common.css2005-08-05 20:08:17 UTC (rev 
9138)
+++ branches/SAMBA_4_0/swat/style/common.css2005-08-05 21:07:48 UTC (rev 
9139)
@@ -206,6 +206,53 @@
 }
 
 
+/* links menu
+***/
+#links {
+   position:absolute;
+   top:152px;
+   left:81%;
+   width:180px;
+   padding:0;
+   width:18%;
+   background-color:#F5F8FF;
+   border:2px groove #3878CD;
+   padding:0;
+   padding-bottom:5px;
+   margin:0;
+   z-index:1;
+}
+#links ul {
+   list-style-type:none;
+   text-align:center;
+   padding:0;
+   margin:0;
+}
+#links a,
+#links a:link,
+#links a:visited {
+   display:block;
+   height:20px;
+   font-size:small;
+   color:#2B5C9F;
+}
+#links a:hover {
+   color:#FFF;
+   background-color:#3878CD;
+}
+#links a:active {
+   color:#64;
+   background-color:#3878CD;
+   font-size:14px;
+}
+#links img {
+   padding:0;
+   margin:0;
+   width:180px;
+   height:30px;
+}
+
+
 /* Text and alignment formats
 ***/
 .punch {



svn commit: samba r9138 - in branches/SOC/SAMBA_3_0/source: . include libmsrpc libmsrpc/test

2005-08-05 Thread skel
Author: skel
Date: 2005-08-05 20:08:17 + (Fri, 05 Aug 2005)
New Revision: 9138

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

Log:
added cac_RegConnect() cac_RegClose() and initial cac_RegOpenKey(), along with 
a simple test program


Added:
   branches/SOC/SAMBA_3_0/source/libmsrpc/cac_winreg.c
   branches/SOC/SAMBA_3_0/source/libmsrpc/test/regkey.c
Modified:
   branches/SOC/SAMBA_3_0/source/Makefile.in
   branches/SOC/SAMBA_3_0/source/include/libmsrpc.h
   branches/SOC/SAMBA_3_0/source/libmsrpc/test/Makefile


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


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

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 19:45:01 + (Fri, 05 Aug 2005)
New Revision: 9137

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

Log:
fixed installswat to handle the deep directory structure of qooxdoo


Modified:
   branches/SAMBA_4_0/source/script/installswat.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/installswat.sh
===
--- branches/SAMBA_4_0/source/script/installswat.sh 2005-08-05 19:36:15 UTC 
(rev 9136)
+++ branches/SAMBA_4_0/source/script/installswat.sh 2005-08-05 19:45:01 UTC 
(rev 9137)
@@ -20,8 +20,13 @@
 done
 }
 
-installdir *.esp *.js */*.js */*.ejs */*.esp
-installdir */*.png */*.ico */*.gif */*.css
+installdir `find . -name '*.js'`
+installdir `find . -name '*.esp'`
+installdir `find . -name '*.css'`
+installdir `find . -name '*.png'`
+installdir `find . -name '*.ico'`
+installdir `find . -name '*.gif'`
+installdir `find . -name '*.ejs'`
 
 cat << EOF
 ==



svn commit: samba r9136 - in branches/SAMBA_4_0/swat/scripting/client: .

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 19:36:15 + (Fri, 05 Aug 2005)
New Revision: 9136

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

Log:
made the 'AJAJ' code portable to IE and Opera

Modified:
   branches/SAMBA_4_0/swat/scripting/client/call.js


Changeset:
Modified: branches/SAMBA_4_0/swat/scripting/client/call.js
===
--- branches/SAMBA_4_0/swat/scripting/client/call.js2005-08-05 19:16:49 UTC 
(rev 9135)
+++ branches/SAMBA_4_0/swat/scripting/client/call.js2005-08-05 19:36:15 UTC 
(rev 9136)
@@ -5,8 +5,39 @@
released under the GNU GPL Version 2 or later
 */
 
+var __call = new Object();
 
 /*
+  we can't use the qooxdoo portability layer for this, as it assumes
+  you are using an XML transport, so instead replicate the portability
+  code for remote calls here. Don't look too closely or you will go
+  blind.
+*/
+__call._activex = window.ActiveXObject && !(new QxClient).isOpera() ? true : 
false;
+__call._activexobj = null;
+__call._ok = QxXmlHttpLoader._http || QxXmlHttpLoader._activex;
+
+if (__call._activex) {
+   var servers = ["MSXML2", "Microsoft", "MSXML", "MSXML3"];
+   for (var i=0; i

svn commit: samba r9135 - in branches/SAMBA_4_0/swat/esptest: .

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 19:16:49 + (Fri, 05 Aug 2005)
New Revision: 9135

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

Log:
added a sample page that demonstrates using AJAJ to make remote calls
that update an object


Added:
   branches/SAMBA_4_0/swat/esptest/qooxdoo.esp
   branches/SAMBA_4_0/swat/esptest/remote.esp


Changeset:
Added: branches/SAMBA_4_0/swat/esptest/qooxdoo.esp
===
--- branches/SAMBA_4_0/swat/esptest/qooxdoo.esp 2005-08-05 19:16:13 UTC (rev 
9134)
+++ branches/SAMBA_4_0/swat/esptest/qooxdoo.esp 2005-08-05 19:16:49 UTC (rev 
9135)
@@ -0,0 +1,117 @@
+<% 
+  page_header("columns", "ESP qooxdoo test", "esptest"); 
+
+  libinclude("encoder.js");
+
+  var thispage = request.REQUEST_URI;
+%>
+
+
+
+
+Samba4 qooxdoo test
+
+  
+
+  window.application.main = function()
+  {
+var inlineWidget = new QxInline;
+var fieldSet = new QxFieldSet("thefieldset");
+
+with(fieldSet)
+{
+   setWidth("40%");
+   setMinHeight(400);
+   setBottom(48);
+   setMinWidth(700);
+};
+
+var gl = new QxGridLayout("auto,auto,auto,auto,auto", "100%");
+gl.setEdge(0);
+gl.setCellPaddingTop(3);
+gl.setCellPaddingBottom(3);
+
+inlineWidget.add(fieldSet);
+
+var d = this.getClientWindow().getDocument();
+
+function myCheckBox(label, name, value) {
+   var w = new QxCheckBox(label, value, name, value);
+   w.setWidth("100%");
+   return w;
+}
+
+function myTextField(name, value) {
+   var w = new QxTextField(value);
+   return w;
+}
+
+var stopit = 0;
+var shared = new Object();
+shared.counter = 0;
+
+function callback(o) {
+   shared = o;
+   var r = "Response:\\n";
+   for (var i in shared) {
+   r = r + "\\t" + i + " : " + shared[i] + "\\n";
+   }
+   ta.setText(r);
+   shared.counter++;
+   if (stopit == 0) {
+   server_call('remote.esp', 'testfunc', callback, shared);
+   }
+}
+
+function start_call() { 
+   server_call('remote.esp', 'printf', null, 
+   "Starting calls ... (stopit=%d)\\n", stopit);
+   stopit = 0;
+   server_call('remote.esp', 'testfunc', callback, shared);
+};
+
+function stop_call() { 
+   server_call('remote.esp', 'printf', null, "Stopping calls\\n");
+   stopit = 1;
+};
+
+function myButton(name, label, call) {
+var b = new QxButton(label);
+   b.setWidth("25%");
+   b.setVerticalAlign("top");
+   b.name = name;
+   b.addEventListener("click", call);
+   return b;
+};
+
+var c1 = myCheckBox("Enable The Server", 'checkbox1', false);
+var c2 = myCheckBox("Another Server", 'checkbox2', true);
+var t3 = myTextField("mytext", "hello");
+var b1 = myButton("send", "Make Call", start_call);
+var b2 = myButton("stop", "Stop Call", stop_call);
+var ta = new QxTextArea;
+ta.setText("initial text");
+ta.setWidth("80%");
+ta.setHeight(150);
+ta.setVerticalAlign("top");
+
+gl.add(c1, { row : 1, col : 1 });
+gl.add(c2, { row : 2, col : 1 });
+gl.add(t3, { row : 3, col : 1, scaleHorizontal: true });
+gl.add(b1, { row : 4, col : 1 });
+gl.add(ta, { row : 5, col : 1 });
+gl.add(b2, { row : 6, col : 1 });
+
+fieldSet.add(gl);
+
+inlineWidget.add(fieldSet);
+
+d.add(inlineWidget, "canvas");
+  };
+
+  
+
+
+ 
+
+<% page_footer() %>

Added: branches/SAMBA_4_0/swat/esptest/remote.esp
===
--- branches/SAMBA_4_0/swat/esptest/remote.esp  2005-08-05 19:16:13 UTC (rev 
9134)
+++ branches/SAMBA_4_0/swat/esptest/remote.esp  2005-08-05 19:16:49 UTC (rev 
9135)
@@ -0,0 +1,19 @@
+<%
+libinclude("server_call.js");
+
+/* this is a call that the client js code can make - it just adds
+   some more elements to the passed object, then returns the object */
+function testfunc(x) {
+   var sys = sys_init();
+   x.nttime = sys.nttime();
+   x.timestring = sys.httptime(x.nttime);
+   return x;
+}
+
+/* register a call for clients to make */
+var call = servCallObj();
+call.add('testfunc', testfunc);
+
+/* run the function that was asked for */
+call.run();
+%>



svn commit: samba r9134 - in branches/SAMBA_4_0/swat/scripting: . client

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 19:16:13 + (Fri, 05 Aug 2005)
New Revision: 9134

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

Log:
added the client side js library code for handling remote 'AJAJ' calls
into our web server

Added:
   branches/SAMBA_4_0/swat/scripting/client/
   branches/SAMBA_4_0/swat/scripting/client/call.js
   branches/SAMBA_4_0/swat/scripting/client/encoder.js


Changeset:
Added: branches/SAMBA_4_0/swat/scripting/client/call.js
===
--- branches/SAMBA_4_0/swat/scripting/client/call.js2005-08-05 19:11:26 UTC 
(rev 9133)
+++ branches/SAMBA_4_0/swat/scripting/client/call.js2005-08-05 19:16:13 UTC 
(rev 9134)
@@ -0,0 +1,38 @@
+/*
+   client side js functions for remote calls into the server
+
+   Copyright Andrew Tridgell 2005
+   released under the GNU GPL Version 2 or later
+*/
+
+
+/*
+   usage:
+
+ server_call(url, func, callback, ...);
+
+   'func' is a function name to call on the server
+   any additional arguments are passed to func() on the server
+
+   The callback() function is called with the returned
+   object. 'callback' may be null.
+*/
+function server_call(url, func, callback) {
+   var req = new XMLHttpRequest();
+   req.open("POST", url, true);
+   req.setRequestHeader('Content-Type', 
'application/x-www-form-urlencoded'); 
+   var args = new Object();
+   var i;
+   for (i=3;i

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

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 19:02:28 + (Fri, 05 Aug 2005)
New Revision: 9132

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

Log:
'pointer' is better for typedef than 'C pointer'

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


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c  2005-08-05 19:02:01 UTC 
(rev 9131)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls.c  2005-08-05 19:02:28 UTC 
(rev 9132)
@@ -45,7 +45,7 @@
{ MPR_TYPE_FUNCTION, "function" },
{ MPR_TYPE_STRING,   "string" },
{ MPR_TYPE_STRING_CFUNCTION, "function" },
-   { MPR_TYPE_PTR,  "C pointer" }
+   { MPR_TYPE_PTR,  "pointer" }
};
int i;
const char *type = NULL;



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

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 19:02:01 + (Fri, 05 Aug 2005)
New Revision: 9131

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

Log:
started adding the server side code for "AJAJ" (asynchronous javascript and 
javascript)

This is rather like AJAX, but passes around javascript objects between
the client and server, taking advantage of the fact that we have the
same language on both client and server.

Added:
   branches/SAMBA_4_0/source/scripting/libjs/encoder.js
   branches/SAMBA_4_0/source/scripting/libjs/server_call.js


Changeset:
Added: branches/SAMBA_4_0/source/scripting/libjs/encoder.js
===
--- branches/SAMBA_4_0/source/scripting/libjs/encoder.js2005-08-05 
18:28:19 UTC (rev 9130)
+++ branches/SAMBA_4_0/source/scripting/libjs/encoder.js2005-08-05 
19:02:01 UTC (rev 9131)
@@ -0,0 +1,100 @@
+/*
+   server side js functions for encoding/decoding objects into linear 
strings
+
+   Copyright Andrew Tridgell 2005
+   released under the GNU GPL Version 2 or later
+*/
+/*
+   usage:
+
+ enc = encodeObject(obj);
+ obj = decodeObject(enc);
+
+   The encoded format of the object is a string that is safe to
+   use in URLs
+
+   Note that only data elements are encoded, not functions
+*/
+
+function __count_members(o) {
+   var i, count = 0;
+   for (i in o) { 
+   count++;  
+   }
+   return count;
+}
+
+function __replace(str, old, rep) {
+   var s = string_init();
+   var a = s.split(old, str);
+   var j = s.join(rep, a);
+   return s.join(rep, a);
+}
+
+function encodeObject(o) {
+   var s = string_init();
+   var i, r = s.sprintf("%u:", __count_members(o));
+   for (i in o) {
+   var t = typeof(o[i]);
+   if (t == 'object' && o[i] == null) {
+   t = 'null';
+   }
+   if (t == 'object') {
+   r = s.sprintf("%s%s:%s:%s", r, i, t, 
encodeObject(o[i]));
+   } else if (t == "string") {
+   var enc = s.encodeURIComponent(o[i]);
+   var rep = __replace(enc, '%', '#');
+   r = s.sprintf("%s%s:%s:%s:", 
+ r, i, t, 
__replace(s.encodeURIComponent(o[i]),'%','#'));
+   } else if (t == "boolean" || t == "number") {
+   r = s.sprintf("%s%s:%s:%s:", r, i, t, "" + o[i]);
+   } else if (t == "undefined" || t == "null") {
+   r = s.sprintf("%s%s:%s:", r, i, t);
+   } else {
+   println("Unable to linearise type " + t);
+   }
+   }
+   return r;
+}
+
+function decodeObjectArray(a) {
+   var s = string_init();
+   var o = new Object();
+   var i, count = a[a.i]; a.i++;
+   for (i=0;i

svn commit: samba r9130 - in branches/SAMBA_4_0/source/librpc/idl: .

2005-08-05 Thread tpot
Author: tpot
Date: 2005-08-05 18:28:19 + (Fri, 05 Aug 2005)
New Revision: 9130

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

Log:
Fix up awful indentation.

Modified:
   branches/SAMBA_4_0/source/librpc/idl/eventlog.idl


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/eventlog.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/eventlog.idl   2005-08-05 18:06:15 UTC 
(rev 9129)
+++ branches/SAMBA_4_0/source/librpc/idl/eventlog.idl   2005-08-05 18:28:19 UTC 
(rev 9130)
@@ -55,8 +55,8 @@
/**/
/* Function: 0x02 */
NTSTATUS eventlog_CloseEventLog(
-   
[in,out,ref] policy_handle *handle
-  );
+   [in,out,ref] policy_handle *handle
+   );
 
 
/**/
@@ -66,9 +66,10 @@
/**/
/* Function: 0x04 */
NTSTATUS eventlog_GetNumRecords(
-   
[in,ref] policy_handle *handle,
-   [out]   
 uint32 number
-  );
+   [in,ref] policy_handle *handle,
+   [out] uint32 number
+   );
+
/**/
/* Function: 0x05 */
NTSTATUS eventlog_GetOldestRecord();
@@ -80,13 +81,13 @@
/**/
/* Function: 0x07 */
NTSTATUS eventlog_OpenEventLogW(
-  [in] 
eventlog_OpenUnknown0 *unknown0,
-  [in] 
eventlog_String source,
-  [in] 
eventlog_String unknown1,
-  [in] 
uint32 unknown2,
-  [in] 
uint32 unknown3,
-  [out,ref]   
policy_handle *handle
- );
+   [in]eventlog_OpenUnknown0 *unknown0,
+   [in]eventlog_String source,
+   [in]eventlog_String unknown1,
+   [in]uint32 unknown2,
+   [in]uint32 unknown3,
+   [out,ref]   policy_handle *handle
+   );
 
/**/
/* Function: 0x08 */
@@ -99,14 +100,14 @@
/**/
/* Function: 0x0a */
NTSTATUS eventlog_ReadEventLogW(
-  [in,ref] 
policy_handle *handle,
-  [in] 
uint32 flags,
-  [in] 
uint32 offset,
-  [in,out] 
uint32 number_of_bytes,
-  
[out,ref,size_is(number_of_bytes)]   uint8 *data,
-  [out]
uint32 sent_size,
-  [out]
uint32 real_size
- );
+   [in,ref] policy_handle *handle,
+   [in] uint32 flags,
+   [in] uint32 offset,
+   [in,out] uint32 number_of_bytes,
+   [out,ref,size_is(number_of_bytes)] uint8 *data,
+   [out] uint32 sent_size,
+   [out] uint32 real_size
+   );
 
/*/
/* Function 0x0b */
@@ -158,6 +159,5 @@
 
/*/
/* Function 0x17 */
-   NTSTATUS eventlog_FlushEventLog();
-   
+   NTSTATUS eventlog_FlushEventLog();  
 }



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

2005-08-05 Thread tpot
Author: tpot
Date: 2005-08-05 18:06:15 + (Fri, 05 Aug 2005)
New Revision: 9129

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

Log:
Start working on nested anonymous structures and unions.  A better
design is starting to become clearer.  (-:

Modified:
   branches/SAMBA_4_0/source/script/build_smb_interfaces.pl


Changeset:
Modified: branches/SAMBA_4_0/source/script/build_smb_interfaces.pl
===
--- branches/SAMBA_4_0/source/script/build_smb_interfaces.pl2005-08-05 
18:03:52 UTC (rev 9128)
+++ branches/SAMBA_4_0/source/script/build_smb_interfaces.pl2005-08-05 
18:06:15 UTC (rev 9129)
@@ -45,13 +45,32 @@
 
   prototypes_for($x);
 
-  # Prototypes for non-anonymous nested structures and unions
-
   foreach my $e1 (@{$x->{DATA}}) {
 foreach my $e2 (@{$e1->{DATA}}) {
+
+  # Prototypes for non-anonymous nested structures and unions:
+  #
+  # e.g struct foo {...};
+
   if (defined($e2->{STRUCT_NAME}) or defined($e2->{UNION_NAME})) {
prototypes_for($e2);
   }
+
+  # We also would like to push/pull nested structures and unions: 
+  #
+  # e.g struct foo {
+  # struct {...} bar;
+  # };
+
+  if ($e2->{TYPE} eq "struct") {
+   if (defined($e2->{NAME}) and !defined($e2->{STRUCT_NAME})) {
+ foreach my $x (@{$e2->{NAME}}) {
+   $name = "$e1->{NAME}[0]_$x";
+   print FILE "NTSTATUS ejs_push_$name(struct ejs_rpc *, struct MprVar 
*, const char *, const uint32_t *);\n";
+   print FILE "NTSTATUS ejs_pull_$name(struct ejs_rpc *, struct MprVar 
*, const char *, const uint32_t *);\n";
+ }
+   }
+  }
 }
   }
 }
@@ -97,6 +116,11 @@
 if ($f->{POINTERS} > 0) {
   print FILE "\t// alloc $x?\n";
 }
+
+if ($f->{TYPE} eq "struct") {
+  $type = $f->{STRUCT_NAME};
+}
+
 print FILE "\tNDR_CHECK(ejs_pull_$type(ejs, v, \"$x\", 
${deref}r->$suffix.$x));\n";
   }
 }
@@ -138,6 +162,33 @@
   print FILE "}\n\n";
 }
 
+# Nested anonymous structures
+
+foreach my $x (@{$header}) {
+  foreach my $e1 (@{$x->{DATA}}) {
+foreach my $e2 (@{$e1->{DATA}}) {
+  if ($e2->{TYPE} eq "struct") {
+   if (defined($e2->{NAME}) and !defined($e2->{STRUCT_NAME})) {
+ foreach my $x (@{$e2->{NAME}}) {
+
+   $name = "$e1->{NAME}[0]_$x";
+
+   print FILE "static NTSTATUS ejs_push_$name(struct ejs_rpc *ejs, 
struct MprVar *v, const char *name, const uint32_t *r)\n";
+   print FILE "{\n";
+   print FILE "\treturn NT_STATUS_OK;\n";
+   print FILE "}\n\n";
+
+   print FILE "static NTSTATUS ejs_pull_$name(struct ejs_rpc *ejs, 
struct MprVar *v, const char *name, const uint32_t *r)\n";
+   print FILE "{\n";
+   print FILE "\treturn NT_STATUS_OK;\n";
+   print FILE "}\n\n";
+ }
+   }
+  }
+}
+  }
+}
+
 # Top level call functions
 
 foreach my $x (@{$header}) {
@@ -148,7 +199,7 @@
 
   print FILE "static int ejs_$x->{STRUCT_NAME}(int eid, int argc, struct 
MprVar **argv)\n";
   print FILE "{\n";
-  print FILE "\tstruct $x->{STRUCT_NAME} parms;\n";
+  print FILE "\tstruct $x->{STRUCT_NAME} params;\n";
   print FILE "\tstruct smbcli_tree *tree;\n";
   print FILE "\tNTSTATUS result;\n\n";
 
@@ -183,7 +234,7 @@
 
 print FILE "static int ejs_${basename}_init(int eid, int argc, struct MprVar 
**argv)\n";
 print FILE "{\n";
-print FILE "\tstruct MprVar *obj = mprInitObject(eid, \"${basename}\", argc, 
argtv);\n\n";
+print FILE "\tstruct MprVar *obj = mprInitObject(eid, \"${basename}\", argc, 
argv);\n\n";
 
 foreach my $x (@{$header}) {
   next, if $x->{STRUCT_NAME} eq "";



svn commit: samba r9128 - in branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal: .

2005-08-05 Thread jelmer
Author: jelmer
Date: 2005-08-05 18:03:52 + (Fri, 05 Aug 2005)
New Revision: 9128

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

Log:
More ethereal parser generator updates. String handling is still broken as 
well as handling more then two element levels.

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


Changeset:
Modified: 
branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/Conformance.pm
===
--- branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/Conformance.pm 
2005-08-05 17:45:36 UTC (rev 9127)
+++ branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/Conformance.pm 
2005-08-05 18:03:52 UTC (rev 9128)
@@ -16,16 +16,28 @@
 
 sub handle_union_tag_size($$)
 {
+   my ($union,$size) = @_;
+
#FIXME  
 }
 
+use vars qw(%hf_renames %types %header_fields);
+
 sub handle_type($$$)
 {
my 
($name,$dissectorname,$ft_type,$base_type,$mask,$valsstring,$alignment) = @_;
-   #FIXME
+
+   $types{$name} = {
+   NAME => $name,
+   DISSECTOR_NAME => $dissectorname,
+   FT_TYPE => $ft_type,
+   BASE_TYPE => $base_type,
+   MASK => $mask,
+   VALSSTRING => $valsstring,
+   ALIGNMENT => $alignment
+   };
 }
 
-use vars qw(%hf_renames);
 
 sub handle_hf_rename($$)
 {
@@ -45,12 +57,23 @@
 
 sub handle_hf_field()
 {
-   my ($hf,$title,$filter,$ft_type,$base_type,$valsstring,$mask,$blub) = 
@_;
+   my ($hf,$title,$filter,$ft_type,$base_type,$valsstring,$mask,$blurb) = 
@_;
 
+   $header_fields{$hf} = {
+   HF => $hf,
+   TITLE => $title,
+   FILTER => $filter,
+   FT_TYPE => $ft_type,
+   BASE_TYPE => $base_type,
+   VALSSTRING => $valsstring,
+   MASK => $mask,
+   BLURB => $blurb
+   };
 }
 
 sub handle_strip_prefix($)
 {
+   my $x = shift;
#FIXME
 }
 

Modified: branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm
===
--- branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm 
2005-08-05 17:45:36 UTC (rev 9127)
+++ branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm 
2005-08-05 18:03:52 UTC (rev 9128)
@@ -6,6 +6,10 @@
 # Portions based on idl2eth.c by Ronnie Sahlberg
 # released under the GNU GPL
 
+# TODO:
+#  - order of functions generated per element level
+#  - strings
+
 package Parse::Pidl::Ethereal::NDR;
 
 use strict;
@@ -150,7 +154,7 @@
pidl_code "return offset;";
pidl_code "}\n";
 
-   register_hf_field($name, $dissectorname, enum_ft($e), "BASE_DEC", "0", 
"VALS($valsstring)", enum_size($e));
+   register_type($name, $dissectorname, enum_ft($e), "BASE_DEC", "0", 
"VALS($valsstring)", enum_size($e));
 }
 
 sub Bitmap($$$)
@@ -194,7 +198,7 @@
my $hf_bitname = "hf_$ifname\_$name\_$en";
my $filtername = "$ifname\.$name\.$en";

-   register_hf_field($hf_bitname, $en, $filtername, "FT_BOOLEAN", 
$e->{ALIGN} * 8, "TFS(&$en\_tfs)", $ev, "");
+   register_hf_field($hf_bitname, field2name($en), $filtername, 
"FT_BOOLEAN", $e->{ALIGN} * 8, "TFS(&$en\_tfs)", $ev, "");
 
pidl_def "static const true_false_string $name\_tfs = {";
pidl_def "   \"$name is SET\",";
@@ -253,7 +257,7 @@
 
return if (EmitProhibited($dissectorname));
 
-   my $hf = register_hf_field("hf_$ifname\_$pn\_$e->{NAME}", $e->{NAME}, 
"$ifname.$pn.$e->{NAME}", type2ft($e->{TYPE}), "BASE_HEX", "NULL", 0, "");
+   my $hf = register_hf_field("hf_$ifname\_$pn\_$e->{NAME}", 
field2name($e->{NAME}), "$ifname.$pn.$e->{NAME}", type2ft($e->{TYPE}), 
"BASE_HEX", "NULL", 0, "");
my $add = "";
 
foreach (@{$e->{LEVELS}}) {
@@ -290,8 +294,9 @@
indent;
foreach (@{$fn->{ELEMENTS}}) {
if (grep(/in/,@{$_->{DIRECTION}})) {
-   pidl_code "dissectornames{$_->{NAME}};";
+   pidl_code "$dissectornames{$_->{NAME}}";
pidl_code 
"offset=dissect_deferred_pointers(pinfo,tvb,offset,drep);";
+   pidl_code "";
}
}
pidl_code "return offset;";
@@ -304,7 +309,7 @@
indent;
foreach (@{$fn->{ELEMENTS}}) {
if (grep(/out/,@{$_->{DIRECTION}})) {
-   pidl_code "$dissectornames{$_->{NAME}};";
+   pidl_code "$dissectornames{$_->{NAME}}";
pidl_code 
"offset=dissect_deferred_pointers(pinfo,tvb,offset,drep);";
}
 
@@ -478,6 +483,21 @@
 {
my $x = shift;
 
+   my $define = "__PACKET_DCERPC_" . uc($_->{NAME}) .

svn commit: samba r9127 - in trunk/source: include rpc_parse rpc_server

2005-08-05 Thread jerry
Author: jerry
Date: 2005-08-05 17:45:36 + (Fri, 05 Aug 2005)
New Revision: 9127

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

Log:
cleaning up OpenEventlog()
Modified:
   trunk/source/include/rpc_eventlog.h
   trunk/source/rpc_parse/parse_eventlog.c
   trunk/source/rpc_server/srv_eventlog_nt.c


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


svn commit: samba r9126 - in branches/SAMBA_3_0/source/smbd: .

2005-08-05 Thread jra
Author: jra
Date: 2005-08-05 17:10:10 + (Fri, 05 Aug 2005)
New Revision: 9126

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

Log:
Fix valgrind bug Volker found in interaction with new aio buffer
flipping and oplocks.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/oplock.c
   branches/SAMBA_3_0/source/smbd/process.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/oplock.c
===
--- branches/SAMBA_3_0/source/smbd/oplock.c 2005-08-05 17:10:07 UTC (rev 
9125)
+++ branches/SAMBA_3_0/source/smbd/oplock.c 2005-08-05 17:10:10 UTC (rev 
9126)
@@ -757,8 +757,9 @@
 
if((outbuf = NewOutBuffer(&saved_outbuf))==NULL) {
DEBUG(0,("oplock_break: malloc fail for output buffer.\n"));
+   /* Free must be done before set.. */
+   free_InBuffer(inbuf);
set_InBuffer(saved_inbuf);
-   free_InBuffer(inbuf);
return False;
}
 
@@ -918,14 +919,15 @@
/* Restore the chain fnum. */
file_chain_restore();
 
+   /* Free the buffers we've been using to recurse. */
+   /* Free must be done before set.. */
+   free_InBuffer(inbuf);
+   free_OutBuffer(outbuf);
+
/* Restore the global In/Out buffers. */
set_InBuffer(saved_inbuf);
set_OutBuffer(saved_outbuf);
 
-   /* Free the buffers we've been using to recurse. */
-   free_InBuffer(inbuf);
-   free_OutBuffer(outbuf);
-
/* We need this in case a readraw crossed on the wire. */
if(global_oplock_break)
global_oplock_break = False;

Modified: branches/SAMBA_3_0/source/smbd/process.c
===
--- branches/SAMBA_3_0/source/smbd/process.c2005-08-05 17:10:07 UTC (rev 
9125)
+++ branches/SAMBA_3_0/source/smbd/process.c2005-08-05 17:10:10 UTC (rev 
9126)
@@ -1527,6 +1527,7 @@
 void set_InBuffer(char *new_inbuf)
 {
InBuffer = new_inbuf;
+   current_inbuf = InBuffer;
 }
 
 char *get_OutBuffer(void)
@@ -1547,6 +1548,9 @@
 void free_InBuffer(char *inbuf)
 {
if (!aio_inbuffer_in_use(inbuf)) {
+   if (current_inbuf == inbuf) {
+   current_inbuf = NULL;
+   }
SAFE_FREE(inbuf);
}
 }



svn commit: samba r9125 - in trunk/source/smbd: .

2005-08-05 Thread jra
Author: jra
Date: 2005-08-05 17:10:07 + (Fri, 05 Aug 2005)
New Revision: 9125

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

Log:
Buffer flipping part (only part that applies with the new oplock
code) of this fix : valgrind bug Volker found in interaction with new aio buffer
flipping and oplocks.
Jeremy.

Modified:
   trunk/source/smbd/process.c


Changeset:
Modified: trunk/source/smbd/process.c
===
--- trunk/source/smbd/process.c 2005-08-05 15:54:11 UTC (rev 9124)
+++ trunk/source/smbd/process.c 2005-08-05 17:10:07 UTC (rev 9125)
@@ -1623,6 +1623,7 @@
 void set_InBuffer(char *new_inbuf)
 {
InBuffer = new_inbuf;
+   current_inbuf = InBuffer;
 }
 
 char *get_OutBuffer(void)
@@ -1643,6 +1644,9 @@
 void free_InBuffer(char *inbuf)
 {
if (!aio_inbuffer_in_use(inbuf)) {
+   if (current_inbuf == inbuf) {
+   current_inbuf = NULL;
+   }
SAFE_FREE(inbuf);
}
 }



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

2005-08-05 Thread tpot
Author: tpot
Date: 2005-08-05 15:54:11 + (Fri, 05 Aug 2005)
New Revision: 9124

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

Log:
Handle more types pointers to simple types.

Modified:
   branches/SAMBA_4_0/source/script/build_smb_interfaces.pl


Changeset:
Modified: branches/SAMBA_4_0/source/script/build_smb_interfaces.pl
===
--- branches/SAMBA_4_0/source/script/build_smb_interfaces.pl2005-08-05 
15:53:04 UTC (rev 9123)
+++ branches/SAMBA_4_0/source/script/build_smb_interfaces.pl2005-08-05 
15:54:11 UTC (rev 9124)
@@ -77,7 +77,7 @@
   my $f = shift;
   my $suffix = shift;
 
-  my $type = "UNKNOWN";
+  my $type = $f->{TYPE};
 
   if ($f->{TYPE} eq "char" and $f->{POINTERS} == 1) {
 $type = "string";
@@ -88,8 +88,16 @@
 $type =~ s/_t$//;
   }
 
+  my $deref = "&";
+  if ($f->{POINTERS} == 1 && $type ne "string") {
+$deref = "";
+  }
+
   foreach my $x (@{$f->{NAME}}) {
-print FILE "\tNDR_CHECK(ejs_pull_$type(ejs, v, \"$x\", 
&r->$suffix.$x));\n";
+if ($f->{POINTERS} > 0) {
+  print FILE "\t// alloc $x?\n";
+}
+print FILE "\tNDR_CHECK(ejs_pull_$type(ejs, v, \"$x\", 
${deref}r->$suffix.$x));\n";
   }
 }
 



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

2005-08-05 Thread tpot
Author: tpot
Date: 2005-08-05 15:53:04 + (Fri, 05 Aug 2005)
New Revision: 9123

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

Log:
Add ejs_pull_DATA_BLOB() and ejs_pull_BOOL() although leave DATA_BLOB 
unimplemented for the moment.

Modified:
   branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.c
   branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.h


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.c2005-08-05 15:34:31 UTC 
(rev 9122)
+++ branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.c2005-08-05 15:53:04 UTC 
(rev 9123)
@@ -292,3 +292,29 @@
return ejs_push_string(ejs, v, name, r->string);
 }
 
+NTSTATUS ejs_pull_DATA_BLOB(struct ejs_rpc *ejs, 
+   struct MprVar *v, const char *name, DATA_BLOB *r)
+{
+   return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS ejs_push_DATA_BLOB(struct ejs_rpc *ejs, 
+   struct MprVar *v, const char *name, 
+   const DATA_BLOB *r)
+{
+   return NT_STATUS_NOT_IMPLEMENTED;
+}
+
+NTSTATUS ejs_pull_BOOL(struct ejs_rpc *ejs, 
+  struct MprVar *v, const char *name, BOOL *r)
+{
+   NDR_CHECK(mprGetVar(&v, name));
+   *r = mprVarToBool(v);
+   return NT_STATUS_OK;
+}
+
+NTSTATUS ejs_push_BOOL(struct ejs_rpc *ejs, 
+  struct MprVar *v, const char *name, const BOOL *r)
+{
+   return mprSetVar(v, name, mprCreateBoolVar(*r));
+}

Modified: branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.h
===
--- branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.h2005-08-05 15:34:31 UTC 
(rev 9122)
+++ branches/SAMBA_4_0/source/scripting/ejs/ejsrpc.h2005-08-05 15:53:04 UTC 
(rev 9123)
@@ -95,8 +95,15 @@
  struct MprVar *v, const char *name, const struct 
dom_sid *r);
 NTSTATUS ejs_push_null(struct ejs_rpc *ejs, struct MprVar *v, const char 
*name);
 BOOL ejs_pull_null(struct ejs_rpc *ejs, struct MprVar *v, const char *name);
+NTSTATUS ejs_pull_DATA_BLOB(struct ejs_rpc *ejs, 
+   struct MprVar *v, const char *name, DATA_BLOB *r);
+NTSTATUS ejs_push_DATA_BLOB(struct ejs_rpc *ejs, 
+   struct MprVar *v, const char *name, const DATA_BLOB 
*r);
+NTSTATUS ejs_pull_BOOL(struct ejs_rpc *ejs, 
+  struct MprVar *v, const char *name, BOOL *r);
+NTSTATUS ejs_push_BOOL(struct ejs_rpc *ejs, 
+  struct MprVar *v, const char *name, const BOOL *r);
 
-
 #define EJS_ALLOC_SIZE(ejs, s, size) do { \
   (s) = talloc_size(ejs, size); \
   if (!(s)) return ejs_panic(ejs, "out of memory"); \



svn commit: samba r9122 - in branches/SAMBA_4_0/source/web_server: .

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 15:34:31 + (Fri, 05 Aug 2005)
New Revision: 9122

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

Log:
cope with trailing garbage in POST contents in the web server

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


Changeset:
Modified: branches/SAMBA_4_0/source/web_server/web_server.c
===
--- branches/SAMBA_4_0/source/web_server/web_server.c   2005-08-05 15:34:01 UTC 
(rev 9121)
+++ branches/SAMBA_4_0/source/web_server/web_server.c   2005-08-05 15:34:31 UTC 
(rev 9122)
@@ -103,7 +103,10 @@
   a blank line) and any post data, as indicated by the
   content_length */
if (web->input.end_of_headers &&
-   web->input.partial.length == web->input.content_length) {
+   web->input.partial.length >= web->input.content_length) {
+   if (web->input.partial.length > web->input.content_length) {
+   web->input.partial.data[web->input.content_length] = 0;
+   }
EVENT_FD_NOT_READABLE(web->conn->event.fde);
http_process_input(web);
}



svn commit: samba r9121 - in branches/SAMBA_4_0/source/torture/raw: .

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 15:34:01 + (Fri, 05 Aug 2005)
New Revision: 9121

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

Log:
use the older non-passthru level for setting delete on close
disposition in the RAW-UNLINK test (this allows it to work with netapp
servers)


Modified:
   branches/SAMBA_4_0/source/torture/raw/unlink.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/raw/unlink.c
===
--- branches/SAMBA_4_0/source/torture/raw/unlink.c  2005-08-05 15:31:56 UTC 
(rev 9120)
+++ branches/SAMBA_4_0/source/torture/raw/unlink.c  2005-08-05 15:34:01 UTC 
(rev 9121)
@@ -195,7 +195,7 @@
printf("Testing with delete_on_close 0\n");
fnum = create_complex_file(cli, mem_ctx, fname);
 
-   sfinfo.disposition_info.level = RAW_SFILEINFO_DISPOSITION_INFORMATION;
+   sfinfo.disposition_info.level = RAW_SFILEINFO_DISPOSITION_INFO;
sfinfo.disposition_info.file.fnum = fnum;
sfinfo.disposition_info.in.delete_on_close = 0;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);
@@ -223,7 +223,7 @@
status = create_directory_handle(cli->tree, dname, &fnum);
CHECK_STATUS(status, NT_STATUS_OK);
 
-   sfinfo.disposition_info.level = RAW_SFILEINFO_DISPOSITION_INFORMATION;
+   sfinfo.disposition_info.level = RAW_SFILEINFO_DISPOSITION_INFO;
sfinfo.disposition_info.file.fnum = fnum;
sfinfo.disposition_info.in.delete_on_close = 0;
status = smb_raw_setfileinfo(cli->tree, &sfinfo);



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

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 15:31:56 + (Fri, 05 Aug 2005)
New Revision: 9120

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

Log:
added the BASE-DISCONNECT test to our set of standard tests

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


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/test_posix.sh
===
--- branches/SAMBA_4_0/source/script/tests/test_posix.sh2005-08-05 
15:30:33 UTC (rev 9119)
+++ branches/SAMBA_4_0/source/script/tests/test_posix.sh2005-08-05 
15:31:56 UTC (rev 9120)
@@ -27,7 +27,7 @@
 tests="$tests BASE-DENY3 BASE-XCOPY BASE-OPEN BASE-DENYDOS"
 tests="$tests BASE-PROPERTIES BASE-MANGLE"
 tests="$tests BASE-CHKPATH BASE-SECLEAK BASE-TRANS2"
-tests="$tests BASE-NTDENY1 BASE-NTDENY2  BASE-RENAME BASE-OPENATTR"
+tests="$tests BASE-NTDENY1 BASE-NTDENY2  BASE-RENAME BASE-OPENATTR 
BASE-DISCONNECT"
 tests="$tests RAW-QFSINFO RAW-QFILEINFO RAW-SFILEINFO-BUG RAW-SFILEINFO"
 tests="$tests RAW-LOCK RAW-MKDIR RAW-SEEK RAW-CONTEXT RAW-MUX RAW-OPEN 
RAW-WRITE"
 tests="$tests RAW-UNLINK RAW-READ RAW-CLOSE RAW-IOCTL RAW-SEARCH RAW-CHKPATH 
RAW-RENAME"



svn commit: samba r9119 - in branches/SAMBA_4_0/source: param scripting/ejs

2005-08-05 Thread tridge
Author: tridge
Date: 2005-08-05 15:30:33 + (Fri, 05 Aug 2005)
New Revision: 9119

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

Log:
added a lp.categories() call in the loadparm js object, to allow
retrieval of the smb.conf parameter categories. This will make writing
a smb.conf editor easier.

Modified:
   branches/SAMBA_4_0/source/param/loadparm.c
   branches/SAMBA_4_0/source/param/loadparm.h
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_config.c


Changeset:
Modified: branches/SAMBA_4_0/source/param/loadparm.c
===
--- branches/SAMBA_4_0/source/param/loadparm.c  2005-08-05 15:20:43 UTC (rev 
9118)
+++ branches/SAMBA_4_0/source/param/loadparm.c  2005-08-05 15:30:33 UTC (rev 
9119)
@@ -89,21 +89,6 @@
 static BOOL defaults_saved = False;
 
 
-#define FLAG_BASIC 0x0001 /* fundamental options */
-#define FLAG_SHARE 0x0002 /* file sharing options */
-#define FLAG_PRINT 0x0004 /* printing options */
-#define FLAG_GLOBAL0x0008 /* local options that should be globally 
settable in SWAT */
-#define FLAG_WIZARD0x0010 /* Parameters that the wizard will operate on */
-#define FLAG_ADVANCED  0x0020 /* Parameters that the wizard will operate on */
-#define FLAG_DEVELOPER 0x0040 /* Parameters that the wizard will 
operate on */
-#define FLAG_DEPRECATED 0x1000 /* options that should no longer be used */
-#define FLAG_HIDE  0x2000 /* options that should be hidden in SWAT */
-#define FLAG_DOS_STRING 0x4000 /* convert from UNIX to DOS codepage when 
reading this string. */
-#define FLAG_CMDLINE0x8000 /* this option was set from the command line */
-
-
-
-
 struct param_opt {
struct param_opt *prev, *next;
char *key;
@@ -760,6 +745,7 @@
{"msdfs root", P_BOOL, P_LOCAL, &sDefault.bMSDfsRoot, NULL, NULL, 
FLAG_SHARE},
{"msdfs proxy", P_STRING, P_LOCAL, &sDefault.szMSDfsProxy, NULL, NULL, 
FLAG_SHARE},
{"host msdfs", P_BOOL, P_GLOBAL, &Globals.bHostMSDfs, NULL, NULL, 
FLAG_ADVANCED | FLAG_DEVELOPER},
+
{"Winbind options", P_SEP, P_SEPARATOR},
 
{"winbind uid", P_STRING, P_GLOBAL, &Globals.szWinbindUID, 
handle_winbind_uid, NULL, FLAG_ADVANCED | FLAG_DEVELOPER},
@@ -775,6 +761,16 @@
{NULL, P_BOOL, P_NONE, NULL, NULL, NULL, 0}
 };
 
+
+/*
+  return the parameter table
+*/
+struct parm_struct *lp_parm_table(void)
+{
+   return parm_table;
+}
+
+
 /***
  Initialise the sDefault parameter structure for the printer values.
 ***/
@@ -931,11 +927,7 @@
do_parameter("max connections", "-1");
 
do_parameter("dcerpc endpoint servers", "epmapper srvsvc wkssvc rpcecho 
samr netlogon lsarpc spoolss drsuapi winreg dssetup");
-#ifdef WITH_KRB5
do_parameter("server services", "smb rpc nbt ldap cldap web kdc");
-#else
-   do_parameter("server services", "smb rpc nbt ldap cldap web");
-#endif
do_parameter("ntptr providor", "simple_ldb");
do_parameter("auth methods", "anonymous sam_ignoredomain");
do_parameter("smb passwd file", dyn_SMB_PASSWD_FILE);

Modified: branches/SAMBA_4_0/source/param/loadparm.h
===
--- branches/SAMBA_4_0/source/param/loadparm.h  2005-08-05 15:20:43 UTC (rev 
9118)
+++ branches/SAMBA_4_0/source/param/loadparm.h  2005-08-05 15:30:33 UTC (rev 
9119)
@@ -58,3 +58,16 @@
const char **lvalue;
} def;
 };
+
+#define FLAG_BASIC 0x0001 /* fundamental options */
+#define FLAG_SHARE 0x0002 /* file sharing options */
+#define FLAG_PRINT 0x0004 /* printing options */
+#define FLAG_GLOBAL0x0008 /* local options that should be globally 
settable in SWAT */
+#define FLAG_WIZARD0x0010 /* Parameters that the wizard will operate on */
+#define FLAG_ADVANCED  0x0020 /* Parameters that the wizard will operate on */
+#define FLAG_DEVELOPER 0x0040 /* Parameters that the wizard will 
operate on */
+#define FLAG_DEPRECATED 0x1000 /* options that should no longer be used */
+#define FLAG_HIDE  0x2000 /* options that should be hidden in SWAT */
+#define FLAG_DOS_STRING 0x4000 /* convert from UNIX to DOS codepage when 
reading this string. */
+#define FLAG_CMDLINE0x8000 /* this option was set from the command line */
+

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbcalls_config.c
===
--- branches/SAMBA_4_0/source/scripting/ejs/smbcalls_config.c   2005-08-05 
15:20:43 UTC (rev 9118)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbcalls_config.c   2005-08-05 
15:30:33 UTC (rev 9119)
@@ -45,6 +45,27 @@
 
 
 /*
+  return a list of parameter categories
+*/
+static int ejs_lpCategories(MprVarHandle eid, int argc, char **argv)
+{
+   struct parm_struct *parm_table

svn commit: samba r9118 - in branches/SOC/SAMBA_4_0: . source source/auth/gensec source/auth/kerberos source/build/m4 source/build/pidl source/build/pidl/Parse/Pidl/Ethereal source/heimdal/lib/roken s

2005-08-05 Thread brad
Author: brad
Date: 2005-08-05 15:20:43 + (Fri, 05 Aug 2005)
New Revision: 9118

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

Log:
 [EMAIL PROTECTED]:  j0j0 | 2005-08-05 09:25:04 -0600
  [EMAIL PROTECTED]:  j0j0 | 2005-08-05 09:23:04 -0600
   [EMAIL PROTECTED] (orig r9067):  lmuelle | 2005-08-04 11:32:05 -0600
   Use the right variable name in the example too.
   
   [EMAIL PROTECTED] (orig r9068):  lmuelle | 2005-08-04 11:33:10 -0600
   Move # sign.
   
   [EMAIL PROTECTED] (orig r9070):  mimir | 2005-08-04 13:59:57 -0600
   More fields in ejs credentials object.
   
   
   rafal
   
   
   [EMAIL PROTECTED] (orig r9071):  mimir | 2005-08-04 14:22:25 -0600
   Set real and workstation fields in ejs credentials object.
   
   
   rafal
   
   
   [EMAIL PROTECTED] (orig r9074):  tridge | 2005-08-04 15:00:38 -0600
   cope with a null ntvfs context in disconnect, so the destructor that
   runs on a failed ntvfs init works
   
   [EMAIL PROTECTED] (orig r9077):  metze | 2005-08-04 17:43:05 -0600
   HEIMDAL_ROKEN needs inet_aton and on solaris it's in -lsocket
   
   this should fix the build on sun1
   
   metze
   [EMAIL PROTECTED] (orig r9078):  metze | 2005-08-04 17:56:18 -0600
   - move charset stuff to lib/charset
   - don't use the global $LIBS variable for -liconv as $LIBS is not used 
anymore
   
   should fix the build on solaris 10
   
   metze
   [EMAIL PROTECTED] (orig r9081):  jelmer | 2005-08-04 18:30:21 -0600
   Work on new ethereal parser generator, partially based on 
   Ronnie Sahlberg's idl2eth.c
   
   [EMAIL PROTECTED] (orig r9082):  tridge | 2005-08-04 18:31:06 -0600
   added the ECMA functions encodeURIComponent() and
   decodeURIComponent(), which I am using as part of my object
   linearisation code
   
   [EMAIL PROTECTED] (orig r9084):  abartlet | 2005-08-04 18:41:53 -0600
   'resign' the sample PAC for the validation of the signature algorithms.
   
   If we ever get problems with the kerberos code, it should show up as a
   different signature in this PAC.
   
   This involved returning more data from the pac functions, so changed
   some callers and split up some functions.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r9085):  abartlet | 2005-08-04 18:56:21 -0600
   Missing structs.h entry.
   
   Andrew Bartlett
   
   [EMAIL PROTECTED] (orig r9088):  jelmer | 2005-08-04 18:59:24 -0600
   More ethereal parser generator updates
   
   [EMAIL PROTECTED] (orig r9089):  tpot | 2005-08-04 19:04:45 -0600
   Start generating module init and top level ejs functions for smb_interfaces.
   
   [EMAIL PROTECTED] (orig r9090):  mimir | 2005-08-04 19:23:06 -0600
   Another field in usermod function - account flags.
   
   
   rafal
   
   
   [EMAIL PROTECTED] (orig r9092):  tpot | 2005-08-04 19:23:35 -0600
   Generate some more stub functions.
   
   [EMAIL PROTECTED] (orig r9094):  jelmer | 2005-08-04 19:57:45 -0600
   More ethereal parser updates, only header fields left to fix + actual data 
call
   
   [EMAIL PROTECTED] (orig r9096):  tpot | 2005-08-04 22:36:31 -0600
   Spelling.
   
   [EMAIL PROTECTED] (orig r9099):  tpot | 2005-08-04 22:50:32 -0600
   Start generating code to pull/push fields.  Generate functions to call 
   the smb_raw_foo() calls.
   
   [EMAIL PROTECTED] (orig r9101):  tpot | 2005-08-04 23:26:58 -0600
   Check in file generated by Parse::YAPP.
   
   [EMAIL PROTECTED] (orig r9102):  tpot | 2005-08-04 23:32:39 -0600
   Generate files in $srcdir/libcli/gen_raw instead of $srcdir.
   
   Start fixing compile problems in generated output.
   
   [EMAIL PROTECTED] (orig r9104):  jelmer | 2005-08-05 01:16:07 -0600
   Finish ethereal parser generator. Still a couple of minor issues 
   remaining to get it to generate completely compilable code.
   
   [EMAIL PROTECTED] (orig r9105):  metze | 2005-08-05 02:09:43 -0600
   match the prototype of netdb.h
   this should fix the build on solaris 10
   
   lha can that be merged to the main heimdal if that apears to not break
   the build on other platforms
   
   metze
   
   [EMAIL PROTECTED] (orig r9106):  metze | 2005-08-05 04:11:22 -0600
   look for something more usefull in the -lnsl
   
   (this is for solaris)
   
   metze
   
   [EMAIL PROTECTED] (orig r9107):  metze | 2005-08-05 04:51:45 -0600
   try to get the build on solaris going...
   
   metze
   
   [EMAIL PROTECTED] (orig r9108):  metze | 2005-08-05 04:52:53 -0600
   try to get aix building...
   
   metze
   
   [EMAIL PROTECTED] (orig r9109):  metze | 2005-08-05 05:13:48 -0600
   set HAVE_GAI_STRERROR when the function was found donnot know whz this
   doesnnot go without this patch
   
   metze
   
   [EMAIL PROTECTED] (orig r9110):  metze | 2005-08-05 05:34:36 -0600
   use printf again
   
   metyze
   
   [EMAIL PROTECTED] (orig r9111):  metze | 2005-08-05 05:56:02 -0600
   actually use the roken inet_aton when nothing was found
   
   metze
   
  
 

Added:
   branches/SOC/SAMBA_4_0/source/build/pidl/Parse/

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

2005-08-05 Thread brad
Author: brad
Date: 2005-08-05 14:50:26 + (Fri, 05 Aug 2005)
New Revision: 9117

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

Log:
 [EMAIL PROTECTED]:  j0j0 | 2005-08-05 08:55:58 -0600
 Committing minor changes before merge

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


Changeset:

Property changes on: branches/SOC/SAMBA_4_0
___
Name: svk:merge
   - 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:9063
d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5279
d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5276
   + 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:9063
d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/SAMBA_4_0:5281
d349723c-e9fc-0310-b8a8-fdedf1c27407:/local/samba-SAMBA_4_0:5276

Modified: branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c
===
--- branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c  2005-08-05 14:35:17 UTC 
(rev 9116)
+++ branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c  2005-08-05 14:50:26 UTC 
(rev 9117)
@@ -205,13 +205,13 @@
 {
NTSTATUS status;
BOOL ret = True;
-   
-   ctx->dcerpc_evt_ctx = NULL;
+   struct event_context *event = NULL;
+   /*ctx->dcerpc_evt_ctx = NULL;*/
status = dcerpc_pipe_connect_b(ctx,
   &b->pipe, ctx->drsuapi_binding, 
   DCERPC_DRSUAPI_UUID,
   DCERPC_DRSUAPI_VERSION,
-  credentials, ctx->dcerpc_evt_ctx);
+  credentials, event);

if (!NT_STATUS_IS_OK(status)) {
printf("Failed to connect to server as a BDC: %s\n", 
nt_errstr(status));
@@ -736,7 +736,7 @@
libnet_r.in.domain_name is a netbios domain name.
*/

-   ctx->libnet_ctx = libnet_context_init(NULL);
+   ctx->libnet_ctx = libnet_context_init(evt_ctx);
if (ctx->libnet_ctx == NULL) {
 printf("libnet_context_init() failed, ctx->libnet_ctx not 
initialized.\n");
}



svn commit: samba r9116 - in trunk/source: include registry rpc_server

2005-08-05 Thread jerry
Author: jerry
Date: 2005-08-05 14:35:17 + (Fri, 05 Aug 2005)
New Revision: 9116

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

Log:
cleaning up eventlog code
Modified:
   trunk/source/include/rpc_eventlog.h
   trunk/source/registry/reg_eventlog.c
   trunk/source/rpc_server/srv_eventlog.c
   trunk/source/rpc_server/srv_eventlog_nt.c


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


svn commit: samba r9115 - branches/SAMBA_3_0/source/registry trunk/source/registry

2005-08-05 Thread jerry
Author: jerry
Date: 2005-08-05 14:34:25 + (Fri, 05 Aug 2005)
New Revision: 9115

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

Log:
using #define for reg paths rather than typing the string
Modified:
   branches/SAMBA_3_0/source/registry/reg_db.c
   trunk/source/registry/reg_db.c


Changeset:
Modified: branches/SAMBA_3_0/source/registry/reg_db.c
===
--- branches/SAMBA_3_0/source/registry/reg_db.c 2005-08-05 14:32:42 UTC (rev 
9114)
+++ branches/SAMBA_3_0/source/registry/reg_db.c 2005-08-05 14:34:25 UTC (rev 
9115)
@@ -45,12 +45,16 @@
KEY_PRINTING,
KEY_SHARES,
KEY_EVENTLOG,
+   "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib",
+   "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib\\009",
"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors",
"HKLM\\SYSTEM\\CurrentControlSet\\Control\\ProductOptions",
"HKLM\\SYSTEM\\CurrentControlSet\\Services\\TcpIp\\Parameters",
"HKLM\\SYSTEM\\CurrentControlSet\\Services\\Netlogon\\Parameters",
"HKU",
"HKCR",
+   "HKPD",
+   "HKPT",
 NULL };
 
 struct builtin_regkey_value {
@@ -64,12 +68,14 @@
 };
 
 static struct builtin_regkey_value builtin_registry_values[] = {
-   { "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 
-   "SystemRoot", REG_SZ, { "c:\\Windows" } },
-   { "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Ports",  
+   { KEY_PRINTING_PORTS,
SAMBA_PRINTER_PORT_NAME, REG_SZ, { "" } },
-   { "HKLM\\SOFTWARE\\Microsoft\\Windows 
NT\\CurrentVersion\\Print\\Printers",  
+   { KEY_PRINTING_2K,
"DefaultSpoolDirectory", REG_SZ, { 
"C:\\Windows\\System32\\Spool\\Printers" } },
+   { KEY_EVENTLOG,
+   "DisplayName", REG_SZ, { "Event Log" } }, 
+   { KEY_EVENTLOG,
+   "ErrorControl", REG_DWORD, { (char*)0x0001 } },
{ NULL, NULL, 0, { NULL } }
 };
 

Modified: trunk/source/registry/reg_db.c
===
--- trunk/source/registry/reg_db.c  2005-08-05 14:32:42 UTC (rev 9114)
+++ trunk/source/registry/reg_db.c  2005-08-05 14:34:25 UTC (rev 9115)
@@ -68,13 +68,13 @@
 };
 
 static struct builtin_regkey_value builtin_registry_values[] = {
-   { "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Ports",  
+   { KEY_PRINTING_PORTS,
SAMBA_PRINTER_PORT_NAME, REG_SZ, { "" } },
-   { "HKLM\\SOFTWARE\\Microsoft\\Windows 
NT\\CurrentVersion\\Print\\Printers",  
+   { KEY_PRINTING_2K,
"DefaultSpoolDirectory", REG_SZ, { 
"C:\\Windows\\System32\\Spool\\Printers" } },
-   { "HKLM\\SYSTEM\\CurrentControlSet\\Services\\Eventlog",
+   { KEY_EVENTLOG,
"DisplayName", REG_SZ, { "Event Log" } }, 
-   { "HKLM\\SYSTEM\\CurrentControlSet\\Services\\Eventlog",
+   { KEY_EVENTLOG,
"ErrorControl", REG_DWORD, { (char*)0x0001 } },
{ NULL, NULL, 0, { NULL } }
 };



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

2005-08-05 Thread jerry
Author: jerry
Date: 2005-08-05 14:32:42 + (Fri, 05 Aug 2005)
New Revision: 9114

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

Log:
removing gratuitous debug messages
Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c
   trunk/source/rpc_server/srv_reg_nt.c


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


svn commit: samba r9113 - in trunk/source: libsmb rpc_server

2005-08-05 Thread jmcd
Author: jmcd
Date: 2005-08-05 12:33:03 + (Fri, 05 Aug 2005)
New Revision: 9113

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

Log:
Fix #2953 - credentials chain on DC gets out of sync with client when
NT_STATUS_NO_USER returned.  We were moving to the next step in the
chain when the client wasn't.  Only update when the user logs on.

Modified:
   trunk/source/libsmb/credentials.c
   trunk/source/rpc_server/srv_netlog_nt.c


Changeset:
Modified: trunk/source/libsmb/credentials.c
===
--- trunk/source/libsmb/credentials.c   2005-08-05 12:33:00 UTC (rev 9112)
+++ trunk/source/libsmb/credentials.c   2005-08-05 12:33:03 UTC (rev 9113)
@@ -208,8 +208,36 @@

DEBUG(5,("deal_with_creds: clnt_cred=%s\n", 
credstr(sto_clnt_cred->challenge.data)));
 
-   /* store new seed in client credentials */
-   SIVAL(sto_clnt_cred->challenge.data, 0, new_cred);
+   /* Bug #2953 - don't store new seed in client credentials 
+  here, because we need to make sure we're moving forward first
+*/
 
return True;
 }
+
+/*
+  stores new seed in client credentials
+  jmcd - Bug #2953 - moved this functionality out of deal_with_creds, because 
we're
+  not supposed to move to the next step in the chain if a nonexistent user 
tries to logon
+*/
+void reseed_client_creds(DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_clnt_cred)
+{
+   UTIME new_clnt_time;
+   uint32 new_cred;
+
+   /* increment client time by one second */
+   new_clnt_time.time = rcv_clnt_cred->timestamp.time + 1;
+
+   /* first 4 bytes of the new seed is old client 4 bytes + clnt time + 1 
*/
+   new_cred = IVAL(sto_clnt_cred->challenge.data, 0);
+   new_cred += new_clnt_time.time;
+
+   DEBUG(5,("reseed_client_creds: new_cred[0]=%x\n", new_cred));
+   DEBUG(5,("reseed_client_creds: new_clnt_time=%x\n", 
+new_clnt_time.time));
+   DEBUG(5,("reseed_client_creds: clnt_cred=%s\n", 
+credstr(sto_clnt_cred->challenge.data)));
+
+   /* store new seed in client credentials */
+   SIVAL(sto_clnt_cred->challenge.data, 0, new_cred);
+}  

Modified: trunk/source/rpc_server/srv_netlog_nt.c
===
--- trunk/source/rpc_server/srv_netlog_nt.c 2005-08-05 12:33:00 UTC (rev 
9112)
+++ trunk/source/rpc_server/srv_netlog_nt.c 2005-08-05 12:33:03 UTC (rev 
9113)
@@ -449,6 +449,7 @@
if (!(p->dc.authenticated && deal_with_creds(p->dc.sess_key, 
&p->dc.clnt_cred, &q_u->clnt_id.cred, &srv_cred)))
return NT_STATUS_INVALID_HANDLE;
 
+   reseed_client_creds(&p->dc.clnt_cred, &q_u->clnt_id.cred);
memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
 
DEBUG(5,("_net_srv_pwset: %d\n", __LINE__));
@@ -545,6 +546,8 @@
 &q_u->sam_id.client.cred, 
&srv_cred)))
return NT_STATUS_INVALID_HANDLE;
 
+   /* what happens if we get a logoff for an unknown user? */
+   reseed_client_creds(&p->dc.clnt_cred, &q_u->sam_id.client.cred);
memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
 
/*  maybe we want to say 'no', reject the client's credentials */
@@ -603,11 +606,6 @@
if (!(p->dc.authenticated && deal_with_creds(p->dc.sess_key, 
&p->dc.clnt_cred, &q_u->sam_id.client.cred, &srv_cred)))
return NT_STATUS_INVALID_HANDLE;
 
-   memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
-
-   r_u->buffer_creds = 1; /* yes, we have valid server credentials */
-   memcpy(&r_u->srv_creds, &srv_cred, sizeof(r_u->srv_creds));
-
/* find the username */
 
switch (q_u->sam_id.logon_level) {
@@ -719,6 +717,15 @@
return status;
}
 
+   /* moved from right after deal_with_creds above, since we weren't
+  supposed to update unless logon was successful */
+
+   reseed_client_creds(&p->dc.clnt_cred, &q_u->sam_id.client.cred);
+   memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
+
+   r_u->buffer_creds = 1; /* yes, we have valid server credentials */
+   memcpy(&r_u->srv_creds, &srv_cred, sizeof(r_u->srv_creds));
+
if (server_info->guest) {
/* We don't like guest domain logons... */
DEBUG(5,("_net_sam_logon: Attempted domain logon as GUEST 
denied.\n"));



svn commit: samba r9112 - in branches/SAMBA_3_0/source: libsmb rpc_server

2005-08-05 Thread jmcd
Author: jmcd
Date: 2005-08-05 12:33:00 + (Fri, 05 Aug 2005)
New Revision: 9112

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

Log:
Fix #2953 - credentials chain on DC gets out of sync with client when
NT_STATUS_NO_USER returned.  We were moving to the next step in the 
chain when the client wasn't.  Only update when the user logs on.

Modified:
   branches/SAMBA_3_0/source/libsmb/credentials.c
   branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/credentials.c
===
--- branches/SAMBA_3_0/source/libsmb/credentials.c  2005-08-05 11:56:02 UTC 
(rev 9111)
+++ branches/SAMBA_3_0/source/libsmb/credentials.c  2005-08-05 12:33:00 UTC 
(rev 9112)
@@ -208,8 +208,36 @@

DEBUG(5,("deal_with_creds: clnt_cred=%s\n", 
credstr(sto_clnt_cred->challenge.data)));
 
-   /* store new seed in client credentials */
-   SIVAL(sto_clnt_cred->challenge.data, 0, new_cred);
+   /* Bug #2953 - don't store new seed in client credentials 
+  here, because we need to make sure we're moving forward first
+*/
 
return True;
 }
+
+/*
+  stores new seed in client credentials
+  jmcd - Bug #2953 - moved this functionality out of deal_with_creds, because 
we're
+  not supposed to move to the next step in the chain if a nonexistent user 
tries to logon
+*/
+void reseed_client_creds(DOM_CRED *sto_clnt_cred, DOM_CRED *rcv_clnt_cred)
+{
+   UTIME new_clnt_time;
+   uint32 new_cred;
+
+   /* increment client time by one second */
+   new_clnt_time.time = rcv_clnt_cred->timestamp.time + 1;
+
+   /* first 4 bytes of the new seed is old client 4 bytes + clnt time + 1 
*/
+   new_cred = IVAL(sto_clnt_cred->challenge.data, 0);
+   new_cred += new_clnt_time.time;
+
+   DEBUG(5,("reseed_client_creds: new_cred[0]=%x\n", new_cred));
+   DEBUG(5,("reseed_client_creds: new_clnt_time=%x\n", 
+new_clnt_time.time));
+   DEBUG(5,("reseed_client_creds: clnt_cred=%s\n", 
+credstr(sto_clnt_cred->challenge.data)));
+
+   /* store new seed in client credentials */
+   SIVAL(sto_clnt_cred->challenge.data, 0, new_cred);
+}  

Modified: branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c2005-08-05 
11:56:02 UTC (rev 9111)
+++ branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c2005-08-05 
12:33:00 UTC (rev 9112)
@@ -449,6 +449,7 @@
if (!(p->dc.authenticated && deal_with_creds(p->dc.sess_key, 
&p->dc.clnt_cred, &q_u->clnt_id.cred, &srv_cred)))
return NT_STATUS_INVALID_HANDLE;
 
+   reseed_client_creds(&p->dc.clnt_cred, &q_u->clnt_id.cred);
memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
 
DEBUG(5,("_net_srv_pwset: %d\n", __LINE__));
@@ -545,6 +546,8 @@
 &q_u->sam_id.client.cred, 
&srv_cred)))
return NT_STATUS_INVALID_HANDLE;
 
+   /* what happens if we get a logoff for an unknown user? */
+   reseed_client_creds(&p->dc.clnt_cred, &q_u->sam_id.client.cred);
memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
 
/*  maybe we want to say 'no', reject the client's credentials */
@@ -603,11 +606,6 @@
if (!(p->dc.authenticated && deal_with_creds(p->dc.sess_key, 
&p->dc.clnt_cred, &q_u->sam_id.client.cred, &srv_cred)))
return NT_STATUS_INVALID_HANDLE;
 
-   memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
-
-   r_u->buffer_creds = 1; /* yes, we have valid server credentials */
-   memcpy(&r_u->srv_creds, &srv_cred, sizeof(r_u->srv_creds));
-
/* find the username */
 
switch (q_u->sam_id.logon_level) {
@@ -719,6 +717,15 @@
return status;
}
 
+   /* moved from right after deal_with_creds above, since we weren't
+  supposed to update unless logon was successful */
+
+   reseed_client_creds(&p->dc.clnt_cred, &q_u->sam_id.client.cred);
+   memcpy(&p->dc.srv_cred, &p->dc.clnt_cred, sizeof(p->dc.clnt_cred));
+
+   r_u->buffer_creds = 1; /* yes, we have valid server credentials */
+   memcpy(&r_u->srv_creds, &srv_cred, sizeof(r_u->srv_creds));
+
if (server_info->guest) {
/* We don't like guest domain logons... */
DEBUG(5,("_net_sam_logon: Attempted domain logon as GUEST 
denied.\n"));



svn commit: samba r9111 - in branches/SAMBA_4_0/source/heimdal_build: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 11:56:02 + (Fri, 05 Aug 2005)
New Revision: 9111

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

Log:
actually use the roken inet_aton when nothing was found

metze

Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.m4
   branches/SAMBA_4_0/source/heimdal_build/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/config.m4
===
--- branches/SAMBA_4_0/source/heimdal_build/config.m4   2005-08-05 11:34:36 UTC 
(rev 9110)
+++ branches/SAMBA_4_0/source/heimdal_build/config.m4   2005-08-05 11:56:02 UTC 
(rev 9111)
@@ -203,6 +203,12 @@
SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_ADDRINFO, YES)
 fi
 
+# only add inet_aton if needed
+SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_INET_ATON, NO)
+if test t$ac_cv_func_inet_aton != tyes; then
+   SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_INET_ATON, YES)
+fi
+
 # only add gai_strerror if needed
 SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, NO)
 AC_CHECK_FUNC(gai_strerror)

Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===
--- branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-05 11:34:36 UTC 
(rev 9110)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-05 11:56:02 UTC 
(rev 9111)
@@ -267,6 +267,12 @@
 NOPROTO = YES
 
 ###
+# Start SUBSYSTEM HEIMDAL_ROKEN_GAI_STRERROR
+[SUBSYSTEM::HEIMDAL_ROKEN_INET_ATON]
+ADD_OBJ_FILES = heimdal/lib/roken/inet_aton.o
+NOPROTO = YES
+
+###
 # Start SUBSYSTEM HEIMDAL_ROKEN_ADDRINFO
 [SUBSYSTEM::HEIMDAL_ROKEN_ADDRINFO]
 ADD_OBJ_FILES = \
@@ -305,6 +311,7 @@
 REQUIRED_SUBSYSTEMS = \
HEIMDAL_ROKEN_ADDRINFO \
HEIMDAL_ROKEN_GAI_STRERROR \
+   HEIMDAL_ROKEN_INET_ATON \
EXT_LIB_SOCKET \
EXT_LIB_XNET
 NOPROTO = YES



svn commit: samba r9110 - in branches/SAMBA_4_0/source/lib/socket: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 11:34:36 + (Fri, 05 Aug 2005)
New Revision: 9110

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

Log:
use printf again

metyze

Modified:
   branches/SAMBA_4_0/source/lib/socket/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/socket/config.m4
===
--- branches/SAMBA_4_0/source/lib/socket/config.m4  2005-08-05 11:13:48 UTC 
(rev 9109)
+++ branches/SAMBA_4_0/source/lib/socket/config.m4  2005-08-05 11:34:36 UTC 
(rev 9110)
@@ -33,11 +33,11 @@
 if test x"$ac_cv_func_connect" = x"no"; then
 case "$LIBS $SOCKET_LIBS" in
 *-lnsl*) ;;
-*) AC_CHECK_LIB_EXT(nsl_s, SOCKET_LIBS, inet_aton) ;;
+*) AC_CHECK_LIB_EXT(nsl_s, SOCKET_LIBS, printf) ;;
 esac
 case "$LIBS $SOCKET_LIBS" in
 *-lnsl*) ;;
-*) AC_CHECK_LIB_EXT(nsl, SOCKET_LIBS, inet_aton) ;;
+*) AC_CHECK_LIB_EXT(nsl, SOCKET_LIBS, printf) ;;
 esac
 case "$LIBS $SOCKET_LIBS" in
 *-lsocket*) ;;



svn commit: samba r9109 - in branches/SAMBA_4_0/source/heimdal_build: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 11:13:48 + (Fri, 05 Aug 2005)
New Revision: 9109

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

Log:
set HAVE_GAI_STRERROR when the function was found donnot know whz this
doesnnot go without this patch

metze

Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/config.m4
===
--- branches/SAMBA_4_0/source/heimdal_build/config.m4   2005-08-05 10:52:53 UTC 
(rev 9108)
+++ branches/SAMBA_4_0/source/heimdal_build/config.m4   2005-08-05 11:13:48 UTC 
(rev 9109)
@@ -209,8 +209,12 @@
 if test t$ac_cv_func_gai_strerror != tyes; then
 AC_SEARCH_LIBS_EXT(gai_strerror, [xnet], XNET_LIBS)
 AC_CHECK_FUNC_EXT(gai_strerror, $XNET_LIBS)
-if test t$ac_cv_func_gai_strerror != tyes; then
+if test t$ac_cv_func_ext_gai_strerror != tyes; then
SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, YES)
+else
+   AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether gai_strerror() is available])
 fi
+else
+AC_DEFINE(HAVE_GAI_STRERROR,1,[Whether gai_strerror() is available])
 fi
 
SMB_EXT_LIB(XNET,[${XNET_LIBS}],[${XNET_CFLAGS}],[${XNET_CPPFLAGS}],[${XNET_LDFLAGS}])



svn commit: samba r9108 - in branches/SAMBA_4_0/source/build/m4: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 10:52:53 + (Fri, 05 Aug 2005)
New Revision: 9108

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

Log:
try to get aix building...

metze

Modified:
   branches/SAMBA_4_0/source/build/m4/rewrite.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4
===
--- branches/SAMBA_4_0/source/build/m4/rewrite.m4   2005-08-05 10:51:45 UTC 
(rev 9107)
+++ branches/SAMBA_4_0/source/build/m4/rewrite.m4   2005-08-05 10:52:53 UTC 
(rev 9108)
@@ -28,6 +28,14 @@
   fi
 ;;
 #
+# on AIX having _LARGE_FILES and _LARGE_FILE_API defined
+# causes compile errors because function will declared 2 times
+# with different prototypes
+#
+*aix*)
+  CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE"
+;;
+#
 # VOS may need to have POSIX support and System V compatibility enabled.
 #
 *vos*)



svn commit: samba r9107 - in branches/SAMBA_4_0/source: heimdal/lib/roken heimdal_build

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 10:51:45 + (Fri, 05 Aug 2005)
New Revision: 9107

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

Log:
try to get the build on solaris going...

metze

Added:
   branches/SAMBA_4_0/source/heimdal/lib/roken/inet_aton.c
Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.m4
   branches/SAMBA_4_0/source/heimdal_build/config.mk


Changeset:
Added: branches/SAMBA_4_0/source/heimdal/lib/roken/inet_aton.c
===
--- branches/SAMBA_4_0/source/heimdal/lib/roken/inet_aton.c 2005-08-05 
10:11:22 UTC (rev 9106)
+++ branches/SAMBA_4_0/source/heimdal/lib/roken/inet_aton.c 2005-08-05 
10:51:45 UTC (rev 9107)
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska H�gskolan
+ * (Royal Institute of Technology, Stockholm, Sweden).
+ * All rights reserved.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ * 
+ * 3. Neither the name of the Institute nor the names of its contributors
+ *may be used to endorse or promote products derived from this software
+ *without specific prior written permission.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include 
+RCSID("$Id: inet_aton.c,v 1.14 2005/04/12 11:28:52 lha Exp $");
+#endif
+
+#include "roken.h"
+
+/* Minimal implementation of inet_aton.
+ * Cannot distinguish between failure and a local broadcast address. */
+
+int ROKEN_LIB_FUNCTION
+inet_aton(const char *cp, struct in_addr *addr)
+{
+  addr->s_addr = inet_addr(cp);
+  return (addr->s_addr == INADDR_NONE) ? 0 : 1;
+}

Modified: branches/SAMBA_4_0/source/heimdal_build/config.m4
===
--- branches/SAMBA_4_0/source/heimdal_build/config.m4   2005-08-05 10:11:22 UTC 
(rev 9106)
+++ branches/SAMBA_4_0/source/heimdal_build/config.m4   2005-08-05 10:51:45 UTC 
(rev 9107)
@@ -64,7 +64,6 @@
inet_aton   \
gethostname \
getnameinfo \
-   gai_strerror\
iruserok\
putenv  \
rcmd\
@@ -91,7 +90,6 @@
flock   \
getaddrinfo \
freeaddrinfo\
-   gai_strerror\
writev
 ])
 
@@ -204,3 +202,15 @@
 if test t$ac_cv_func_getaddrinfo != tyes; then
SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_ADDRINFO, YES)
 fi
+
+# only add gai_strerror if needed
+SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, NO)
+AC_CHECK_FUNC(gai_strerror)
+if test t$ac_cv_func_gai_strerror != tyes; then
+AC_SEARCH_LIBS_EXT(gai_strerror, [xnet], XNET_LIBS)
+AC_CHECK_FUNC_EXT(gai_strerror, $XNET_LIBS)
+if test t$ac_cv_func_gai_strerror != tyes; then
+   SMB_SUBSYSTEM_ENABLE(HEIMDAL_ROKEN_GAI_STRERROR, YES)
+fi
+fi
+SMB_EXT_LIB(XNET,[${XNET_LIBS}],[${XNET_CFLAGS}],[${XNET_CPPFLAGS}],[${XNET_LDFLAGS}])

Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===
--- branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-05 10:11:22 UTC 
(rev 9106)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-08-05 10:51:45 UTC 
(rev 9107)
@@ -261,10 +261,15 @@
 ###
 
 ###
+# Start SUBSYSTEM HEIMDAL_ROKEN_GAI_STRERROR
+[SUBSYSTEM::HEIMDAL_ROKEN_GAI_STRERROR]
+ADD_OBJ_FILES = heimdal/lib/roken/gai_strerror.o
+NOPROTO = YES
+
+###
 # Start SUBSYSTEM HE

svn commit: lorikeet r394 - in trunk/sangria/src/LatestDesign: . cgi classes/AccountManager classes/GroupManager

2005-08-05 Thread amit
Author: amit
Date: 2005-08-05 10:20:12 + (Fri, 05 Aug 2005)
New Revision: 394

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

Log:
cgi scripts added and GroupManager class updated
Added:
   trunk/sangria/src/LatestDesign/cgi/
   trunk/sangria/src/LatestDesign/cgi/groups.cgi
   trunk/sangria/src/LatestDesign/cgi/index.cgi
   trunk/sangria/src/LatestDesign/cgi/list_sambauser.cgi
   trunk/sangria/src/LatestDesign/cgi/listsmb_groups.cgi
   trunk/sangria/src/LatestDesign/cgi/manager.cgi
   trunk/sangria/src/LatestDesign/cgi/users.cgi
   trunk/sangria/src/LatestDesign/cgi/users_result.cgi
Modified:
   trunk/sangria/src/LatestDesign/classes/AccountManager/AccountManagerClass.py
   trunk/sangria/src/LatestDesign/classes/GroupManager/GroupManagerClass.py


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


svn commit: samba r9106 - in branches/SAMBA_4_0/source/lib/socket: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 10:11:22 + (Fri, 05 Aug 2005)
New Revision: 9106

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

Log:
look for something more usefull in the -lnsl

(this is for solaris)

metze

Modified:
   branches/SAMBA_4_0/source/lib/socket/config.m4


Changeset:
Modified: branches/SAMBA_4_0/source/lib/socket/config.m4
===
--- branches/SAMBA_4_0/source/lib/socket/config.m4  2005-08-05 08:09:43 UTC 
(rev 9105)
+++ branches/SAMBA_4_0/source/lib/socket/config.m4  2005-08-05 10:11:22 UTC 
(rev 9106)
@@ -33,11 +33,11 @@
 if test x"$ac_cv_func_connect" = x"no"; then
 case "$LIBS $SOCKET_LIBS" in
 *-lnsl*) ;;
-*) AC_CHECK_LIB_EXT(nsl_s, SOCKET_LIBS, printf) ;;
+*) AC_CHECK_LIB_EXT(nsl_s, SOCKET_LIBS, inet_aton) ;;
 esac
 case "$LIBS $SOCKET_LIBS" in
 *-lnsl*) ;;
-*) AC_CHECK_LIB_EXT(nsl, SOCKET_LIBS, printf) ;;
+*) AC_CHECK_LIB_EXT(nsl, SOCKET_LIBS, inet_aton) ;;
 esac
 case "$LIBS $SOCKET_LIBS" in
 *-lsocket*) ;;



svn commit: samba r9105 - in branches/SAMBA_4_0/source/heimdal/lib/roken: .

2005-08-05 Thread metze
Author: metze
Date: 2005-08-05 08:09:43 + (Fri, 05 Aug 2005)
New Revision: 9105

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

Log:
match the prototype of netdb.h
this should fix the build on solaris 10

lha can that be merged to the main heimdal if that apears to not break
the build on other platforms

metze

Modified:
   branches/SAMBA_4_0/source/heimdal/lib/roken/gai_strerror.c
   branches/SAMBA_4_0/source/heimdal/lib/roken/roken.h


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal/lib/roken/gai_strerror.c
===
--- branches/SAMBA_4_0/source/heimdal/lib/roken/gai_strerror.c  2005-08-05 
07:16:07 UTC (rev 9104)
+++ branches/SAMBA_4_0/source/heimdal/lib/roken/gai_strerror.c  2005-08-05 
08:09:43 UTC (rev 9105)
@@ -40,7 +40,7 @@
 
 static struct gai_error {
 int code;
-char *str;
+const char *str;
 } errors[] = {
 {EAI_NOERROR,  "no error"},
 #ifdef EAI_ADDRFAMILY
@@ -65,7 +65,7 @@
  *
  */
 
-char * ROKEN_LIB_FUNCTION
+const char * ROKEN_LIB_FUNCTION
 gai_strerror(int ecode)
 {
 struct gai_error *g;

Modified: branches/SAMBA_4_0/source/heimdal/lib/roken/roken.h
===
--- branches/SAMBA_4_0/source/heimdal/lib/roken/roken.h 2005-08-05 07:16:07 UTC 
(rev 9104)
+++ branches/SAMBA_4_0/source/heimdal/lib/roken/roken.h 2005-08-05 08:09:43 UTC 
(rev 9105)
@@ -543,7 +543,7 @@
 #endif
 
 #ifndef HAVE_GAI_STRERROR
-char * ROKEN_LIB_FUNCTION
+const char * ROKEN_LIB_FUNCTION
 gai_strerror(int ecode);
 #endif
 



svn commit: samba r9104 - in branches/SAMBA_4_0/source/build/pidl: . Parse/Pidl/Ethereal

2005-08-05 Thread jelmer
Author: jelmer
Date: 2005-08-05 07:16:07 + (Fri, 05 Aug 2005)
New Revision: 9104

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

Log:
Finish ethereal parser generator. Still a couple of minor issues 
remaining to get it to generate completely compilable code.

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


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm
===
--- branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm 
2005-08-05 05:42:09 UTC (rev 9103)
+++ branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Ethereal/NDR.pm 
2005-08-05 07:16:07 UTC (rev 9104)
@@ -6,7 +6,7 @@
 # Portions based on idl2eth.c by Ronnie Sahlberg
 # released under the GNU GPL
 
-package Parse::Pidl::Ethereal::NDR::Parser;
+package Parse::Pidl::Ethereal::NDR;
 
 use strict;
 use Parse::Pidl::Typelist;
@@ -20,6 +20,14 @@
"ptr" => "NDR_POINTER_PTR"
 );
 
+my %dissectors = (
+   "uint16" => "dissect_ndr_uint16",
+   "uint8" => "dissect_ndr_uint8",
+   "uint32" => "dissect_ndr_uint32",
+   "time_t" => "dissect_ndr_time_t",
+   "GUID" => "dissect_ndr_uuid_t"
+);
+
 sub type2ft($)
 {
 my($t) = shift;
@@ -29,9 +37,7 @@
 return "FT_UINT64", if $t eq "HYPER_T" or $t eq "NTTIME"
or $t eq "NTTIME_1sec" or $t eq "NTTIME_hyper" or $t eq "hyper";

-   # Type is an enum
-
-return "FT_UINT16";
+return "FT_NONE";
 }
 
 # Determine the display base for an element
@@ -144,7 +150,7 @@
pidl_code "return offset;";
pidl_code "}\n";
 
-   register_type($name, $dissectorname, enum_ft($e), "BASE_DEC", "0", 
"VALS($valsstring)", enum_size($e));
+   register_hf_field($name, $dissectorname, enum_ft($e), "BASE_DEC", "0", 
"VALS($valsstring)", enum_size($e));
 }
 
 sub Bitmap($$$)
@@ -215,7 +221,13 @@
my ($e,$l,$hf,$myname) = @_;
 
if ($l->{TYPE} eq "POINTER") {
-   pidl_code 
"offset=dissect_ndr_pointer(tvb,offset,pinfo,tree,drep,$myname\_,$ptrtype_mappings{$l->{POINTER_TYPE}},\"\",$hf);";
+   my $type;
+   if ($l->{LEVEL} eq "TOP") {
+   $type = "toplevel";
+   } elsif ($l->{LEVEL} eq "EMBEDDED") {
+   $type = "embedded";
+   }
+   pidl_code 
"offset=dissect_ndr_$type\_pointer(tvb,offset,pinfo,tree,drep,$myname\_,$ptrtype_mappings{$l->{POINTER_TYPE}},\"\",$hf);";
} elsif ($l->{TYPE} eq "ARRAY") {
my $af = "";
 
@@ -225,8 +237,9 @@
 
pidl_code 
"offset=dissect_ndr_$af(tvb,offset,pinfo,tree,drep,$myname\_);";
} elsif ($l->{TYPE} eq "DATA") {
-#  pidl_code "guint32 param="  . 
FindDissectorParam($dissectorname).";";
-#  pidl_code "offset=$type->{DISSECTOR}(tvb, offset, pinfo, tree, 
drep, $hf, param);";
+   pidl_code "guint32 param="  . FindDissectorParam($myname).";";
+   defined($dissectors{$l->{DATA_TYPE}}) or warn("Unknown data 
type $l->{DATA_TYPE}");
+   pidl_code "offset=".$dissectors{$l->{DATA_TYPE}}."(tvb, offset, 
pinfo, tree, drep, $hf, param);";
} elsif ($_->{TYPE} eq "SUBCONTEXT") {
die("subcontext() not supported")
}
@@ -240,8 +253,7 @@
 
return if (EmitProhibited($dissectorname));
 
-   my $hf = "";
-   #FIXME  my $hf = register_hf_field("hf_$ifname\_$pn\_$e->{NAME}", 
$e->{NAME}, "$ifname.$pn.$e->{NAME}", $type->{FT_TYPE}, $type->{BASE_TYPE}, 
$type->{VALS}, $type->{MASK}, "");
+   my $hf = register_hf_field("hf_$ifname\_$pn\_$e->{NAME}", $e->{NAME}, 
"$ifname.$pn.$e->{NAME}", type2ft($e->{TYPE}), "BASE_HEX", "NULL", 0, "");
my $add = "";
 
foreach (@{$e->{LEVELS}}) {
@@ -312,7 +324,7 @@
register_ett("ett_$ifname\_$name");
 
my $res = "";
-   ($res.=Element($_, $name, $ifname)."\n") foreach (@{$e->{ELEMENTS}});
+   ($res.="\t".Element($_, $name, $ifname)."\n") foreach 
(@{$e->{ELEMENTS}});
 
pidl_hdr "int $dissectorname(tvbuff_t *tvb, int offset, packet_info 
*pinfo, proto_tree *parent_tree, guint8 *drep, int hf_index, guint32 param 
_U_);";
 
@@ -337,7 +349,7 @@
deindent;
pidl_code "}";
 
-   pidl_code "$res";
+   pidl_code "\n$res";
 
 
pidl_code "";
@@ -351,7 +363,7 @@
 {
my ($e,$name,$ifname) = @_;
 
-   my $dissectorname = "$ifname\_dissect_union_$name";
+   my $dissectorname = "$ifname\_dissect_$name";

register_ett("ett_$ifname\_$name");
 
@@ -466,6 +478,10 @@
 {
my $x = shift;
 
+   foreach (@{$x->{TYPEDEFS}}) {
+   $dissectors{$_->{NAME}} = "$x->{NAME}_dissect_$_->{NAME}";
+   }
+
if (defined($x->{UUID})) {
my $if_uuid = $x->{UUID};
 

Modified: branches/SAMBA_4_0/source/build/pidl/pidl
=