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

2006-09-21 Thread gd
Author: gd
Date: 2006-09-21 06:06:59 + (Thu, 21 Sep 2006)
New Revision: 18776

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

Log:
Fill in and test dfs_ManagerInitialize().

Guenther

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


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/idl/dfs.idl
===
--- branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-21 05:44:39 UTC 
(rev 18775)
+++ branches/SAMBA_4_0/source/librpc/idl/dfs.idl2006-09-21 06:06:59 UTC 
(rev 18776)
@@ -327,7 +327,10 @@
);
  
/* Function 0x0e */
-   WERROR dfs_ManagerInitialize();
+   WERROR dfs_ManagerInitialize(
+   [in][string,charset(UTF16)] uint16 *servername,
+   [in]uint32 flags
+   );
 
/* Function 0x0f */
WERROR dfs_AddStdRootForced(

Modified: branches/SAMBA_4_0/source/torture/rpc/dfs.c
===
--- branches/SAMBA_4_0/source/torture/rpc/dfs.c 2006-09-21 05:44:39 UTC (rev 
18775)
+++ branches/SAMBA_4_0/source/torture/rpc/dfs.c 2006-09-21 06:06:59 UTC (rev 
18776)
@@ -155,6 +155,34 @@
return True;
 }
 
+static BOOL test_ManagerInitialize(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
const char *host)
+{
+   NTSTATUS status;
+   enum dfs_ManagerVersion version;
+   struct dfs_ManagerInitialize r;
+
+   printf(Testing ManagerInitialize\n);
+
+   if (!test_GetManagerVersion(p, mem_ctx, version)) {
+   return False;
+   }
+
+   r.in.servername = host;
+   r.in.flags = 0;
+
+   status = dcerpc_dfs_ManagerInitialize(p, mem_ctx, r);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(ManagerInitialize failed - %s\n, nt_errstr(status));
+   return False;
+   } else if (!W_ERROR_IS_OK(r.out.result)) {
+   printf(dfs_ManagerInitialize failed - %s\n, 
win_errstr(r.out.result));
+   IS_DFS_VERSION_UNSUPPORTED_CALL_W2K3(version, r.out.result);
+   return False;
+   }
+
+   return True;
+}
+
 static BOOL test_GetInfoLevel(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
uint16_t level,
  const char *root)
 {
@@ -170,10 +198,10 @@
 
status = dcerpc_dfs_GetInfo(p, mem_ctx, r);
if (!NT_STATUS_IS_OK(status)) {
-   printf(Info failed - %s\n, nt_errstr(status));
+   printf(GetInfo failed - %s\n, nt_errstr(status));
return False;
} else if (!W_ERROR_IS_OK(r.out.result)) {
-   printf(GetInfo failed - %s\n, win_errstr(r.out.result));
+   printf(dfs_GetInfo failed - %s\n, win_errstr(r.out.result));
return False;
}
 
@@ -355,7 +383,7 @@
printf(AddStdRootForced failed - %s\n, nt_errstr(status));
return False;
} else if (!W_ERROR_IS_OK(r.out.result)) {
-   printf(AddStdRootForced failed - %s\n, 
win_errstr(r.out.result));
+   printf(dfs_AddStdRootForced failed - %s\n, 
win_errstr(r.out.result));
IS_DFS_VERSION_UNSUPPORTED_CALL_W2K3(version, r.out.result);
return False;
}
@@ -471,6 +499,7 @@
}
 
ret = test_GetManagerVersion(p, mem_ctx, version);
+   ret = test_ManagerInitialize(p, mem_ctx, host);
ret = test_Enum(p, mem_ctx);
ret = test_EnumEx(p, mem_ctx, host);
ret = test_StdRoot(p, mem_ctx, host);



svn commit: samba r18777 - in branches/SAMBA_4_0/source/lib/ldb: common include

2006-09-21 Thread idra
Author: idra
Date: 2006-09-21 06:14:32 + (Thu, 21 Sep 2006)
New Revision: 18777

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

Log:

add helper functions to create an ldb_request structure


Modified:
   branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
   branches/SAMBA_4_0/source/lib/ldb/include/ldb.h


Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
===
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb.c  2006-09-21 06:06:59 UTC 
(rev 18776)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb.c  2006-09-21 06:14:32 UTC 
(rev 18777)
@@ -559,34 +559,33 @@
return LDB_ERR_OPERATIONS_ERROR;
 }
 
-/*
-  note that ldb_search() will automatically replace a NULL 'base' value with 
the 
-  defaultNamingContext from the rootDSE if available.
-*/
-int ldb_search(struct ldb_context *ldb, 
-  const struct ldb_dn *base,
-  enum ldb_scope scope,
-  const char *expression,
-  const char * const *attrs, 
-  struct ldb_result **res)
+int ldb_build_search_req(struct ldb_request **ret_req,
+   struct ldb_context *ldb,
+   void *mem_ctx,
+   const struct ldb_dn *base,
+   enum ldb_scope scope,
+   const char *expression,
+   const char * const *attrs,
+   struct ldb_control **controls,
+   void *context,
+   ldb_request_callback_t callback)
 {
struct ldb_request *req;
-   int ret;
 
-   *res = NULL;
-   
-   req = talloc(ldb, struct ldb_request);
+   *ret_req = NULL;
+
+   req = talloc(mem_ctx, struct ldb_request);
if (req == NULL) {
ldb_set_errstring(ldb, Out of Memory);
return LDB_ERR_OPERATIONS_ERROR;
}
 
+   req-operation = LDB_SEARCH;
if (base == NULL) {
-   base = ldb_get_default_basedn(ldb);
+   req-op.search.base = ldb_dn_new(req);
+   } else {
+   req-op.search.base = base;
}
-
-   req-operation = LDB_SEARCH;
-   req-op.search.base = base;
req-op.search.scope = scope;
 
req-op.search.tree = ldb_parse_tree(req, expression);
@@ -596,16 +595,163 @@
return LDB_ERR_OPERATIONS_ERROR;
}
 
+   req-op.search.attrs = attrs;
+   req-controls = controls;
+   req-context = context;
+   req-callback = callback;
+
+   *ret_req = req;
+   return LDB_SUCCESS;
+}
+
+int ldb_build_add_req(struct ldb_request **ret_req,
+   struct ldb_context *ldb,
+   void *mem_ctx,
+   struct ldb_message *message,
+   struct ldb_control **controls,
+   void *context,
+   ldb_request_callback_t callback)
+{
+   struct ldb_request *req;
+
+   *ret_req = NULL;
+
+   req = talloc(mem_ctx, struct ldb_request);
+   if (req == NULL) {
+   ldb_set_errstring(ldb, Out of Memory);
+   return LDB_ERR_OPERATIONS_ERROR;
+   }
+
+   req-operation = LDB_ADD;
+   req-op.add.message = message;
+   req-controls = controls;
+   req-context = context;
+   req-callback = callback;
+
+   *ret_req = req;
+
+   return LDB_SUCCESS;
+}
+
+int ldb_build_mod_req(struct ldb_request **ret_req,
+   struct ldb_context *ldb,
+   void *mem_ctx,
+   struct ldb_message *message,
+   struct ldb_control **controls,
+   void *context,
+   ldb_request_callback_t callback)
+{
+   struct ldb_request *req;
+
+   *ret_req = NULL;
+
+   req = talloc(mem_ctx, struct ldb_request);
+   if (req == NULL) {
+   ldb_set_errstring(ldb, Out of Memory);
+   return LDB_ERR_OPERATIONS_ERROR;
+   }
+
+   req-operation = LDB_MODIFY;
+   req-op.mod.message = message;
+   req-controls = controls;
+   req-context = context;
+   req-callback = callback;
+
+   *ret_req = req;
+
+   return LDB_SUCCESS;
+}
+
+int ldb_build_del_req(struct ldb_request **ret_req,
+   struct ldb_context *ldb,
+   void *mem_ctx,
+   struct ldb_dn *dn,
+   struct ldb_control **controls,
+   void *context,
+   ldb_request_callback_t callback)
+{
+   struct ldb_request *req;
+
+   *ret_req = NULL;
+
+   req = talloc(mem_ctx, struct ldb_request);
+   if (req == NULL) {
+   ldb_set_errstring(ldb, Out of Memory);
+   return LDB_ERR_OPERATIONS_ERROR;
+   }
+
+   req-operation = LDB_DELETE;
+   req-op.del.dn = dn;
+   

svn commit: samba r18778 - in branches/SAMBA_3_0/source/script/tests: .

2006-09-21 Thread jelmer
Author: jelmer
Date: 2006-09-21 06:15:17 + (Thu, 21 Sep 2006)
New Revision: 18778

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

Log:
Fix comparison.

Modified:
   branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh


Changeset:
Modified: branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh
===
--- branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh 2006-09-21 
06:14:32 UTC (rev 18777)
+++ branches/SAMBA_3_0/source/script/tests/test_posix_s3.sh 2006-09-21 
06:15:17 UTC (rev 18778)
@@ -35,7 +35,7 @@
 
 rpc=RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC 
RPC-UNIXINFO
 
-if x$RUN_FROM_BUILD_FARM = xyes; then
+if test x$RUN_FROM_BUILD_FARM = xyes; then
rpc=$rpc RPC-NETLOGSAMBA3 RPC-SAMBA3SESSIONKEY RPC-SAMBA3-GETUSERNAME
 fi
 



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

2006-09-21 Thread abartlet
Author: abartlet
Date: 2006-09-21 06:34:21 + (Thu, 21 Sep 2006)
New Revision: 18779

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

Log:
Not simo's fault, this is actually a bug I introduced a week ago, when I fixed 
the previous bug in this code. 

We need to remove fragments from the incoming fragment list, or else
we leak (actually, we walk free()'ed data as we add/remove elements).

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c
===
--- branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c2006-09-21 
06:15:17 UTC (rev 18778)
+++ branches/SAMBA_4_0/source/rpc_server/dcerpc_server.c2006-09-21 
06:34:21 UTC (rev 18779)
@@ -1056,7 +1056,10 @@
DLIST_ADD_END(dce_conn-incoming_fragmented_call_list, call, 
  struct dcesrv_call_state *);
return NT_STATUS_OK;
-   }
+   } 
+   
+   /* This removes any fragments we may have had stashed away */
+   DLIST_REMOVE(dce_conn-incoming_fragmented_call_list, call);
 
switch (call-pkt.ptype) {
case DCERPC_PKT_BIND:



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

2006-09-21 Thread jelmer
Author: jelmer
Date: 2006-09-21 06:42:52 + (Thu, 21 Sep 2006)
New Revision: 18780

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

Log:
Add convenience make testenv to launch the xtermtest Andrew just added.

Modified:
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2006-09-21 06:34:21 UTC (rev 18779)
+++ branches/SAMBA_4_0/source/main.mk   2006-09-21 06:42:52 UTC (rev 18780)
@@ -286,6 +286,9 @@
 quicktest: all
$(srcdir)/script/tests/selftest.sh ${selftest_prefix} quick 
SOCKET_WRAPPER
 
+testenv: all
+   $(srcdir)/script/tests/selftest.sh ${selftest_prefix} xterm 
SOCKET_WRAPPER
+
 valgrindtest: valgrindtest-quick
 
 valgrindtest-quick: all



svn commit: samba r18781 - in branches/SAMBA_4_0/source: dsdb/samdb/ldb_modules lib/ldb/common lib/ldb/include lib/ldb/ldb_tdb lib/ldb/modules script/tests

2006-09-21 Thread abartlet
Author: abartlet
Date: 2006-09-21 06:44:12 + (Thu, 21 Sep 2006)
New Revision: 18781

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

Log:
Move the usnCreated and usnChanged handling around again.

This moves these attributes from objectguid into an optional backend
(objectguid), used by ltdb.  For OpenLDAP, the entryUUID module
converts entryCSN into usnChanged.

This also changes the sequence number API, and uses 'time based'
sequence numbers, when an LDAP or similar backend is detected.

To assist this, we also store the last modified time in the TDB,
whenever we change a value.

Andrew Bartlett


Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/entryUUID.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectguid.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/rootdse.c
   branches/SAMBA_4_0/source/lib/ldb/common/ldb.c
   branches/SAMBA_4_0/source/lib/ldb/include/ldb.h
   branches/SAMBA_4_0/source/lib/ldb/include/ldb_private.h
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_cache.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.c
   branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_tdb.h
   branches/SAMBA_4_0/source/lib/ldb/modules/operational.c
   branches/SAMBA_4_0/source/script/tests/mktestsetup.sh


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


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

2006-09-21 Thread gd
Author: gd
Date: 2006-09-21 07:19:47 + (Thu, 21 Sep 2006)
New Revision: 18782

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

Log:
Do not send random data to the password change (although that reveals
interesting new password set tests), make sure to send valid characters.

Guenther

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


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/samr.c
===
--- branches/SAMBA_4_0/source/torture/rpc/samr.c2006-09-21 06:44:12 UTC 
(rev 18781)
+++ branches/SAMBA_4_0/source/torture/rpc/samr.c2006-09-21 07:19:47 UTC 
(rev 18782)
@@ -1884,11 +1884,11 @@
 
{
char simple_pass[9];
-   char v = (char)random();
+   char *v = generate_random_str(mem_ctx, 1);
int i;
 
for (i=0; i ARRAY_SIZE(simple_pass); i++) {
-   simple_pass[i] = v;
+   simple_pass[i] = *v;
}
simple_pass[i] = '\0';
 



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

2006-09-21 Thread metze
Author: metze
Date: 2006-09-21 07:35:30 + (Thu, 21 Sep 2006)
New Revision: 18783

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

Log:
fix make pch

metze
Modified:
   branches/SAMBA_4_0/source/main.mk


Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===
--- branches/SAMBA_4_0/source/main.mk   2006-09-21 07:19:47 UTC (rev 18782)
+++ branches/SAMBA_4_0/source/main.mk   2006-09-21 07:35:30 UTC (rev 18783)
@@ -361,7 +361,7 @@
 
 .h.h.gch:
@echo Precompiling $
-   @$(CC) `$(PERL) $(srcdir)/script/cflags.pl [EMAIL PROTECTED] $(CFLAGS) 
$(PICFLAG) -c $ -o $@
+   @$(CC) -Ilib/replace `$(PERL) $(srcdir)/script/cflags.pl [EMAIL 
PROTECTED] $(CFLAGS) $(PICFLAG) -c $ -o $@
 
 .y.c:
@echo Building $ with $(YACC)



svn commit: samba r18784 - in branches/SAMBA_3_0/source: include lib/replace libaddns nsswitch

2006-09-21 Thread metze
Author: metze
Date: 2006-09-21 08:48:18 + (Thu, 21 Sep 2006)
New Revision: 18784

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

Log:
hopefully fix the BOOL bug on AIX

metze

Modified:
   branches/SAMBA_3_0/source/include/adt_tree.h
   branches/SAMBA_3_0/source/include/includes.h
   branches/SAMBA_3_0/source/include/privileges.h
   branches/SAMBA_3_0/source/lib/replace/replace.h
   branches/SAMBA_3_0/source/libaddns/dns.h
   branches/SAMBA_3_0/source/nsswitch/winbind_nss_config.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/adt_tree.h
===
--- branches/SAMBA_3_0/source/include/adt_tree.h2006-09-21 07:35:30 UTC 
(rev 18783)
+++ branches/SAMBA_3_0/source/include/adt_tree.h2006-09-21 08:48:18 UTC 
(rev 18784)
@@ -21,9 +21,9 @@
 #ifndef ADT_TREE_H
 #define ADT_TREE_H
 
-#ifndef _BOOL
+#ifndef _UPPER_BOOL
 typedef int BOOL;
-#define _BOOL  
+#define _UPPER_BOOL  
 #endif
 
 

Modified: branches/SAMBA_3_0/source/include/includes.h
===
--- branches/SAMBA_3_0/source/include/includes.h2006-09-21 07:35:30 UTC 
(rev 18783)
+++ branches/SAMBA_3_0/source/include/includes.h2006-09-21 08:48:18 UTC 
(rev 18784)
@@ -612,9 +612,9 @@
 #define MAX(a,b) ((a)(b)?(a):(b))
 #endif
 
-#ifndef _BOOL
+#ifndef _UPPER_BOOL
 typedef int BOOL;
-#define _BOOL   /* So we don't typedef BOOL again in vfs.h */
+#define _UPPER_BOOL
 #endif
 
 #ifdef HAVE_BROKEN_GETGROUPS

Modified: branches/SAMBA_3_0/source/include/privileges.h
===
--- branches/SAMBA_3_0/source/include/privileges.h  2006-09-21 07:35:30 UTC 
(rev 18783)
+++ branches/SAMBA_3_0/source/include/privileges.h  2006-09-21 08:48:18 UTC 
(rev 18784)
@@ -93,9 +93,9 @@
uint32 attr;
 } LUID_ATTR;
 
-#ifndef _BOOL
+#ifndef _UPPER_BOOL
 typedef int BOOL;
-#define _BOOL   /* So we don't typedef BOOL again in vfs.h */
+#define _UPPER_BOOL
 #endif
 
 typedef struct {

Modified: branches/SAMBA_3_0/source/lib/replace/replace.h
===
--- branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-21 07:35:30 UTC 
(rev 18783)
+++ branches/SAMBA_3_0/source/lib/replace/replace.h 2006-09-21 08:48:18 UTC 
(rev 18784)
@@ -333,6 +333,7 @@
  *
  * IRIX, HPUX, MacOS 10 and Solaris need BOOL_DEFINED
  * Tru64 needs _BOOL_EXISTS
+ * AIX needs _BOOL,_TRUE,_FALSE
  */
 #ifndef BOOL_DEFINED
 #define BOOL_DEFINED
@@ -340,6 +341,9 @@
 #ifndef _BOOL_EXISTS
 #define _BOOL_EXISTS
 #endif
+#ifndef _BOOL
+#define _BOOL
+#endif
 
 #ifndef __bool_true_false_are_defined
 #define __bool_true_false_are_defined
@@ -352,6 +356,13 @@
 #define false (0)
 #endif
 
+#ifndef _TRUE
+#define _TRUE
+#endif
+#ifndef _FALSE
+#define _FALSE
+#endif
+
 #ifndef HAVE_FUNCTION_MACRO
 #ifdef HAVE_func_MACRO
 #define __FUNCTION__ __func__

Modified: branches/SAMBA_3_0/source/libaddns/dns.h
===
--- branches/SAMBA_3_0/source/libaddns/dns.h2006-09-21 07:35:30 UTC (rev 
18783)
+++ branches/SAMBA_3_0/source/libaddns/dns.h2006-09-21 08:48:18 UTC (rev 
18784)
@@ -279,10 +279,9 @@
 
 typedef long HANDLE;
 
-#ifndef _BOOL
+#ifndef _UPPER_BOOL
 typedef int BOOL;
-
-#define _BOOL  /* So we don't typedef BOOL again */
+#define _UPPER_BOOL
 #endif
 
 

Modified: branches/SAMBA_3_0/source/nsswitch/winbind_nss_config.h
===
--- branches/SAMBA_3_0/source/nsswitch/winbind_nss_config.h 2006-09-21 
07:35:30 UTC (rev 18783)
+++ branches/SAMBA_3_0/source/nsswitch/winbind_nss_config.h 2006-09-21 
08:48:18 UTC (rev 18784)
@@ -95,8 +95,8 @@
 typedef char fstring[FSTRING_LEN];
 #endif
 
-#ifndef _BOOL
-#define _BOOL  /* So we don't typedef BOOL again in vfs.h */
+#ifndef _UPPER_BOOL
+#define _UPPER_BOOL
 #define False (0)
 #define True (1)
 #define Auto (2)



svn commit: samba r18785 - in branches/SAMBA_3_0/source/modules: .

2006-09-21 Thread vlendec
Author: vlendec
Date: 2006-09-21 14:17:00 + (Thu, 21 Sep 2006)
New Revision: 18785

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

Log:
Check in Peter Somogyis build fix
Modified:
   branches/SAMBA_3_0/source/modules/nfs4_acls.c


Changeset:
Modified: branches/SAMBA_3_0/source/modules/nfs4_acls.c
===
--- branches/SAMBA_3_0/source/modules/nfs4_acls.c   2006-09-21 08:48:18 UTC 
(rev 18784)
+++ branches/SAMBA_3_0/source/modules/nfs4_acls.c   2006-09-21 14:17:00 UTC 
(rev 18785)
@@ -446,16 +446,16 @@
memset(ace_v4, 0, sizeof(SMB_ACE4PROP_T));
ace_v4-aceType = ace_nt-type; /* only ACCES|DENY supported right now 
*/
ace_v4-aceFlags = ace_nt-flags  SEC_ACE_FLAG_VALID_INHERIT;
-   ace_v4-aceMask = ace_nt-info.mask 
+   ace_v4-aceMask = ace_nt-access_mask 
(STD_RIGHT_ALL_ACCESS | SA_RIGHT_FILE_ALL_ACCESS);
 
if (ace_v4-aceFlags!=ace_nt-flags)
DEBUG(9, (ace_v4-aceFlags(0x%x)!=ace_nt-flags(0x%x)\n,
ace_v4-aceFlags, ace_nt-flags));
 
-   if (ace_v4-aceMask!=ace_nt-info.mask)
-   DEBUG(9, (ace_v4-aceMask(0x%x)!=ace_nt-info.mask(0x%x)\n,
-   ace_v4-aceMask, ace_nt-info.mask));
+   if (ace_v4-aceMask!=ace_nt-access_mask)
+   DEBUG(9, (ace_v4-aceMask(0x%x)!=ace_nt-access_mask(0x%x)\n,
+   ace_v4-aceMask, ace_nt-access_mask));
 
if (sid_equal(ace_nt-trustee, global_sid_World)) {
ace_v4-who.special_id = SMB_ACE4_WHO_EVERYONE;
@@ -557,7 +557,7 @@
BOOLaddNewACE = True;
 
if (smbacl4_fill_ace4(mem_ctx, pparams, ownerUID, ownerGID,
-   dacl-ace + i, ace_v4))
+   dacl-aces + i, ace_v4))
return NULL;
 
if (pparams-acedup!=e_dontcare) {



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

2006-09-21 Thread abartlet
Author: abartlet
Date: 2006-09-21 16:42:56 + (Thu, 21 Sep 2006)
New Revision: 18786

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

Log:
I moved the usnChanged code around, and it now loaded in a different
module.  I forgot to commit this last night.

Andrew Bartlett

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


Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/ldb.js
===
--- branches/SAMBA_4_0/testprogs/ejs/ldb.js 2006-09-21 14:17:00 UTC (rev 
18785)
+++ branches/SAMBA_4_0/testprogs/ejs/ldb.js 2006-09-21 16:42:56 UTC (rev 
18786)
@@ -154,6 +154,8 @@
 
var res = ldb.search(x=8, cn=PartTest, ldb.SCOPE_DEFAULT);
assert(res[0].objectGUID != undefined);
+   assert(res[0].uSNCreated != undefined);
+   assert(res[0].uSNChanged != undefined);
assert(res[0].createTimestamp == undefined);
assert(res[0].whenCreated != undefined);
assert(res[0].name == x8);
@@ -241,7 +243,7 @@
var res8 = ldb.search(x=11, cn=sub,cn=parttest, ldb.SCOPE_DEFAULT, 
attrs);

assert(res8[0].objectGUID == undefined); /* The objectGUID module is 
not loaded here */
-   assert(res8[0].uSNCreated != undefined);
+   assert(res8[0].uSNCreated == undefined); /* The objectGUID module is 
not loaded here */
assert(res8[0].name == x11);
assert(res8[0].cn == x11);
 



svn commit: samba r18787 - in branches/SAMBA_3_0/source: include lib script smbd

2006-09-21 Thread jra
Author: jra
Date: 2006-09-21 17:00:07 + (Thu, 21 Sep 2006)
New Revision: 18787

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

Log:
Fix the strlen_m and strlen_m_term code by merging
in (and using elsewhere) next_codepoint from Samba4.
Jerry please test.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/charset.h
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/lib/charcnv.c
   branches/SAMBA_3_0/source/lib/util_str.c
   branches/SAMBA_3_0/source/script/mkproto.awk
   branches/SAMBA_3_0/source/smbd/reply.c
   branches/SAMBA_3_0/source/smbd/service.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/charset.h
===
--- branches/SAMBA_3_0/source/include/charset.h 2006-09-21 16:42:56 UTC (rev 
18786)
+++ branches/SAMBA_3_0/source/include/charset.h 2006-09-21 17:00:07 UTC (rev 
18787)
@@ -22,6 +22,7 @@
 /* this defines the charset types used in samba */
 typedef enum {CH_UCS2=0, CH_UTF16=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, 
CH_UTF8=4} charset_t;
 
+#if 0
 /* FIXME!!!  Hack job for now to get the lsa ndr code compiling */
 #ifndef strlen_m
 #define strlen_m strlen
@@ -29,8 +30,8 @@
 #ifndef strlen_m_term
 #define strlen_m_term strlen
 #endif
+#endif
 
-
 #define NUM_CHARSETS 5
 
 /* 

Modified: branches/SAMBA_3_0/source/include/smb.h
===
--- branches/SAMBA_3_0/source/include/smb.h 2006-09-21 16:42:56 UTC (rev 
18786)
+++ branches/SAMBA_3_0/source/include/smb.h 2006-09-21 17:00:07 UTC (rev 
18787)
@@ -170,6 +170,10 @@
 #define COPY_UCS2_CHAR(dest,src) (((unsigned char *)(dest))[0] = ((unsigned 
char *)(src))[0],\
((unsigned char *)(dest))[1] = ((unsigned char 
*)(src))[1], (dest))
 
+/* Large data type for manipulating uint32 unicode codepoints */
+typedef uint32 codepoint_t;
+#define INVALID_CODEPOINT ((codepoint_t)-1)
+
 /* pipe string names */
 #define PIPE_LANMAN   \\PIPE\\LANMAN
 #define PIPE_SRVSVC   \\PIPE\\srvsvc

Modified: branches/SAMBA_3_0/source/lib/charcnv.c
===
--- branches/SAMBA_3_0/source/lib/charcnv.c 2006-09-21 16:42:56 UTC (rev 
18786)
+++ branches/SAMBA_3_0/source/lib/charcnv.c 2006-09-21 17:00:07 UTC (rev 
18787)
@@ -1374,33 +1374,86 @@
return 0;
 }
 
-/
- Calculate the size (in bytes) of the next multibyte character in
- our internal character set. Note that p must be pointing to a
- valid mb char, not within one.
-/
+/*
+  Return the unicode codepoint for the next multi-byte CH_UNIX character
+  in the string. The unicode codepoint (codepoint_t) is an unsinged 32 bit 
value.
 
-size_t next_mb_char_size(const char *s)
+  Also return the number of bytes consumed (which tells the caller
+  how many bytes to skip to get to the next CH_UNIX character).
+
+  Return INVALID_CODEPOINT if the next character cannot be converted.
+*/
+
+codepoint_t next_codepoint(const char *str, size_t *size)
 {
-   size_t i;
+   /* It cannot occupy more than 4 bytes in UTF16 format */
+   uint8_t buf[4];
+   smb_iconv_t descriptor;
+   size_t ilen_orig;
+   size_t ilen;
+   size_t olen;
+   char *outbuf;
 
-   if (!(*s  0x80))
-   return 1; /* ascii. */
+   if ((str[0]  0x80) == 0) {
+   *size = 1;
+   return (codepoint_t)str[0];
+   }
 
-   conv_silent = True;
-   for ( i = 1; i =4; i++ ) {
-   smb_ucs2_t uc;
-   if (convert_string(CH_UNIX, CH_UCS2, s, i, uc, 2, False) == 2) 
{
-#if 0 /* JRATEST */
-   DEBUG(10,(next_mb_char_size: size %u at string %s\n,
-   (unsigned int)i, s));
-#endif
-   conv_silent = False;
-   return i;
+   /* We assume that no multi-byte character can take
+  more than 5 bytes. This is OK as we only
+  support codepoints up to 1M */
+
+   ilen_orig = strnlen(str, 5);
+   ilen = ilen_orig;
+
+lazy_initialize_conv();
+
+   /* CH_UCS2 == UTF16-LE. */
+descriptor = conv_handles[CH_UNIX][CH_UCS2];
+   if (descriptor == (smb_iconv_t)-1 || descriptor == (smb_iconv_t)0) {
+   *size = 1;
+   return INVALID_CODEPOINT;
+   }
+
+   /* This looks a little strange, but it is needed to cope
+  with codepoints above 64k which are encoded as per RFC2781. */
+   olen = 2;
+   outbuf = (char *)buf;
+   smb_iconv(descriptor, str, ilen, outbuf, olen);
+   if (olen == 2) {
+   /* We failed to convert to a 2 byte character.
+  See if we can convert to a 4 UTF16-LE byte char encoding.
+   */
+   olen = 4;
+

svn commit: samba r18788 - in branches/SAMBA_3_0/source/librpc: gen_ndr idl

2006-09-21 Thread jerry
Author: jerry
Date: 2006-09-21 17:13:48 + (Thu, 21 Sep 2006)
New Revision: 18788

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

Log:
updating the IDL for QueryValue
Modified:
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_winreg.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/winreg.h
   branches/SAMBA_3_0/source/librpc/idl/winreg.idl


Changeset:
Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.c
===
--- branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.c   2006-09-21 
17:00:07 UTC (rev 18787)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.c   2006-09-21 
17:13:48 UTC (rev 18788)
@@ -512,7 +512,7 @@
return werror_to_ntstatus(r.out.result);
 }
 
-NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum 
winreg_Type *type, uint8_t *data, uint32_t *size, uint32_t *length)
+NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum 
winreg_Type *type, uint8_t **data, uint32_t *size, uint32_t *length)
 {
struct winreg_QueryValue r;
NTSTATUS status;

Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.h
===
--- branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.h   2006-09-21 
17:00:07 UTC (rev 18787)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.h   2006-09-21 
17:13:48 UTC (rev 18788)
@@ -18,7 +18,7 @@
 NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t watch_subtree, 
uint32_t notify_filter, uint32_t unknown, struct winreg_String string1, struct 
winreg_String string2, uint32_t unknown2);
 NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *parent_handle, struct winreg_String keyname, 
uint32_t unknown, uint32_t access_mask, struct policy_handle *handle);
 NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String class_in, struct 
winreg_String *class_out, uint32_t *num_subkeys, uint32_t *max_subkeylen, 
uint32_t *max_subkeysize, uint32_t *num_values, uint32_t *max_valnamelen, 
uint32_t *max_valbufsize, uint32_t *secdescsize, NTTIME *last_changed_time);
-NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum 
winreg_Type *type, uint8_t *data, uint32_t *size, uint32_t *length);
+NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum 
winreg_Type *type, uint8_t **data, uint32_t *size, uint32_t *length);
 NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx);
 NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx);
 NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx);

Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c
===
--- branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c   2006-09-21 
17:00:07 UTC (rev 18787)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c   2006-09-21 
17:13:48 UTC (rev 18788)
@@ -2272,6 +2272,7 @@
 
 NTSTATUS ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const 
struct winreg_QueryValue *r)
 {
+   uint32_t cntr_data_1;
if (flags  NDR_IN) {
if (r-in.handle == NULL) return 
NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 
r-in.handle));
@@ -2280,12 +2281,13 @@
if (r-in.type) {
NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, 
*r-in.type));
}
-   NDR_CHECK(ndr_push_unique_ptr(ndr, r-in.data));
-   if (r-in.data) {
-   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
*r-in.size));
-   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
-   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
*r-in.length));
-   NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, 
r-in.data, *r-in.length));
+   if (r-in.data == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
+   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r-in.size));
+   NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+   NDR_CHECK(ndr_push_uint32(ndr, 

svn commit: samba r18789 - in branches/SAMBA_3_0/source: . include librpc/gen_ndr librpc/idl rpc_server smbd

2006-09-21 Thread jerry
Author: jerry
Date: 2006-09-21 17:51:06 + (Thu, 21 Sep 2006)
New Revision: 18789

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

Log:
Replace the winreg server code with the libndr parsing code.
Many things work (OpenHKLM, etc...) but some still don't.
This shouldn't block anyone so I'm checking it in.
Will probably move to a bzr tree after this for
longer dev cycles between checkins.




Added:
   branches/SAMBA_3_0/source/rpc_server/srv_initshutdown_nt.c
   branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c
Removed:
   branches/SAMBA_3_0/source/rpc_server/srv_reg.c
   branches/SAMBA_3_0/source/rpc_server/srv_reg_nt.c
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/include/rpc_client.h
   branches/SAMBA_3_0/source/include/rpc_reg.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/winreg.h
   branches/SAMBA_3_0/source/librpc/idl/winreg.idl
   branches/SAMBA_3_0/source/rpc_server/srv_pipe.c
   branches/SAMBA_3_0/source/smbd/nttrans.c


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


svn commit: samba r18790 - in branches/SAMBA_3_0/source: librpc/gen_ndr librpc/idl rpc_server

2006-09-21 Thread jerry
Author: jerry
Date: 2006-09-21 18:09:20 + (Thu, 21 Sep 2006)
New Revision: 18790

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

Log:
Correct the IDL (still a bug in pidl) for QueryValue()
Modified:
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_winreg.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/winreg.h
   branches/SAMBA_3_0/source/librpc/idl/winreg.idl
   branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.c
===
--- branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.c   2006-09-21 
17:51:06 UTC (rev 18789)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.c   2006-09-21 
18:09:20 UTC (rev 18790)
@@ -512,7 +512,7 @@
return werror_to_ntstatus(r.out.result);
 }
 
-NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum 
winreg_Type *type, uint8_t **data, uint32_t *size, uint32_t *length)
+NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum 
winreg_Type *type, uint8_t *data, uint32_t *size, uint32_t *length)
 {
struct winreg_QueryValue r;
NTSTATUS status;

Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.h
===
--- branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.h   2006-09-21 
17:51:06 UTC (rev 18789)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/cli_winreg.h   2006-09-21 
18:09:20 UTC (rev 18790)
@@ -18,7 +18,7 @@
 NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t watch_subtree, 
uint32_t notify_filter, uint32_t unknown, struct winreg_String string1, struct 
winreg_String string2, uint32_t unknown2);
 NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *parent_handle, struct winreg_String keyname, 
uint32_t unknown, uint32_t access_mask, struct policy_handle *handle);
 NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String class_in, struct 
winreg_String *class_out, uint32_t *num_subkeys, uint32_t *max_subkeylen, 
uint32_t *max_subkeysize, uint32_t *num_values, uint32_t *max_valnamelen, 
uint32_t *max_valbufsize, uint32_t *secdescsize, NTTIME *last_changed_time);
-NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum 
winreg_Type *type, uint8_t **data, uint32_t *size, uint32_t *length);
+NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum 
winreg_Type *type, uint8_t *data, uint32_t *size, uint32_t *length);
 NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx);
 NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx);
 NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx);

Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c
===
--- branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c   2006-09-21 
17:51:06 UTC (rev 18789)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_winreg.c   2006-09-21 
18:09:20 UTC (rev 18790)
@@ -2272,7 +2272,6 @@
 
 NTSTATUS ndr_push_winreg_QueryValue(struct ndr_push *ndr, int flags, const 
struct winreg_QueryValue *r)
 {
-   uint32_t cntr_data_1;
if (flags  NDR_IN) {
if (r-in.handle == NULL) return 
NT_STATUS_INVALID_PARAMETER_MIX;
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, 
r-in.handle));
@@ -2286,9 +2285,7 @@
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
*r-in.size));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
*r-in.length));
-   for (cntr_data_1 = 0; cntr_data_1  *r-in.length; 
cntr_data_1++) {
-   NDR_CHECK(ndr_push_unique_ptr(ndr, 
r-in.data[cntr_data_1]));
-   }
+   NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, 
r-in.data, *r-in.length));
}
NDR_CHECK(ndr_push_unique_ptr(ndr, r-in.size));
if (r-in.size) {
@@ -2309,9 +2306,7 @@
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
*r-out.size));
  

svn commit: samba r18791 - in branches/SAMBA_3_0/source/librpc/ndr: .

2006-09-21 Thread jerry
Author: jerry
Date: 2006-09-21 18:16:16 + (Thu, 21 Sep 2006)
New Revision: 18791

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

Log:
print the error string and not the raw value
Modified:
   branches/SAMBA_3_0/source/librpc/ndr/ndr_basic.c


Changeset:
Modified: branches/SAMBA_3_0/source/librpc/ndr/ndr_basic.c
===
--- branches/SAMBA_3_0/source/librpc/ndr/ndr_basic.c2006-09-21 18:09:20 UTC 
(rev 18790)
+++ branches/SAMBA_3_0/source/librpc/ndr/ndr_basic.c2006-09-21 18:16:16 UTC 
(rev 18791)
@@ -250,7 +250,7 @@
 
 void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR r)
 {
-   ndr-print(ndr, %-25s: %d, name, W_ERROR_V(r));
+   ndr-print(ndr, %-25s: %s, name, dos_errstr(r));
 }
 
 /*



svn commit: samba r18792 - in branches/SAMBA_3_0/source/rpc_server: .

2006-09-21 Thread jerry
Author: jerry
Date: 2006-09-21 18:22:51 + (Thu, 21 Sep 2006)
New Revision: 18792

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

Log:
small fix for server QueryValue code
Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c2006-09-21 
18:16:16 UTC (rev 18791)
+++ branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c2006-09-21 
18:22:51 UTC (rev 18792)
@@ -363,8 +363,7 @@
return WERR_BADFID;
 
*size = *length = *type = 0;
-   value_name.name = NULL;
-   
+   
DEBUG(7,(_reg_info: policy key name = [%s]\n, regkey-name));
DEBUG(7,(_reg_info: policy key type = [%08x]\n, regkey-type));




svn commit: samba r18793 - in branches/SAMBA_3_0/source: include lib librpc/ndr smbd

2006-09-21 Thread jra
Author: jra
Date: 2006-09-21 18:37:09 + (Thu, 21 Sep 2006)
New Revision: 18793

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

Log:
Fix BE string handling in the auto-generated
code. Should now work again with ASU.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/include/charset.h
   branches/SAMBA_3_0/source/lib/charcnv.c
   branches/SAMBA_3_0/source/lib/util_reg.c
   branches/SAMBA_3_0/source/lib/util_unistr.c
   branches/SAMBA_3_0/source/librpc/ndr/ndr_string.c
   branches/SAMBA_3_0/source/smbd/mangle_hash2.c


Changeset:
Modified: branches/SAMBA_3_0/source/include/charset.h
===
--- branches/SAMBA_3_0/source/include/charset.h 2006-09-21 18:22:51 UTC (rev 
18792)
+++ branches/SAMBA_3_0/source/include/charset.h 2006-09-21 18:37:09 UTC (rev 
18793)
@@ -20,20 +20,10 @@
 */
 
 /* this defines the charset types used in samba */
-typedef enum {CH_UCS2=0, CH_UTF16=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, 
CH_UTF8=4} charset_t;
+typedef enum {CH_UTF16LE=0, CH_UTF16=0, CH_UNIX=1, CH_DISPLAY=2, CH_DOS=3, 
CH_UTF8=4, CH_UTF16BE=5} charset_t;
 
-#if 0
-/* FIXME!!!  Hack job for now to get the lsa ndr code compiling */
-#ifndef strlen_m
-#define strlen_m strlen
-#endif
-#ifndef strlen_m_term
-#define strlen_m_term strlen
-#endif
-#endif
+#define NUM_CHARSETS 6
 
-#define NUM_CHARSETS 5
-
 /* 
  *   for each charset we have a function that pushes from that charset to a 
ucs2
  *   buffer, and a function that pulls from ucs2 buffer to that  charset.

Modified: branches/SAMBA_3_0/source/lib/charcnv.c
===
--- branches/SAMBA_3_0/source/lib/charcnv.c 2006-09-21 18:22:51 UTC (rev 
18792)
+++ branches/SAMBA_3_0/source/lib/charcnv.c 2006-09-21 18:37:09 UTC (rev 
18793)
@@ -56,7 +56,8 @@
 {
const char *ret = NULL;
 
-   if (ch == CH_UCS2) ret = UTF-16LE;
+   if (ch == CH_UTF16LE) ret = UTF-16LE;
+   else if (ch == CH_UTF16BE) ret = UTF-16BE;
else if (ch == CH_UNIX) ret = lp_unix_charset();
else if (ch == CH_DOS) ret = lp_dos_charset();
else if (ch == CH_DISPLAY) ret = lp_display_charset();
@@ -132,11 +133,11 @@
 
/* so that charset_name() works we need to get the UNIX-UCS2 going
   first */
-   if (!conv_handles[CH_UNIX][CH_UCS2])
-   conv_handles[CH_UNIX][CH_UCS2] = 
smb_iconv_open(charset_name(CH_UCS2), ASCII);
+   if (!conv_handles[CH_UNIX][CH_UTF16LE])
+   conv_handles[CH_UNIX][CH_UTF16LE] = 
smb_iconv_open(charset_name(CH_UTF16LE), ASCII);
 
-   if (!conv_handles[CH_UCS2][CH_UNIX])
-   conv_handles[CH_UCS2][CH_UNIX] = smb_iconv_open(ASCII, 
charset_name(CH_UCS2));
+   if (!conv_handles[CH_UTF16LE][CH_UNIX])
+   conv_handles[CH_UTF16LE][CH_UNIX] = smb_iconv_open(ASCII, 
charset_name(CH_UTF16LE));
 
for (c1=0;c1NUM_CHARSETS;c1++) {
for (c2=0;c2NUM_CHARSETS;c2++) {
@@ -156,10 +157,10 @@
if (conv_handles[c1][c2] == (smb_iconv_t)-1) {
DEBUG(0,(init_iconv: Conversion from %s to %s 
not supported\n,
 charset_name((charset_t)c1), 
charset_name((charset_t)c2)));
-   if (c1 != CH_UCS2) {
+   if (c1 != CH_UTF16LE  c1 != CH_UTF16BE) {
n1 = ASCII;
}
-   if (c2 != CH_UCS2) {
+   if (c2 != CH_UTF16LE  c2 != CH_UTF16BE) {
n2 = ASCII;
}
DEBUG(0,(init_iconv: Attempting to replace 
with conversion from %s to %s\n,
@@ -214,7 +215,7 @@
descriptor = conv_handles[from][to];
 
if (srclen == (size_t)-1) {
-   if (from == CH_UCS2) {
+   if (from == CH_UTF16LE || from == CH_UTF16BE) {
srclen = (strlen_w((const smb_ucs2_t *)src)+1) * 2;
} else {
srclen = strlen((const char *)src)+1;
@@ -286,8 +287,11 @@
if (o_len == 0 || i_len == 0)
return destlen - o_len;
 
-   if (from == CH_UCS2  to != CH_UCS2) {
-   /* Can't convert from ucs2 to multibyte. Replace with 
the default fail char. */
+   if (((from == CH_UTF16LE)||(from == CH_UTF16BE)) 
+   ((to != CH_UTF16LE)||(to != CH_UTF16BE))) {
+   /* Can't convert from utf16 any endian to multibyte.
+  Replace with the default fail char.
+   */
if (i_len  2)
return destlen - o_len;
if (i_len = 2) {
@@ -306,8 +310,10 @@
/* Keep trying with the 

svn commit: samba r18794 - in branches/SAMBA_3_0/source/rpc_server: .

2006-09-21 Thread jerry
Author: jerry
Date: 2006-09-21 18:54:25 + (Thu, 21 Sep 2006)
New Revision: 18794

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

Log:
Make ENumKey() work again in the registry server
Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c2006-09-21 
18:37:09 UTC (rev 18793)
+++ branches/SAMBA_3_0/source/rpc_server/srv_winreg_nt.c2006-09-21 
18:54:25 UTC (rev 18794)
@@ -554,7 +554,7 @@
if ( !regkey )
return WERR_BADFID; 
 
-   if ( !name || !keyclass || !last_changed_time )
+   if ( !name || !keyclass )
return WERR_INVALID_PARAM;
 
DEBUG(8,(_reg_enum_key: enumerating key [%s]\n, regkey-name));
@@ -566,7 +566,9 @@

DEBUG(10,(_reg_enum_key: retrieved subkey named [%s]\n, subkey));

-   *last_changed_time = 0;
+   if ( last_changed_time ) {
+   *last_changed_time = 0;
+   }
keyclass-name = NULL;
if ( (name-name = talloc_strdup( p-mem_ctx, subkey )) == NULL ) {
status = WERR_NOMEM;



svn commit: samba r18795 - in branches/SAMBA_3_0_23/source/utils: .

2006-09-21 Thread jerry
Author: jerry
Date: 2006-09-21 19:01:37 + (Thu, 21 Sep 2006)
New Revision: 18795

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

Log:
fix a compile warning in the 'net ads search' code
Modified:
   branches/SAMBA_3_0_23/source/utils/net_ads.c


Changeset:
Modified: branches/SAMBA_3_0_23/source/utils/net_ads.c
===
--- branches/SAMBA_3_0_23/source/utils/net_ads.c2006-09-21 18:54:25 UTC 
(rev 18794)
+++ branches/SAMBA_3_0_23/source/utils/net_ads.c2006-09-21 19:01:37 UTC 
(rev 18795)
@@ -1061,7 +1061,7 @@
asprintf(dn, %s,%s, ou_str, ads-config.bind_path);
free(ou_str);
 
-   rc = ads_search_dn(ads, res, dn, NULL);
+   rc = ads_search_dn(ads, (void**)res, dn, NULL);
ads_msgfree(ads, res);
 
if (ADS_ERR_OK(rc)) {



svn commit: samba r18796 - in branches/SAMBA_3_0/source/torture: .

2006-09-21 Thread jra
Author: jra
Date: 2006-09-21 20:53:56 + (Thu, 21 Sep 2006)
New Revision: 18796

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

Log:
Fix the build. Sorry.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/torture/utable.c


Changeset:
Modified: branches/SAMBA_3_0/source/torture/utable.c
===
--- branches/SAMBA_3_0/source/torture/utable.c  2006-09-21 19:01:37 UTC (rev 
18795)
+++ branches/SAMBA_3_0/source/torture/utable.c  2006-09-21 20:53:56 UTC (rev 
18796)
@@ -47,7 +47,7 @@
SSVAL(c2, 0, c);
fstrcpy(fname, \\utable\\x);
p = fname+strlen(fname);
-   len = convert_string(CH_UCS2, CH_UNIX, 
+   len = convert_string(CH_UTF16LE, CH_UNIX, 
 c2, 2, 
 p, sizeof(fname)-strlen(fname), True);
p[len] = 0;
@@ -104,7 +104,7 @@
p = fname+strlen(fname);
SSVAL(c2, 0, c);
 
-   len = convert_string(CH_UCS2, CH_UNIX, 
+   len = convert_string(CH_UTF16LE, CH_UNIX, 
 c2, 2, 
 p, sizeof(fname)-strlen(fname), True);
p[len] = 0;



svn commit: samba r18797 - in branches/SAMBA_3_0/source: .

2006-09-21 Thread metze
Author: metze
Date: 2006-09-21 21:21:31 + (Thu, 21 Sep 2006)
New Revision: 18797

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

Log:
fix the loading of pam_winbind.so and libnss_winbind.so
when building with socket wrapper

metze

Modified:
   branches/SAMBA_3_0/source/Makefile.in


Changeset:
Modified: branches/SAMBA_3_0/source/Makefile.in
===
--- branches/SAMBA_3_0/source/Makefile.in   2006-09-21 20:53:56 UTC (rev 
18796)
+++ branches/SAMBA_3_0/source/Makefile.in   2006-09-21 21:21:31 UTC (rev 
18797)
@@ -554,7 +554,7 @@
 $(SMBLDAP_OBJ) $(DCUTIL_OBJ)
 
 PAM_WINBIND_OBJ = nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \
- @LIBREPLACE_OBJS@ @BUILD_INIPARSER@
+ @LIBREPLACE_OBJS@ @SOCKET_WRAPPER_OBJS@ @BUILD_INIPARSER@
 
 LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o libsmb/libsmb_compat.o \
   libsmb/libsmb_cache.o \
@@ -768,7 +768,7 @@
 WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) 
\
$(SECRETS_OBJ) $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) 
$(RPC_PARSE_OBJ1) $(DOSERR_OBJ)
 
-WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) @LIBREPLACE_OBJS@ @WINBIND_NSS_EXTRA_OBJS@
+WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) @LIBREPLACE_OBJS@ @SOCKET_WRAPPER_OBJS@ 
@WINBIND_NSS_EXTRA_OBJS@
 
 POPT_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \
   popt/popthelp.o popt/poptparse.o



svn commit: samba r18798 - in branches/SAMBA_3_0/source/nsswitch: .

2006-09-21 Thread metze
Author: metze
Date: 2006-09-21 22:24:53 + (Thu, 21 Sep 2006)
New Revision: 18798

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

Log:
use libreplace headers in pam and nss modules

this hopefully fixes the build on AIX

metze

Modified:
   branches/SAMBA_3_0/source/nsswitch/pam_winbind.h
   branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c
   branches/SAMBA_3_0/source/nsswitch/winbind_nss_config.h


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/pam_winbind.h
===
--- branches/SAMBA_3_0/source/nsswitch/pam_winbind.h2006-09-21 21:21:31 UTC 
(rev 18797)
+++ branches/SAMBA_3_0/source/nsswitch/pam_winbind.h2006-09-21 22:24:53 UTC 
(rev 18798)
@@ -4,24 +4,10 @@
Shirish Kalele 2000
 */
 
-#ifdef HAVE_FEATURES_H
-#include features.h
-#endif
+#include lib/replace/replace.h
+#include system/syslog.h
+#include system/time.h
 
-#include stdlib.h
-#include unistd.h
-#include limits.h
-#include string.h
-#include syslog.h
-#include stdarg.h
-#include sys/types.h
-#include sys/stat.h
-#include fcntl.h
-#include errno.h
-#include time.h
-
-#include config.h
-
 #define MODULE_NAME pam_winbind
 #define PAM_SM_AUTH
 #define PAM_SM_ACCOUNT

Modified: branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c2006-09-21 
21:21:31 UTC (rev 18797)
+++ branches/SAMBA_3_0/source/nsswitch/winbind_nss_aix.c2006-09-21 
22:24:53 UTC (rev 18798)
@@ -45,14 +45,9 @@
 
 */
 
-#include stdlib.h
-#include string.h
+#include winbind_client.h
 #include usersec.h
-#include errno.h
-#include stdarg.h
 
-#include winbind_client.h
-
 #define WB_AIX_ENCODED '_'
 
 static int debug_enabled;

Modified: branches/SAMBA_3_0/source/nsswitch/winbind_nss_config.h
===
--- branches/SAMBA_3_0/source/nsswitch/winbind_nss_config.h 2006-09-21 
21:21:31 UTC (rev 18797)
+++ branches/SAMBA_3_0/source/nsswitch/winbind_nss_config.h 2006-09-21 
22:24:53 UTC (rev 18798)
@@ -33,55 +33,13 @@
 /* Include header files from data in config.h file */
 
 #ifndef NO_CONFIG_H
-#include config.h
+#include lib/replace/replace.h
 #endif
 
-#include stdio.h
+#include system/passwd.h
+#include system/network.h
+#include system/filesys.h
 
-#ifdef HAVE_STDLIB_H
-#include stdlib.h
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include unistd.h
-#endif
-
-#ifdef HAVE_SYS_SELECT_H
-#include sys/select.h
-#endif
-
-#ifdef HAVE_SYS_SOCKET_H
-#include sys/socket.h
-#endif
-
-#ifdef HAVE_UNIXSOCKET
-#include sys/un.h
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include sys/time.h
-#endif
-
-#ifdef HAVE_GRP_H
-#include grp.h
-#endif
-
-#ifdef HAVE_STRING_H
-#include string.h
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include fcntl.h
-#else
-#ifdef HAVE_SYS_FCNTL_H
-#include sys/fcntl.h
-#endif
-#endif
-
-#include sys/types.h
-#include sys/stat.h
-#include errno.h
-#include pwd.h
 #include nsswitch/winbind_nss.h
 
 /* I'm trying really hard not to include anything from smb.h with the



svn commit: samba r18799 - in branches/SAMBA_3_0/source/rpc_client: .

2006-09-21 Thread gd
Author: gd
Date: 2006-09-21 22:44:32 + (Thu, 21 Sep 2006)
New Revision: 18799

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

Log:
Prepare query_disp_info to use the next idx from the last result entry
for the enumeration loop (following msdn docs of that call).

Guenther

Modified:
   branches/SAMBA_3_0/source/rpc_client/cli_samr.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_client/cli_samr.c
===
--- branches/SAMBA_3_0/source/rpc_client/cli_samr.c 2006-09-21 22:24:53 UTC 
(rev 18798)
+++ branches/SAMBA_3_0/source/rpc_client/cli_samr.c 2006-09-21 22:44:32 UTC 
(rev 18799)
@@ -1424,6 +1424,24 @@
 
 /* Query display info */
 
+static uint32 get_next_idx(SAMR_R_QUERY_DISPINFO *r)
+{
+   switch (r-switch_level) {
+   case 1:
+   return r-ctr-sam.info1-sam[r-num_entries-1].user_idx;
+   case 2:
+   return r-ctr-sam.info2-sam[r-num_entries-1].user_idx;
+   case 3:
+   return r-ctr-sam.info3-sam[r-num_entries-1].grp_idx;
+   case 4:
+   return r-ctr-sam.info4-sam[r-num_entries-1].user_idx;
+   case 5:
+   return r-ctr-sam.info5-sam[r-num_entries-1].grp_idx;
+   default:
+   return 0;
+   }
+}
+
 NTSTATUS rpccli_samr_query_dispinfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx, 
POLICY_HND *domain_pol, uint32 *start_idx,



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

2006-09-21 Thread metze
Author: metze
Date: 2006-09-21 22:55:00 + (Thu, 21 Sep 2006)
New Revision: 18800

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

Log:
fix a write behind the buffer bug...

Thanks Herb for finding this:-)

This was my bug, I typed it in on gd's laptop and he just run 'svn ci'

metze
Modified:
   branches/SAMBA_4_0/source/torture/rpc/samr.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/samr.c
===
--- branches/SAMBA_4_0/source/torture/rpc/samr.c2006-09-21 22:44:32 UTC 
(rev 18799)
+++ branches/SAMBA_4_0/source/torture/rpc/samr.c2006-09-21 22:55:00 UTC 
(rev 18800)
@@ -1887,10 +1887,8 @@
char *v = generate_random_str(mem_ctx, 1);
int i;
 
-   for (i=0; i ARRAY_SIZE(simple_pass); i++) {
-   simple_pass[i] = *v;
-   }
-   simple_pass[i] = '\0';
+   ZERO_STRUCT(simple_pass);
+   memset(simple_pass, *v, sizeof(simple_pass) - 1);
 
/* test what happens when picking a simple password */
if (!test_ChangePasswordUser3(p, mem_ctx, acct_name, 0, 
password, simple_pass, 0, True)) {



svn commit: samba r18801 - in branches/SAMBA_3_0/source/python: .

2006-09-21 Thread gd
Author: gd
Date: 2006-09-21 23:10:40 + (Thu, 21 Sep 2006)
New Revision: 18801

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

Log:
Fix (at least the build of) python bindings.

Guenther

Modified:
   branches/SAMBA_3_0/source/python/py_ntsec.c


Changeset:
Modified: branches/SAMBA_3_0/source/python/py_ntsec.c
===
--- branches/SAMBA_3_0/source/python/py_ntsec.c 2006-09-21 22:55:00 UTC (rev 
18800)
+++ branches/SAMBA_3_0/source/python/py_ntsec.c 2006-09-21 23:10:40 UTC (rev 
18801)
@@ -60,7 +60,7 @@
 
*dict = Py_BuildValue({sisisi}, type, ace-type,
flags, ace-flags,
-   mask, ace-info.mask);
+   mask, ace-access_mask);
 
if (py_from_SID(obj, ace-trustee)) {
PyDict_SetItemString(*dict, trustee, obj);
@@ -103,7 +103,7 @@
!PyInt_Check(obj))
return False;
 
-   sec_access.mask = PyInt_AsLong(obj);
+   sec_access = PyInt_AsLong(obj);
 
init_sec_ace(ace, trustee, ace_type, sec_access, ace_flags);
 
@@ -130,7 +130,7 @@
for (i = 0; i  acl-num_aces; i++) {
PyObject *obj;
 
-   if (py_from_ACE(obj, acl-ace[i]))
+   if (py_from_ACE(obj, acl-aces[i]))
PyList_SetItem(ace_list, i, obj);
}
 
@@ -157,16 +157,16 @@

acl-num_aces = PyList_Size(obj);
 
-   acl-ace = _talloc(mem_ctx, acl-num_aces * sizeof(SEC_ACE));
+   acl-aces = talloc_array(mem_ctx, struct security_ace, acl-num_aces);
acl-size = SEC_ACL_HEADER_SIZE;
 
for (i = 0; i  acl-num_aces; i++) {
PyObject *py_ace = PyList_GetItem(obj, i);
 
-   if (!py_to_ACE(acl-ace[i], py_ace))
+   if (!py_to_ACE(acl-aces[i], py_ace))
return False;
 
-   acl-size += acl-ace[i].size;
+   acl-size += acl-aces[i].size;
}
 
return True;
@@ -191,7 +191,7 @@
Py_DECREF(obj);
}
 
-   if (py_from_SID(obj, sd-grp_sid)) {
+   if (py_from_SID(obj, sd-group_sid)) {
PyDict_SetItemString(*dict, group_sid, obj);
Py_DECREF(obj);
}



svn commit: samba-web r1039 - in trunk/team: .

2006-09-21 Thread derrell
Author: derrell
Date: 2006-09-21 23:35:37 + (Thu, 21 Sep 2006)
New Revision: 1039

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

Log:
I didn't exist
Modified:
   trunk/team/index.html


Changeset:
Modified: trunk/team/index.html
===
--- trunk/team/index.html   2006-09-17 01:17:25 UTC (rev 1038)
+++ trunk/team/index.html   2006-09-21 23:35:37 UTC (rev 1039)
@@ -55,11 +55,12 @@
 lia href=mailto:[EMAIL PROTECTED]Marc Kaplan/a/li
 lia href=mailto:[EMAIL PROTECTED]Vance Lankhaar/a/li
 lia href=mailto:[EMAIL PROTECTED]Volker Lendecke/a/li
+lia href=mailto:[EMAIL PROTECTED]Herb Lewis/a/li
 /ul
 /td
 td valign=top
 ul
-lia href=mailto:[EMAIL PROTECTED]Herb Lewis/a/li
+lispan style=color:blue;Derrell Lipman/span/li
 lia href=mailto:[EMAIL PROTECTED]Jim McDonough/a/li
 lia href=mailto:[EMAIL PROTECTED]Stefan Metzmacher/a/li
 lia href=mailto:[EMAIL PROTECTED]Jean Francois Micouleau/a/li



svn commit: samba r18802 - in branches/SAMBA_3_0/source: . client include libsmb rpc_client rpc_parse rpc_server rpcclient smbd utils

2006-09-21 Thread jelmer
Author: jelmer
Date: 2006-09-21 23:57:32 + (Thu, 21 Sep 2006)
New Revision: 18802

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

Log:
Use the pidl-generated code for the srvsvc interface, both client and server 
code.

This has had some basic testing. I'll do more during the next couple of days 
and hopefully also 
make RPC-SRVSVC from Samba4 pass against it.

Removed:
   branches/SAMBA_3_0/source/include/rpc_srvsvc.h
   branches/SAMBA_3_0/source/rpc_client/cli_srvsvc.c
   branches/SAMBA_3_0/source/rpc_parse/parse_srv.c
   branches/SAMBA_3_0/source/rpc_server/srv_srvsvc.c
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/client/client.c
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/include/includes.h
   branches/SAMBA_3_0/source/include/rpc_client.h
   branches/SAMBA_3_0/source/include/rpc_misc.h
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/libsmb/libsmbclient.c
   branches/SAMBA_3_0/source/rpc_parse/parse_misc.c
   branches/SAMBA_3_0/source/rpc_server/srv_echo_nt.c
   branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
   branches/SAMBA_3_0/source/rpcclient/cmd_srvsvc.c
   branches/SAMBA_3_0/source/smbd/open.c
   branches/SAMBA_3_0/source/utils/net_rpc.c
   branches/SAMBA_3_0/source/utils/smbtree.c


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


Build status as of Fri Sep 22 00:00:01 2006

2006-09-21 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-09-21 
00:00:52.0 +
+++ /home/build/master/cache/broken_results.txt 2006-09-22 00:00:05.0 
+
@@ -1,21 +1,21 @@
-Build status as of Thu Sep 21 00:00:02 2006
+Build status as of Fri Sep 22 00:00:01 2006
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 build_farm   0  0  0 
-ccache   39 7  0 
-distcc   39 6  0 
-ldb  37 9  0 
-libreplace   36 3  0 
+ccache   46 7  0 
+distcc   46 6  0 
+ldb  43 9  0 
+libreplace   42 1  0 
 lorikeet-heimdal 0  0  0 
-ppp  17 0  0 
-rsync39 4  0 
+ppp  18 0  0 
+rsync46 4  0 
 samba0  0  0 
 samba-docs   0  0  0 
-samba4   37 32 12
-samba_3_040 25 0 
-smb-build30 4  0 
-talloc   40 3  0 
-tdb  38 7  0 
+samba4   44 14 1 
+samba_3_042 19 0 
+smb-build29 4  0 
+talloc   46 2  0 
+tdb  44 7  0 
 


svn commit: samba r18803 - in branches/SAMBA_3_0/source/rpc_client: .

2006-09-21 Thread jerry
Author: jerry
Date: 2006-09-22 00:05:53 + (Fri, 22 Sep 2006)
New Revision: 18803

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

Log:
remove unused function
Modified:
   branches/SAMBA_3_0/source/rpc_client/cli_samr.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_client/cli_samr.c
===
--- branches/SAMBA_3_0/source/rpc_client/cli_samr.c 2006-09-21 23:57:32 UTC 
(rev 18802)
+++ branches/SAMBA_3_0/source/rpc_client/cli_samr.c 2006-09-22 00:05:53 UTC 
(rev 18803)
@@ -1424,24 +1424,6 @@
 
 /* Query display info */
 
-static uint32 get_next_idx(SAMR_R_QUERY_DISPINFO *r)
-{
-   switch (r-switch_level) {
-   case 1:
-   return r-ctr-sam.info1-sam[r-num_entries-1].user_idx;
-   case 2:
-   return r-ctr-sam.info2-sam[r-num_entries-1].user_idx;
-   case 3:
-   return r-ctr-sam.info3-sam[r-num_entries-1].grp_idx;
-   case 4:
-   return r-ctr-sam.info4-sam[r-num_entries-1].user_idx;
-   case 5:
-   return r-ctr-sam.info5-sam[r-num_entries-1].grp_idx;
-   default:
-   return 0;
-   }
-}
-
 NTSTATUS rpccli_samr_query_dispinfo(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx, 
POLICY_HND *domain_pol, uint32 *start_idx,



Re: svn commit: samba r18802 - in branches/SAMBA_3_0/source: . client include libsmb rpc_client rpc_parse rpc_server rpcclient smbd utils

2006-09-21 Thread Jim McDonough

On 9/21/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Use the pidl-generated code for the srvsvc interface, both client and
server code.


Very cool.  Is there any reason we can't rename stat in
srvsvc_NetServerStatisticsGet?  It causes  lots of compile warnings.  :

./librpc/gen_ndr/cli_srvsvc.h:28: warning: declaration of 'stat' shadows a
global declaration
/usr/include/sys/stat.h:365: warning: shadowed declaration is here


svn commit: samba r18804 - in branches/SAMBA_3_0/source/rpc_server: .

2006-09-21 Thread metze
Author: metze
Date: 2006-09-22 03:41:11 + (Fri, 22 Sep 2006)
New Revision: 18804

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

Log:
resume_hnd isn't a ref pointer and can be NULL

metze

Modified:
   branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c


Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
===
--- branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-09-22 
00:05:53 UTC (rev 18803)
+++ branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c2006-09-22 
03:41:11 UTC (rev 18804)
@@ -508,7 +508,9 @@
 
ZERO_STRUCTP(ctr);
 
-   *resume_hnd = 0;
+   if (resume_hnd) {
+   *resume_hnd = 0;
+   }
 
/* Ensure all the usershares are loaded. */
become_root();



svn commit: samba r18805 - in branches/SAMBA_4_0/source/smbd: .

2006-09-21 Thread tridge
Author: tridge
Date: 2006-09-22 03:49:24 + (Fri, 22 Sep 2006)
New Revision: 18805

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

Log:

make error message match function name

Modified:
   branches/SAMBA_4_0/source/smbd/process_single.c


Changeset:
Modified: branches/SAMBA_4_0/source/smbd/process_single.c
===
--- branches/SAMBA_4_0/source/smbd/process_single.c 2006-09-22 03:41:11 UTC 
(rev 18804)
+++ branches/SAMBA_4_0/source/smbd/process_single.c 2006-09-22 03:49:24 UTC 
(rev 18805)
@@ -54,7 +54,7 @@
/* accept an incoming connection. */
status = socket_accept(sock, sock2);
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(0,(accept_connection_single: accept: %s\n, 
nt_errstr(status)));
+   DEBUG(0,(single_accept_connection: accept: %s\n, 
nt_errstr(status)));
/* this looks strange, but is correct. We need to
   throttle things until the system clears enough
   resources to handle this new socket. If we don't



svn commit: samba r18806 - in branches/SAMBA_4_0/source/smbd: .

2006-09-21 Thread tridge
Author: tridge
Date: 2006-09-22 03:49:40 + (Fri, 22 Sep 2006)
New Revision: 18806

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

Log:

fixed two spelling errors

Modified:
   branches/SAMBA_4_0/source/smbd/service_stream.c


Changeset:
Modified: branches/SAMBA_4_0/source/smbd/service_stream.c
===
--- branches/SAMBA_4_0/source/smbd/service_stream.c 2006-09-22 03:49:24 UTC 
(rev 18805)
+++ branches/SAMBA_4_0/source/smbd/service_stream.c 2006-09-22 03:49:40 UTC 
(rev 18806)
@@ -57,14 +57,14 @@
struct event_context *event_ctx = srv_conn-event.ctx;
const struct model_ops *model_ops = srv_conn-model_ops;
 
-   if (!reason) reason = unknwon reason;
+   if (!reason) reason = unknown reason;
 
srv_conn-terminate = reason;
 
if (srv_conn-processing) {
/* 
 * if we're currently inside the stream_io_handler(),
-* deferr the termination to the end of stream_io_hendler()
+* defer the termination to the end of stream_io_hendler()
 *
 * and we don't want to read or write to the connection...
 */



svn commit: samba r18807 - in branches/SAMBA_4_0/source/torture/basic: .

2006-09-21 Thread tridge
Author: tridge
Date: 2006-09-22 03:50:15 + (Fri, 22 Sep 2006)
New Revision: 18807

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

Log:

don't overtax the imaginations of servers that can't do mkdir on \\dirname\\

Modified:
   branches/SAMBA_4_0/source/torture/basic/charset.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/basic/charset.c
===
--- branches/SAMBA_4_0/source/torture/basic/charset.c   2006-09-22 03:49:40 UTC 
(rev 18806)
+++ branches/SAMBA_4_0/source/torture/basic/charset.c   2006-09-22 03:50:15 UTC 
(rev 18807)
@@ -26,7 +26,7 @@
 #include libcli/libcli.h
 #include torture/util.h
 
-#define BASEDIR \\chartest\\
+#define BASEDIR \\chartest
 
 /* 
open a file using a set of unicode code points for the name
@@ -62,7 +62,7 @@
return NT_STATUS_NO_MEMORY;
}
 
-   fname2 = talloc_asprintf(ucs_name, %s%s, BASEDIR, fname);
+   fname2 = talloc_asprintf(ucs_name, %s\\%s, BASEDIR, fname);
if (!fname2) {
talloc_free(ucs_name);
return NT_STATUS_NO_MEMORY;



svn commit: samba r18808 - in branches/SAMBA_4_0/source/torture/smb2: .

2006-09-21 Thread tridge
Author: tridge
Date: 2006-09-22 04:04:46 + (Fri, 22 Sep 2006)
New Revision: 18808

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

Log:

added SMB2-MAXWRITE test and SMB2-DIR tests

expanded size of dangerous level for write in SMB2-CONNECT test

Added:
   branches/SAMBA_4_0/source/torture/smb2/dir.c
   branches/SAMBA_4_0/source/torture/smb2/maxwrite.c
Modified:
   branches/SAMBA_4_0/source/torture/smb2/config.mk
   branches/SAMBA_4_0/source/torture/smb2/connect.c
   branches/SAMBA_4_0/source/torture/smb2/smb2.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/smb2/config.mk
===
--- branches/SAMBA_4_0/source/torture/smb2/config.mk2006-09-22 03:50:15 UTC 
(rev 18807)
+++ branches/SAMBA_4_0/source/torture/smb2/config.mk2006-09-22 04:04:46 UTC 
(rev 18808)
@@ -8,6 +8,8 @@
proto.h
 OBJ_FILES = \
connect.o \
+   dir.o \
+   maxwrite.o \
scan.o \
util.o \
getinfo.o \

Modified: branches/SAMBA_4_0/source/torture/smb2/connect.c
===
--- branches/SAMBA_4_0/source/torture/smb2/connect.c2006-09-22 03:50:15 UTC 
(rev 18807)
+++ branches/SAMBA_4_0/source/torture/smb2/connect.c2006-09-22 04:04:46 UTC 
(rev 18808)
@@ -75,7 +75,7 @@
int i;

if (lp_parm_bool(-1, torture, dangerous, False)) {
-   data = data_blob_talloc(tree, NULL, 16);
+   data = data_blob_talloc(tree, NULL, 1600);
} else if (lp_parm_bool(-1, target, samba4, False)) {
data = data_blob_talloc(tree, NULL, UINT16_MAX);
} else {
@@ -90,6 +90,8 @@
w.in.offset  = 0;
w.in.data= data;
 
+   printf(writing %d bytes\n, data.length);
+
status = smb2_write(tree, w);
if (!NT_STATUS_IS_OK(status)) {
printf(write failed - %s\n, nt_errstr(status));
@@ -120,6 +122,8 @@
r.in.length  = data.length;
r.in.offset  = 0;
 
+   printf(reading %d bytes\n, data.length);
+
status = smb2_read(tree, tree, r);
if (!NT_STATUS_IS_OK(status)) {
printf(read failed - %s\n, nt_errstr(status));
@@ -139,8 +143,7 @@
 /*
   send a create
 */
-static struct smb2_handle torture_smb2_create(struct smb2_tree *tree, 
- const char *fname)
+struct smb2_handle torture_smb2_create(struct smb2_tree *tree, const char 
*fname)
 {
struct smb2_create io;
NTSTATUS status;

Added: branches/SAMBA_4_0/source/torture/smb2/dir.c
===
--- branches/SAMBA_4_0/source/torture/smb2/dir.c2006-09-22 03:50:15 UTC 
(rev 18807)
+++ branches/SAMBA_4_0/source/torture/smb2/dir.c2006-09-22 04:04:46 UTC 
(rev 18808)
@@ -0,0 +1,94 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   SMB2 dir list test suite
+
+   Copyright (C) Andrew Tridgell 2005
+   
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+   
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+   
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include includes.h
+#include libcli/smb2/smb2.h
+#include libcli/smb2/smb2_calls.h
+
+#include torture/torture.h
+#include torture/smb2/proto.h
+
+/*
+  test find continue
+*/
+static BOOL torture_smb2_find_dir(struct smb2_tree *tree)
+{
+   struct smb2_handle handle;
+   NTSTATUS status;
+   int i;
+   struct smb2_find f;
+   BOOL ret = True;
+   union smb_search_data *d;
+   uint_t count;
+
+   status = smb2_util_roothandle(tree, handle);
+   if (!NT_STATUS_IS_OK(status)) {
+   return False;
+   }
+
+   ZERO_STRUCT(f);
+   f.in.file.handle= handle;
+   f.in.pattern= *;
+   f.in.continue_flags = SMB2_CONTINUE_FLAG_SINGLE;
+   f.in.max_response_size  = 0x100;
+   f.in.level  = SMB2_FIND_BOTH_DIRECTORY_INFO;
+
+   do {
+   status = smb2_find_level(tree, tree, f, count, d);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(SMB2_FIND_ID_BOTH_DIRECTORY_INFO failed - 
%s\n, nt_errstr(status));
+   break;
+   }
+
+   printf(Got %d files\n, count);
+

svn commit: samba r18809 - in branches/SAMBA_3_0/source: .

2006-09-21 Thread metze
Author: metze
Date: 2006-09-22 04:05:15 + (Fri, 22 Sep 2006)
New Revision: 18809

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

Log:
add a valgrind suppression file to prepare running make test
under valgrind in the buildfarm

metze

Added:
   branches/SAMBA_3_0/source/.valgrind_suppressions


Changeset:
Added: branches/SAMBA_3_0/source/.valgrind_suppressions
===



svn commit: samba r18810 - in branches/SAMBA_3_0/source: . include lib lib/talloc lib/talloc/web

2006-09-21 Thread metze
Author: metze
Date: 2006-09-22 04:16:58 + (Fri, 22 Sep 2006)
New Revision: 18810

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

Log:
use a copy of samba4's talloc under lib/talloc/
to make mergeing easier.

metze

Added:
   branches/SAMBA_3_0/source/lib/talloc/
   branches/SAMBA_3_0/source/lib/talloc/Makefile.in
   branches/SAMBA_3_0/source/lib/talloc/aclocal.m4
   branches/SAMBA_3_0/source/lib/talloc/autogen.sh
   branches/SAMBA_3_0/source/lib/talloc/config.guess
   branches/SAMBA_3_0/source/lib/talloc/config.mk
   branches/SAMBA_3_0/source/lib/talloc/config.sub
   branches/SAMBA_3_0/source/lib/talloc/configure.ac
   branches/SAMBA_3_0/source/lib/talloc/install-sh
   branches/SAMBA_3_0/source/lib/talloc/libtalloc.m4
   branches/SAMBA_3_0/source/lib/talloc/talloc.3.xml
   branches/SAMBA_3_0/source/lib/talloc/talloc.c
   branches/SAMBA_3_0/source/lib/talloc/talloc.h
   branches/SAMBA_3_0/source/lib/talloc/talloc.pc.in
   branches/SAMBA_3_0/source/lib/talloc/talloc_guide.txt
   branches/SAMBA_3_0/source/lib/talloc/testsuite.c
   branches/SAMBA_3_0/source/lib/talloc/web/
   branches/SAMBA_3_0/source/lib/talloc/web/index.html
Removed:
   branches/SAMBA_3_0/source/include/talloc.h
   branches/SAMBA_3_0/source/lib/talloc.c
   branches/SAMBA_3_0/source/lib/talloctort.c
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/configure.in
   branches/SAMBA_3_0/source/include/includes.h


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


svn commit: samba r18811 - in branches/SAMBA_3_0/source/librpc: gen_ndr idl

2006-09-21 Thread jerry
Author: jerry
Date: 2006-09-22 04:31:11 + (Fri, 22 Sep 2006)
New Revision: 18811

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

Log:
rename stat field to avoid compiler warnings about 
shadowed variables


Modified:
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_srvsvc.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/cli_srvsvc.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_srvsvc.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_srvsvc.c
   branches/SAMBA_3_0/source/librpc/gen_ndr/srv_srvsvc.h
   branches/SAMBA_3_0/source/librpc/gen_ndr/srvsvc.h
   branches/SAMBA_3_0/source/librpc/idl/srvsvc.idl


Changeset:
Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/cli_srvsvc.c
===
--- branches/SAMBA_3_0/source/librpc/gen_ndr/cli_srvsvc.c   2006-09-22 
04:16:58 UTC (rev 18810)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/cli_srvsvc.c   2006-09-22 
04:31:11 UTC (rev 18811)
@@ -738,7 +738,7 @@
return werror_to_ntstatus(r.out.result);
 }
 
-NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx, const char *server_unc, const char *service, uint32_t 
level, uint32_t options, struct srvsvc_Statistics *stat)
+NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx, const char *server_unc, const char *service, uint32_t 
level, uint32_t options, struct srvsvc_Statistics *stats)
 {
struct srvsvc_NetServerStatisticsGet r;
NTSTATUS status;
@@ -762,7 +762,7 @@
}

/* Return variables */
-   *stat = *r.out.stat;
+   *stats = *r.out.stats;

/* Return result */
return werror_to_ntstatus(r.out.result);

Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/cli_srvsvc.h
===
--- branches/SAMBA_3_0/source/librpc/gen_ndr/cli_srvsvc.h   2006-09-22 
04:16:58 UTC (rev 18810)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/cli_srvsvc.h   2006-09-22 
04:31:11 UTC (rev 18811)
@@ -25,7 +25,7 @@
 NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo 
*info);
 NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, 
uint32_t *parm_error);
 NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo 
*info, uint32_t maxlen, uint32_t *totalentries, uint32_t *resume_handle);
-NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx, const char *server_unc, const char *service, uint32_t 
level, uint32_t options, struct srvsvc_Statistics *stat);
+NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx, const char *server_unc, const char *service, uint32_t 
level, uint32_t options, struct srvsvc_Statistics *stats);
 NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo 
info);
 NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, 
TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union 
srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t 
*totalentries, uint32_t *resume_handle);
 NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX 
*mem_ctx, const char *server_unc, uint32_t unknown, struct 
srvsvc_NetTransportInfo0 transport);

Modified: branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_srvsvc.c
===
--- branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_srvsvc.c   2006-09-22 
04:16:58 UTC (rev 18810)
+++ branches/SAMBA_3_0/source/librpc/gen_ndr/ndr_srvsvc.c   2006-09-22 
04:31:11 UTC (rev 18811)
@@ -16485,8 +16485,8 @@
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r-in.options));
}
if (flags  NDR_OUT) {
-   if (r-out.stat == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
-   NDR_CHECK(ndr_push_srvsvc_Statistics(ndr, NDR_SCALARS, 
r-out.stat));
+   if (r-out.stats == NULL) return 
NT_STATUS_INVALID_PARAMETER_MIX;
+   NDR_CHECK(ndr_push_srvsvc_Statistics(ndr, NDR_SCALARS, 
r-out.stats));
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r-out.result));
}
return NT_STATUS_OK;
@@ -16498,7 +16498,7 @@
uint32_t _ptr_service;
TALLOC_CTX *_mem_save_server_unc_0;
TALLOC_CTX *_mem_save_service_0;
-   TALLOC_CTX *_mem_save_stat_0;
+   TALLOC_CTX *_mem_save_stats_0;
if (flags  NDR_IN) {
ZERO_STRUCT(r-out);
 
@@ -16540,17 +16540,17 @@
}

svn commit: samba r18813 - in branches/SAMBA_3_0/source/client: .

2006-09-21 Thread metze
Author: metze
Date: 2006-09-22 05:36:15 + (Fri, 22 Sep 2006)
New Revision: 18813

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

Log:
the generated rpccli_ functions give NTSTATUS

metze

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


Changeset:
Modified: branches/SAMBA_3_0/source/client/client.c
===
--- branches/SAMBA_3_0/source/client/client.c   2006-09-22 05:26:26 UTC (rev 
18812)
+++ branches/SAMBA_3_0/source/client/client.c   2006-09-22 05:36:15 UTC (rev 
18813)
@@ -2726,7 +2726,6 @@
struct rpc_pipe_client *pipe_hnd;
TALLOC_CTX *mem_ctx;
uint32 enum_hnd = 0;
-   WERROR werr;
union srvsvc_NetShareCtr ctr;
int i;
uint32 level;
@@ -2749,10 +2748,10 @@
 
level = 1;
 
-   werr = rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, NULL, level, ctr,
+   status = rpccli_srvsvc_NetShareEnum(pipe_hnd, mem_ctx, NULL, level, 
ctr,
0x, numentries, enum_hnd);
 
-   if (!W_ERROR_IS_OK(werr)) {
+   if (!NT_STATUS_IS_OK(status)) {
TALLOC_FREE(mem_ctx);
cli_rpc_pipe_close(pipe_hnd);
return False;



svn commit: samba r18814 - in branches/SAMBA_3_0/source: .

2006-09-21 Thread metze
Author: metze
Date: 2006-09-22 05:46:03 + (Fri, 22 Sep 2006)
New Revision: 18814

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

Log:
diable immediate structs for now until we completely build with them again

metze

Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-09-22 05:36:15 UTC (rev 
18813)
+++ branches/SAMBA_3_0/source/configure.in  2006-09-22 05:46:03 UTC (rev 
18814)
@@ -1001,7 +1001,7 @@
#define X_FOOBAR(x) ((FOOBAR) { x })
#define FOO_ONE X_FOOBAR(1)
FOOBAR f = FOO_ONE;   
-   struct {
+   static struct {
FOOBAR y; 
} f2[] = {
{FOO_ONE}