[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-117-gae1a69f

2009-03-01 Thread Stefan Metzmacher
The branch, master has been updated
   via  ae1a69f3ea42d778d5cb16523fd7bf4f7f36a3c9 (commit)
  from  cdbc00bb52f39472fe5f1380b15180205644c8e9 (commit)

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


- Log -
commit ae1a69f3ea42d778d5cb16523fd7bf4f7f36a3c9
Author: Stefan Metzmacher 
Date:   Mon Mar 2 08:55:00 2009 +0100

libcli/security: fix the source3 build

metze

---

Summary of changes:
 libcli/security/secace.c |2 +-
 libcli/security/secacl.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/secace.c b/libcli/security/secace.c
index 4e8eddc..7d87b1c 100644
--- a/libcli/security/secace.c
+++ b/libcli/security/secace.c
@@ -22,7 +22,7 @@
 
 #include "includes.h"
 #include "librpc/gen_ndr/ndr_security.h"
-#include "libcli/security/security.h"
+#include "libcli/security/dom_sid.h"
 
 #define  SEC_ACE_HEADER_SIZE (2 * sizeof(uint8_t) + sizeof(uint16_t) + 
sizeof(uint32_t))
 
diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c
index 4564077..f10cc09 100644
--- a/libcli/security/secacl.c
+++ b/libcli/security/secacl.c
@@ -21,7 +21,7 @@
  */
 
 #include "includes.h"
-#include "libcli/security/security.h"
+#include "librpc/gen_ndr/ndr_security.h"
 
 #define  SEC_ACL_HEADER_SIZE (2 * sizeof(uint16_t) + sizeof(uint32_t))
 


-- 
Samba Shared Repository


Re: [SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-93-g09ac816

2009-03-01 Thread Stefan (metze) Metzmacher
Jelmer Vernooij schrieb:
> The branch, master has been updated
>via  09ac816b36e45fd537af2f7fe7c57a11f5c744f5 (commit)
>via  235244f4cc707130dd130afce88bde49606bd501 (commit)
>   from  54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 (commit)
> 
> http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
> 
> 
> - Log -
> commit 09ac816b36e45fd537af2f7fe7c57a11f5c744f5
> Merge: 235244f4cc707130dd130afce88bde49606bd501 
> 54bc27e9374742d37b1ed9012d1cfe8f5ace6d40
> Author: Jelmer Vernooij 
> Date:   Sun Mar 1 16:39:35 2009 +0100
> 
> Merge branch 'master' of git://git.samba.org/samba into teventfix
> 
> Conflicts:
>   lib/tevent/pytevent.c
> 
> commit 235244f4cc707130dd130afce88bde49606bd501
> Author: Jelmer Vernooij 
> Date:   Sun Mar 1 16:38:07 2009 +0100
> 
> Avoid using tevent_util.h, which won't be available if we use the system
> tevent.
> 
> ---
> 
> Summary of changes:
>  lib/tevent/pytevent.c |4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> 
> Changeset truncated at 500 lines:
> 
> diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c
> index 3b45ba1..fe7e7e3 100644
> --- a/lib/tevent/pytevent.c
> +++ b/lib/tevent/pytevent.c
> @@ -29,7 +29,6 @@
>  
>  #include 
>  #include 
> -#include "tevent_util.h"
>  
>  typedef struct {
>   PyObject_HEAD
> @@ -54,7 +53,8 @@ static PyObject *py_backend_list(PyObject *self)
>  PyObject *ret;
>  int i, len;
>  
> -len = ev_str_list_length(backends);
> +for (len = 0; backends[len]; len++);
> +
>  ret = PyList_New(len);
>  for (i = 0; i < len; i++)
>  PyList_SetItem(ret, i, PyString_FromString(backends[i]));
> 

I think we should include pytevent in the standalone build and don't
build it when we use the system tevent library. (We should do that for
all statndalone libraries)

metze




signature.asc
Description: OpenPGP digital signature


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-116-gcdbc00b

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  cdbc00bb52f39472fe5f1380b15180205644c8e9 (commit)
  from  0a3ee53b50a10874b0ee0230b022b4277b5a6d96 (commit)

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


- Log -
commit cdbc00bb52f39472fe5f1380b15180205644c8e9
Author: Jelmer Vernooij 
Date:   Mon Mar 2 05:07:30 2009 +0100

Fix test_surrounding in samba4.rpcecho.python.

---

Summary of changes:
 .../scripting/python/samba/tests/dcerpc/rpcecho.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py 
b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py
index 12638e2..6226800 100644
--- a/source4/scripting/python/samba/tests/dcerpc/rpcecho.py
+++ b/source4/scripting/python/samba/tests/dcerpc/rpcecho.py
@@ -49,7 +49,7 @@ class RpcEchoTests(RpcInterfaceTestCase):
 surrounding_struct.x = 4
 surrounding_struct.surrounding = [1,2,3,4]
 y = self.conn.TestSurrounding(surrounding_struct)
-self.assertEquals(8 * [0], y.surrounding)
+self.assertEquals(4 * [0], y.surrounding)
 
 def test_manual_request(self):
 self.assertEquals("\x01\x00\x00\x00", self.conn.request(0, chr(0) * 4))


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-115-g0a3ee53

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  0a3ee53b50a10874b0ee0230b022b4277b5a6d96 (commit)
   via  2d7a3748b2063c4137ee98ceca85361651ef8ee7 (commit)
   via  c7b9757b8ac3ac6baa478655a4d2f77dff8240a8 (commit)
  from  9b0df441e1bd836c433e11582650fa0171791485 (commit)

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


- Log -
commit 0a3ee53b50a10874b0ee0230b022b4277b5a6d96
Author: Jelmer Vernooij 
Date:   Mon Mar 2 05:04:07 2009 +0100

Use samba3's own iconv implementation for now, until all changes are
merged.

commit 2d7a3748b2063c4137ee98ceca85361651ef8ee7
Merge: c7b9757b8ac3ac6baa478655a4d2f77dff8240a8 
9b0df441e1bd836c433e11582650fa0171791485
Author: Jelmer Vernooij 
Date:   Mon Mar 2 04:15:11 2009 +0100

Merge branch 'master' of git://git.samba.org/samba into convenience

commit c7b9757b8ac3ac6baa478655a4d2f77dff8240a8
Author: Jelmer Vernooij 
Date:   Mon Mar 2 04:12:57 2009 +0100

Import ISO-8859-1, 646 from Samba 3 iconv.

---

Summary of changes:
 lib/util/charset/iconv.c |   29 +
 source3/Makefile.in  |2 +-
 source3/lib/iconv.c  |4 ++--
 3 files changed, 32 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/iconv.c b/lib/util/charset/iconv.c
index 98284ce..9825e4b 100644
--- a/lib/util/charset/iconv.c
+++ b/lib/util/charset/iconv.c
@@ -50,6 +50,7 @@
 
 static size_t ascii_pull  (void *,const char **, size_t *, char **, size_t *);
 static size_t ascii_push  (void *,const char **, size_t *, char **, size_t *);
+static size_t latin1_push (void *,const char **, size_t *, char **, size_t *);
 static size_t utf8_pull   (void *,const char **, size_t *, char **, size_t *);
 static size_t utf8_push   (void *,const char **, size_t *, char **, size_t *);
 static size_t utf16_munged_pull(void *,const char **, size_t *, char **, 
size_t *);
@@ -73,6 +74,8 @@ static const struct charset_functions builtin_functions[] = {
{"UTF16_MUNGED",   utf16_munged_pull,  iconv_copy},
 
{"ASCII", ascii_pull, ascii_push},
+   {"646", ascii_pull, ascii_push},
+   {"ISO-8859-1", ascii_pull, latin1_push},
{"UCS2-HEX", ucs2hex_pull, ucs2hex_push}
 };
 
@@ -341,6 +344,32 @@ static size_t ascii_push(void *cd, const char **inbuf, 
size_t *inbytesleft,
return ir_count;
 }
 
+static size_t latin1_push(void *cd, const char **inbuf, size_t *inbytesleft,
+char **outbuf, size_t *outbytesleft)
+{
+   int ir_count=0;
+
+   while (*inbytesleft >= 2 && *outbytesleft >= 1) {
+   (*outbuf)[0] = (*inbuf)[0];
+   if ((*inbuf)[1]) ir_count++;
+   (*inbytesleft)  -= 2;
+   (*outbytesleft) -= 1;
+   (*inbuf)  += 2;
+   (*outbuf) += 1;
+   }
+
+   if (*inbytesleft == 1) {
+   errno = EINVAL;
+   return -1;
+   }
+
+   if (*inbytesleft > 1) {
+   errno = E2BIG;
+   return -1;
+   }
+   
+   return ir_count;
+}
 
 static size_t ucs2hex_pull(void *cd, const char **inbuf, size_t *inbytesleft,
 char **outbuf, size_t *outbytesleft)
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 28b5437..e9f4081 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -366,7 +366,7 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
  lib/substitute.o lib/dbwrap_util.o \
  lib/ms_fnmatch.o lib/select.o lib/errmap_unix.o \
  lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
- ../lib/util/charset/iconv.o lib/pam_errors.o intl/lang_tdb.o \
+ lib/iconv.o lib/pam_errors.o intl/lang_tdb.o \
  lib/conn_tdb.o lib/adt_tree.o lib/gencache.o \
  lib/module.o lib/events.o @LIBTEVENT_OBJ0@ \
  lib/ldap_escape.o @CHARSET_STATIC@ \
diff --git a/source3/lib/iconv.c b/source3/lib/iconv.c
index fa213a3..4450054 100644
--- a/source3/lib/iconv.c
+++ b/source3/lib/iconv.c
@@ -207,12 +207,12 @@ smb_iconv_t smb_iconv_open(const char *tocode, const char 
*fromcode)
from = charsets;
to = charsets;
 
-   ret = SMB_MALLOC_P(smb_iconv_t);
+   ret = SMB_MALLOC_P(struct smb_iconv_s);
if (!ret) {
errno = ENOMEM;
return (smb_iconv_t)-1;
}
-   memset(ret, 0, sizeof(smb_iconv_t));
+   memset(ret, 0, sizeof(struct smb_iconv_s));
 
ret->from_name = SMB_STRDUP(fromcode);
ret->to_name = SMB_STRDUP(tocode);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-112-g9b0df44

2009-03-01 Thread Tim Prouty
The branch, master has been updated
   via  9b0df441e1bd836c433e11582650fa0171791485 (commit)
   via  664268a2877dc49a84eb140e837e01f08979c471 (commit)
  from  9940c7690e2c1b225111d5d8e09cc735ebe296dd (commit)

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


- Log -
commit 9b0df441e1bd836c433e11582650fa0171791485
Author: Tim Prouty 
Date:   Sun Mar 1 13:58:46 2009 -0800

s3: Fix incompatible type warnings

commit 664268a2877dc49a84eb140e837e01f08979c471
Author: Tim Prouty 
Date:   Fri Feb 27 14:47:47 2009 -0800

s3 OneFS: Refactor config code and cleanup includes

---

Summary of changes:
 source3/Makefile.in   |4 +-
 source3/lib/util_reg_api.c|2 +-
 source3/libgpo/gpo_ini.c  |2 +-
 source3/modules/onefs.h   |  136 +
 source3/modules/onefs_acl.c   |3 +
 source3/modules/onefs_cbrl.c  |1 +
 source3/modules/onefs_config.c|  276 +
 source3/modules/onefs_config.h|  158 +++
 source3/modules/onefs_dir.c   |2 +
 source3/modules/onefs_notify.c|1 +
 source3/modules/onefs_open.c  |3 +
 source3/modules/onefs_streams.c   |3 +
 source3/modules/onefs_system.c|   54 +--
 source3/modules/vfs_onefs.c   |  201 +
 source3/rpc_server/srv_eventlog_lib.c |2 +-
 15 files changed, 458 insertions(+), 390 deletions(-)
 create mode 100644 source3/modules/onefs_config.c
 create mode 100644 source3/modules/onefs_config.h


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index abf6cfb..28b5437 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -672,8 +672,8 @@ VFS_ACL_XATTR_OBJ = modules/vfs_acl_xattr.o
 VFS_ACL_TDB_OBJ = modules/vfs_acl_tdb.o
 VFS_SMB_TRAFFIC_ANALYZER_OBJ = modules/vfs_smb_traffic_analyzer.o
 VFS_ONEFS_OBJ = modules/vfs_onefs.o modules/onefs_acl.o modules/onefs_system.o 
\
-   modules/onefs_open.o modules/onefs_streams.o 
modules/onefs_dir.c \
-   modules/onefs_cbrl.o modules/onefs_notify.o
+   modules/onefs_open.o modules/onefs_streams.o 
modules/onefs_dir.o \
+   modules/onefs_cbrl.o modules/onefs_notify.o 
modules/onefs_config.o
 VFS_ONEFS_SHADOW_COPY_OBJ = modules/vfs_onefs_shadow_copy.o 
modules/onefs_shadow_copy.o
 PERFCOUNT_ONEFS_OBJ = modules/perfcount_onefs.o
 PERFCOUNT_TEST_OBJ = modules/perfcount_test.o
diff --git a/source3/lib/util_reg_api.c b/source3/lib/util_reg_api.c
index 8f28e9c..9313193 100644
--- a/source3/lib/util_reg_api.c
+++ b/source3/lib/util_reg_api.c
@@ -92,7 +92,7 @@ WERROR registry_pull_value(TALLOC_CTX *mem_ctx,
}
 
if (!convert_string_talloc(value, CH_UTF16LE, CH_UNIX, tmp,
-  length+2, &value->v.sz.str,
+  length+2, (void **)&value->v.sz.str,
   &value->v.sz.len, False)) {
SAFE_FREE(tmp);
err = WERR_INVALID_PARAM;
diff --git a/source3/libgpo/gpo_ini.c b/source3/libgpo/gpo_ini.c
index aa8f7c7..edca855 100644
--- a/source3/libgpo/gpo_ini.c
+++ b/source3/libgpo/gpo_ini.c
@@ -83,7 +83,7 @@ static NTSTATUS convert_file_from_ucs2(TALLOC_CTX *mem_ctx,
}
 
if (!convert_string_talloc(mem_ctx, CH_UTF16LE, CH_UNIX, data_in, n,
-  &data_out, &converted_size, False))
+  (void **)&data_out, &converted_size, False))
{
status = NT_STATUS_INVALID_BUFFER_SIZE;
goto out;
diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h
index a0f4fe3..ebeece4 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -21,134 +21,6 @@
 #ifndef _ONEFS_H
 #define _ONEFS_H
 
-#include "includes.h"
-#include "oplock_onefs.h"
-#include 
-
-/* OneFS Module smb.conf parameters and defaults */
-
-/**
-* Specifies when ACLs presented to Windows should be canonicalized
-* into the ordering which Explorer expects.
-*/
-enum onefs_acl_wire_format
-{
-   ACL_FORMAT_RAW, /**< Never canonicalize */
-   ACL_FORMAT_WINDOWS_SD, /**< Only canonicalize synthetic ACLs */
-   ACL_FORMAT_ALWAYS /**< Always canonicalize */
-};
-
-#define PARM_ONEFS_TYPE "onefs"
-#define PARM_ACL_WIRE_FORMAT "acl wire format"
-#define PARM_ACL_WIRE_FORMAT_DEFAULT ACL_FORMAT_WINDOWS_SD
-#define PARM_ALLOW_EXECUTE_ALWAYS "allow execute always"
-#define PARM_ALLOW_EXECUTE_ALWAYS_DEFAULT false
-#define PARM_ATIME_NOW "atime now files"
-#define PARM_ATIME_NOW_DEFAULT  NULL
-#define PARM_ATIME_STATIC  "atime static files"
-#define PARM_ATIME_STATIC_DEFAULT NULL
-#define PARM_ATIME_SLOP

Build status as of Mon Mar 2 00:00:02 2009

2009-03-01 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-03-01 
00:00:14.0 +
+++ /home/build/master/cache/broken_results.txt 2009-03-02 00:00:40.0 
+
@@ -1,23 +1,23 @@
-Build status as of Sun Mar  1 00:00:02 2009
+Build status as of Mon Mar  2 00:00:02 2009
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   28 5  0 
+ccache   28 6  0 
 ctdb 0  0  0 
 distcc   0  0  0 
-ldb  29 28 0 
-libreplace   29 11 0 
+ldb  26 28 0 
+libreplace   28 11 0 
 lorikeet-heimdal 26 14 0 
-pidl 20 3  0 
+pidl 19 3  0 
 ppp  12 0  0 
 rsync28 8  0 
 samba-docs   0  0  0 
 samba-gtk5  5  0 
-samba_3_X_devel 28 25 0 
-samba_3_X_test 27 27 3 
-samba_4_0_test 29 28 1 
-smb-build28 6  0 
-talloc   27 28 0 
-tdb  27 8  0 
+samba_3_X_devel 27 26 0 
+samba_3_X_test 26 26 2 
+samba_4_0_test 28 27 0 
+smb-build27 6  0 
+talloc   28 28 0 
+tdb  26 8  0 
 


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-110-g9940c76

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  9940c7690e2c1b225111d5d8e09cc735ebe296dd (commit)
   via  9551ab8f7b0e69349dc0c1ffb70a6f67163b242c (commit)
   via  7ab8f373c84c328b197f923287163e83371e7ccb (commit)
   via  94069bd2747a8397308c0b0b384f7bb4edd8f68b (commit)
  from  8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e (commit)

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


- Log -
commit 9940c7690e2c1b225111d5d8e09cc735ebe296dd
Author: Jelmer Vernooij 
Date:   Sun Mar 1 22:31:10 2009 +0100

Use shared header file for character sets, remove old definitions from 
samba3 smb.h.

commit 9551ab8f7b0e69349dc0c1ffb70a6f67163b242c
Merge: 7ab8f373c84c328b197f923287163e83371e7ccb 
8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e
Author: Jelmer Vernooij 
Date:   Sun Mar 1 22:25:57 2009 +0100

Merge branch 'master' of git://git.samba.org/samba into convenience

commit 7ab8f373c84c328b197f923287163e83371e7ccb
Author: Jelmer Vernooij 
Date:   Sun Mar 1 22:24:34 2009 +0100

Use common header file for character set handling in Samba 3 and Samba 4.

commit 94069bd2747a8397308c0b0b384f7bb4edd8f68b
Author: Jelmer Vernooij 
Date:   Sun Mar 1 19:55:46 2009 +0100

s4: Use same function signature for convert_* as s3.

---

Summary of changes:
 lib/util/charset/charcnv.c |   42 +---
 lib/util/charset/charset.h |  125 ---
 lib/util/charset/iconv.c   |1 +
 lib/util/charset/tests/iconv.c |   11 +--
 lib/util/charset/util_unistr.c |   44 +
 source3/Makefile.in|4 +-
 source3/include/charset.h  |  128 
 source3/include/includes.h |2 +-
 source3/include/proto.h|3 +-
 source3/include/smb.h  |   18 
 source3/lib/charcnv.c  |2 +-
 source3/lib/iconv.c|4 +-
 source4/auth/ntlm/ntlm_check.c |2 +-
 source4/auth/ntlmssp/ntlmssp_parse.c   |   36 ---
 source4/dsdb/common/util.c |2 +-
 source4/dsdb/samdb/ldb_modules/password_hash.c |   17 ++--
 source4/dsdb/schema/schema_init.c  |7 +-
 source4/dsdb/schema/schema_syntax.c|   24 ++---
 source4/kdc/kpasswdd.c |   18 ++--
 source4/lib/registry/ldb.c |8 +-
 source4/lib/registry/tests/generic.c   |   12 +-
 source4/lib/registry/util.c|6 +-
 source4/lib/tdr/tdr.c  |   12 +--
 source4/libcli/auth/smbencrypt.c   |   32 +++---
 source4/libcli/raw/rawfileinfo.c   |8 +-
 source4/libcli/raw/rawrequest.c|   32 ---
 source4/libcli/smb2/request.c  |   18 ++--
 source4/libnet/libnet_samdump.c|4 +-
 source4/librpc/ndr/ndr_string.c|   56 --
 source4/rpc_server/samr/samr_password.c|   15 ++--
 source4/smb_server/smb/request.c   |   12 +-
 source4/torture/basic/charset.c|5 +-
 source4/torture/basic/utable.c |   13 ++-
 source4/torture/rpc/samba3rpc.c|2 +-
 source4/torture/rpc/samlogon.c |   10 +-
 source4/torture/rpc/spoolss_win.c  |2 +-
 source4/torture/rpc/wkssvc.c   |2 +-
 37 files changed, 345 insertions(+), 394 deletions(-)
 delete mode 100644 source3/include/charset.h


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/charcnv.c b/lib/util/charset/charcnv.c
index 18be2bc..258730e 100644
--- a/lib/util/charset/charcnv.c
+++ b/lib/util/charset/charcnv.c
@@ -186,7 +186,7 @@ convert:
destlen = 2 + (destlen*3);
ob = talloc_realloc(ctx, outbuf, char, destlen);
if (!ob) {
-   DEBUG(0, ("convert_string_talloc: realloc failed!\n"));
+   DEBUG(0, ("iconv_talloc: realloc failed!\n"));
talloc_free(outbuf);
return (size_t)-1;
} else {
@@ -237,10 +237,11 @@ convert:
  * @param destlen maximal length allowed for string
  * @returns the number of bytes occupied in the destination
  **/
-_PUBLIC_ ssize_t convert_string_convenience(struct smb_iconv_convenience *ic,
+_PUBLIC_ bool convert_string_convenience(struct smb_iconv_convenience *ic,
charset_t from, charset_t to,
void const *src, size_t srclen, 
-   void *dest, size_t destlen, bool 
allow_badcharcnv)
+   void *dest, size_t destlen, size_t 
*converted_size,
+   bool allow_badcharcnv)
 {
size_t i_len, o

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-106-g8568b4f

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e (commit)
  from  da6721e3231fb93b934440c2d92abab834289c82 (commit)

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


- Log -
commit 8568b4fa9ff8f6f1a24547ec2ed5e2942b213d9e
Author: Jelmer Vernooij 
Date:   Sun Mar 1 20:06:55 2009 +0100

Add header files for secace and secacl.

---

Summary of changes:
 libcli/security/secace.h   |   39 
 libcli/security/secacl.h   |   33 ++
 source3/include/includes.h |2 +
 source3/include/proto.h|   23 +
 source4/libcli/security/security.h |3 +-
 5 files changed, 77 insertions(+), 23 deletions(-)
 create mode 100644 libcli/security/secace.h
 create mode 100644 libcli/security/secacl.h


Changeset truncated at 500 lines:

diff --git a/libcli/security/secace.h b/libcli/security/secace.h
new file mode 100644
index 000..8b6625d
--- /dev/null
+++ b/libcli/security/secace.h
@@ -0,0 +1,39 @@
+/*
+   Unix SMB/CIFS implementation.
+   Samba utility functions
+
+   Copyright (C) 2009 Jelmer Vernooij 
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see .
+*/
+
+#ifndef _ACE_H_
+#define _ACE_H_
+
+#include "librpc/gen_ndr/security.h"
+
+bool sec_ace_object(uint8_t type);
+void sec_ace_copy(struct security_ace *ace_dest, struct security_ace *ace_src);
+void init_sec_ace(struct security_ace *t, const struct dom_sid *sid, enum 
security_ace_type type,
+ uint32_t mask, uint8_t flag);
+NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, struct security_ace **pp_new, struct 
security_ace *old, unsigned *num, struct dom_sid *sid, uint32_t mask);
+NTSTATUS sec_ace_mod_sid(struct security_ace *ace, size_t num, struct dom_sid 
*sid, uint32_t mask);
+NTSTATUS sec_ace_del_sid(TALLOC_CTX *ctx, struct security_ace **pp_new, struct 
security_ace *old, uint32_t *num, struct dom_sid *sid);
+bool sec_ace_equal(struct security_ace *s1, struct security_ace *s2);
+int nt_ace_inherit_comp( struct security_ace *a1, struct security_ace *a2);
+int nt_ace_canon_comp( struct security_ace *a1, struct security_ace *a2);
+void dacl_sort_into_canonical_order(struct security_ace *srclist, unsigned int 
num_aces);
+
+#endif /*_ACE_H_*/
+
diff --git a/libcli/security/secacl.h b/libcli/security/secacl.h
new file mode 100644
index 000..9f1e8fa
--- /dev/null
+++ b/libcli/security/secacl.h
@@ -0,0 +1,33 @@
+/*
+   Unix SMB/CIFS implementation.
+   Samba utility functions
+
+   Copyright (C) 2009 Jelmer Vernooij 
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see .
+*/
+
+#ifndef _SECACL_H_
+#define _SECACL_H_
+
+#include "librpc/gen_ndr/security.h"
+
+struct security_acl *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision 
revision,
+ int num_aces, struct security_ace *ace_list);
+struct security_acl *dup_sec_acl(TALLOC_CTX *ctx, struct security_acl *src);
+bool sec_acl_equal(struct security_acl *s1, struct security_acl *s2);
+
+
+#endif /*_SECACL_H_*/
+
diff --git a/source3/include/includes.h b/source3/include/includes.h
index 523a11e..63c77ec 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -703,6 +703,8 @@ enum flush_reason_enum {
 #ifndef NO_PROTO_H
 #include "proto.h"
 #endif
+#include "libcli/security/secace.h"
+#include "libcli/security/secacl.h"
 
 #if defined(HAVE_POSIX_ACLS)
 #include "modules/vfs_posixacl.h"
diff --git a/source3/include/proto.h b/source3/include/proto.h
index eeb6f19..60f8ace 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -650,28 +650,6 @@ ssize_t sys_recvfile(int

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-105-gda6721e

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  da6721e3231fb93b934440c2d92abab834289c82 (commit)
   via  e9bba3e288a204732775427dd4098d7dea2cafd9 (commit)
   via  d3c2de093a35d0168fead27787a3da44a39fbea9 (commit)
  from  9bd0cf8d60b9bbaafa20f33bb1baf222620fb0b0 (commit)

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


- Log -
commit da6721e3231fb93b934440c2d92abab834289c82
Author: Jelmer Vernooij 
Date:   Sun Mar 1 18:15:36 2009 +0100

Move secacl to top-level.

commit e9bba3e288a204732775427dd4098d7dea2cafd9
Author: Jelmer Vernooij 
Date:   Sun Mar 1 18:15:15 2009 +0100

dom_sid.h: Include dependency security.h that provides the dom_sid struct.

commit d3c2de093a35d0168fead27787a3da44a39fbea9
Author: Jelmer Vernooij 
Date:   Sun Mar 1 18:05:22 2009 +0100

Also re-add removed codepoint_t; I'm clearly not having my day today.

---

Summary of changes:
 libcli/security/dom_sid.h |2 +
 {source3/lib => libcli/security}/secacl.c |   34 
 source3/Makefile.in   |2 +-
 source3/include/rpc_secdes.h  |1 -
 source3/include/smb.h |   16 +
 source4/libcli/security/config.mk |3 +-
 6 files changed, 40 insertions(+), 18 deletions(-)
 rename {source3/lib => libcli/security}/secacl.c (79%)


Changeset truncated at 500 lines:

diff --git a/libcli/security/dom_sid.h b/libcli/security/dom_sid.h
index 9d96392..e892535 100644
--- a/libcli/security/dom_sid.h
+++ b/libcli/security/dom_sid.h
@@ -23,6 +23,8 @@
 #ifndef _DOM_SID_H_
 #define _DOM_SID_H_
 
+#include "librpc/gen_ndr/security.h"
+
 int dom_sid_compare(const struct dom_sid *sid1, const struct dom_sid *sid2);
 bool dom_sid_equal(const struct dom_sid *sid1, const struct dom_sid *sid2);
 bool dom_sid_parse(const char *sidstr, struct dom_sid *ret);
diff --git a/source3/lib/secacl.c b/libcli/security/secacl.c
similarity index 79%
rename from source3/lib/secacl.c
rename to libcli/security/secacl.c
index 5e82242..4564077 100644
--- a/source3/lib/secacl.c
+++ b/libcli/security/secacl.c
@@ -21,18 +21,22 @@
  */
 
 #include "includes.h"
+#include "libcli/security/security.h"
+
+#define  SEC_ACL_HEADER_SIZE (2 * sizeof(uint16_t) + sizeof(uint32_t))
 
 /***
  Create a SEC_ACL structure.  
 /
 
-SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum security_acl_revision revision,
- int num_aces, SEC_ACE *ace_list)
+struct security_acl *make_sec_acl(TALLOC_CTX *ctx, 
+ enum 
security_acl_revision revision,
+ int num_aces, 
struct security_ace *ace_list)
 {
-   SEC_ACL *dst;
+   struct security_acl *dst;
int i;
 
-   if((dst = TALLOC_ZERO_P(ctx,SEC_ACL)) == NULL)
+   if((dst = talloc_zero(ctx, struct security_acl)) == NULL)
return NULL;
 
dst->revision = revision;
@@ -46,7 +50,7 @@ SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum 
security_acl_revision revision,
   positive number. */
 
if ((num_aces) && 
-((dst->aces = TALLOC_ARRAY(ctx, SEC_ACE, num_aces)) 
+((dst->aces = talloc_array(ctx, struct security_ace, num_aces)) 
  == NULL)) {
return NULL;
}
@@ -63,7 +67,7 @@ SEC_ACL *make_sec_acl(TALLOC_CTX *ctx, enum 
security_acl_revision revision,
  Duplicate a SEC_ACL structure.  
 /
 
-SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src)
+struct security_acl *dup_sec_acl(TALLOC_CTX *ctx, struct security_acl *src)
 {
if(src == NULL)
return NULL;
@@ -75,44 +79,44 @@ SEC_ACL *dup_sec_acl(TALLOC_CTX *ctx, SEC_ACL *src)
  Compares two SEC_ACL structures
 /
 
-bool sec_acl_equal(SEC_ACL *s1, SEC_ACL *s2)
+bool sec_acl_equal(struct security_acl *s1, struct security_acl *s2)
 {
unsigned int i, j;
 
/* Trivial cases */
 
-   if (!s1 && !s2) return True;
-   if (!s1 || !s2) return False;
+   if (!s1 && !s2) return true;
+   if (!s1 || !s2) return false;
 
/* Check top level stuff */
 
if (s1->revision != s2->revision) {
DEBUG(10, ("sec_acl_equal(): revision differs (%d != %d)\n",
   s1->revision, s2->revision));
-   return False;
+   return false;
}
 
if (s1->num_aces != s2->num_aces) {
DEBUG(10, ("sec_acl_equal(): num_aces differs (%d != %d)\n",
   s1->revision, s2->revision));
-   retur

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-102-g9bd0cf8

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  9bd0cf8d60b9bbaafa20f33bb1baf222620fb0b0 (commit)
  from  99b288156f021db7bb771f3a5bf78def61d699f2 (commit)

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


- Log -
commit 9bd0cf8d60b9bbaafa20f33bb1baf222620fb0b0
Author: Jelmer Vernooij 
Date:   Sun Mar 1 18:02:24 2009 +0100

Keep using Samba3's charset.h for now.

---

Summary of changes:
 source3/include/includes.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/includes.h b/source3/include/includes.h
index 7f8c408..523a11e 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -594,7 +594,7 @@ struct smb_iconv_convenience *lp_iconv_convenience(void 
*lp_ctx);
 #include "trans2.h"
 #include "../libcli/util/error.h"
 #include "ntioctl.h"
-#include "../lib/util/charset/charset.h"
+#include "charset.h"
 #include "dynconfig.h"
 #include "util_getent.h"
 #include "debugparse.h"


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-101-g99b2881

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  99b288156f021db7bb771f3a5bf78def61d699f2 (commit)
  from  bbe2d30f66ebd8537203870b1225179f03d42744 (commit)

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


- Log -
commit 99b288156f021db7bb771f3a5bf78def61d699f2
Author: Jelmer Vernooij 
Date:   Sun Mar 1 17:59:30 2009 +0100

Move secace.c to top-level.

---

Summary of changes:
 {source3/lib => libcli/security}/secace.c |   90 
 source3/Makefile.in   |3 +-
 source3/include/rpc_secdes.h  |1 -
 source3/lib/util_nttoken.c|   16 +
 source4/libcli/security/config.mk |3 +-
 5 files changed, 59 insertions(+), 54 deletions(-)
 rename {source3/lib => libcli/security}/secace.c (76%)


Changeset truncated at 500 lines:

diff --git a/source3/lib/secace.c b/libcli/security/secace.c
similarity index 76%
rename from source3/lib/secace.c
rename to libcli/security/secace.c
index 878fac2..4e8eddc 100644
--- a/source3/lib/secace.c
+++ b/libcli/security/secace.c
@@ -1,6 +1,6 @@
 /* 
  *  Unix SMB/Netbios implementation.
- *  SEC_ACE handling functions
+ *  struct security_ace handling functions
  *  Copyright (C) Andrew Tridgell  1992-1998,
  *  Copyright (C) Jeremy R. Allison1995-2003.
  *  Copyright (C) Luke Kenneth Casson Leighton 1996-1998,
@@ -21,56 +21,58 @@
  */
 
 #include "includes.h"
+#include "librpc/gen_ndr/ndr_security.h"
+#include "libcli/security/security.h"
 
-/***
- Check if ACE has OBJECT type.
-/
+#define  SEC_ACE_HEADER_SIZE (2 * sizeof(uint8_t) + sizeof(uint16_t) + 
sizeof(uint32_t))
 
-bool sec_ace_object(uint8 type)
+/**
+ * Check if ACE has OBJECT type.
+ */
+bool sec_ace_object(uint8_t type)
 {
if (type == SEC_ACE_TYPE_ACCESS_ALLOWED_OBJECT ||
 type == SEC_ACE_TYPE_ACCESS_DENIED_OBJECT ||
 type == SEC_ACE_TYPE_SYSTEM_AUDIT_OBJECT ||
 type == SEC_ACE_TYPE_SYSTEM_ALARM_OBJECT) {
-   return True;
+   return true;
}
-   return False;
+   return false;
 }
 
-/***
- copy a SEC_ACE structure.
-/
-void sec_ace_copy(SEC_ACE *ace_dest, SEC_ACE *ace_src)
+/**
+ * copy a struct security_ace structure.
+ */
+void sec_ace_copy(struct security_ace *ace_dest, struct security_ace *ace_src)
 {
ace_dest->type  = ace_src->type;
ace_dest->flags = ace_src->flags;
ace_dest->size  = ace_src->size;
ace_dest->access_mask = ace_src->access_mask;
ace_dest->object = ace_src->object;
-   sid_copy(&ace_dest->trustee, &ace_src->trustee);
+   ace_dest->trustee = ace_src->trustee;
 }
 
 /***
- Sets up a SEC_ACE structure.
+ Sets up a struct security_ace structure.
 /
 
-void init_sec_ace(SEC_ACE *t, const DOM_SID *sid, enum security_ace_type type,
- uint32_t mask, uint8 flag)
+void init_sec_ace(struct security_ace *t, const struct dom_sid *sid, enum 
security_ace_type type,
+ uint32_t mask, uint8_t flag)
 {
t->type = type;
t->flags = flag;
t->size = ndr_size_dom_sid(sid, NULL, 0) + 8;
t->access_mask = mask;
 
-   ZERO_STRUCTP(&t->trustee);
-   sid_copy(&t->trustee, sid);
+   t->trustee = *sid;
 }
 
 /***
  adds new SID with its permissions to ACE list
 /
 
-NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, SEC_ACE *old, 
unsigned *num, DOM_SID *sid, uint32 mask)
+NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, struct security_ace **pp_new, struct 
security_ace *old, unsigned *num, struct dom_sid *sid, uint32_t mask)
 {
unsigned int i = 0;

@@ -78,7 +80,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, 
SEC_ACE *old, unsign
 
*num += 1;

-   if((pp_new[0] = TALLOC_ZERO_ARRAY(ctx, SEC_ACE, *num )) == 0)
+   if((pp_new[0] = talloc_zero_array(ctx, struct security_ace, *num )) == 
0)
return NT_STATUS_NO_MEMORY;
 
for (i = 0; i < *num - 1; i ++)
@@ -88,7 +90,7 @@ NTSTATUS sec_ace_add_sid(TALLOC_CTX *ctx, SEC_ACE **pp_new, 
SEC_ACE *old, unsign
(*pp_new)[i].flags = 0;
(*pp_new)[i].size  = SEC_ACE_HEADER_SIZE + ndr_size_dom_sid(sid, NULL, 
0);
(*pp_new)[i].access_mask = mask;
-   sid_copy(&(*pp_new)[i].trustee, sid);
+   (*pp_new)[i].truste

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-100-gbbe2d30

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  bbe2d30f66ebd8537203870b1225179f03d42744 (commit)
   via  4903d20c215a01f70c242cb8cf4d455d0e352b7f (commit)
   via  9f6e2d64852026d118c717d80236177fd74331eb (commit)
   via  9ffb6d2d9e78ed192b8215194b6328d03d1ddad3 (commit)
  from  08b180e40e5179cc02d4aa1867d5063f47b85790 (commit)

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


- Log -
commit bbe2d30f66ebd8537203870b1225179f03d42744
Merge: 4903d20c215a01f70c242cb8cf4d455d0e352b7f 
08b180e40e5179cc02d4aa1867d5063f47b85790
Author: Jelmer Vernooij 
Date:   Sun Mar 1 17:29:04 2009 +0100

Merge branch 'master' of git://git.samba.org/samba into convenience

commit 4903d20c215a01f70c242cb8cf4d455d0e352b7f
Merge: 9f6e2d64852026d118c717d80236177fd74331eb 
09ac816b36e45fd537af2f7fe7c57a11f5c744f5
Author: Jelmer Vernooij 
Date:   Sun Mar 1 16:41:57 2009 +0100

Merge branch 'master' of git://git.samba.org/samba into convenience

commit 9f6e2d64852026d118c717d80236177fd74331eb
Author: Jelmer Vernooij 
Date:   Sun Mar 1 12:59:58 2009 +0100

Sync smb_iconv_t type, convert_string return type with Samba 3 equivalents.

commit 9ffb6d2d9e78ed192b8215194b6328d03d1ddad3
Author: Jelmer Vernooij 
Date:   Sun Mar 1 06:33:40 2009 +0100

Add allow_badcharcnv argument to all conversion function, for
consistency with Samba 3.

---

Summary of changes:
 lib/util/charset/charcnv.c |   11 +++-
 lib/util/charset/charset.h |   11 
 lib/util/charset/tests/iconv.c |6 ++--
 lib/util/charset/util_unistr.c |   31 ---
 source3/include/includes.h |2 +-
 source3/include/proto.h|9 ---
 source3/include/smb.h  |   16 
 source4/auth/ntlm/ntlm_check.c |2 +-
 source4/dsdb/common/util.c |2 +-
 source4/dsdb/samdb/ldb_modules/password_hash.c |6 ++--
 source4/dsdb/schema/schema_init.c  |2 +-
 source4/dsdb/schema/schema_syntax.c|8 +++---
 source4/kdc/kpasswdd.c |4 +-
 source4/lib/registry/ldb.c |4 +-
 source4/lib/registry/tests/generic.c   |6 ++--
 source4/lib/registry/util.c|4 +-
 source4/lib/tdr/tdr.c  |4 +-
 source4/libcli/raw/rawfileinfo.c   |2 +-
 source4/libcli/raw/rawrequest.c|8 +++---
 source4/libcli/smb2/request.c  |4 +-
 source4/libnet/libnet_samdump.c|2 +-
 source4/librpc/ndr/ndr_string.c|   20 +++---
 source4/rpc_server/samr/samr_password.c|6 ++--
 source4/smb_server/smb/request.c   |4 +-
 source4/torture/basic/charset.c|2 +-
 source4/torture/basic/utable.c |4 +-
 source4/torture/rpc/samlogon.c |2 +-
 source4/torture/rpc/spoolss_win.c  |2 +-
 28 files changed, 84 insertions(+), 100 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/charcnv.c b/lib/util/charset/charcnv.c
index 1f3b1ac..18be2bc 100644
--- a/lib/util/charset/charcnv.c
+++ b/lib/util/charset/charcnv.c
@@ -240,7 +240,7 @@ convert:
 _PUBLIC_ ssize_t convert_string_convenience(struct smb_iconv_convenience *ic,
charset_t from, charset_t to,
void const *src, size_t srclen, 
-   void *dest, size_t destlen)
+   void *dest, size_t destlen, bool 
allow_badcharcnv)
 {
size_t i_len, o_len;
size_t retval;
@@ -248,6 +248,10 @@ _PUBLIC_ ssize_t convert_string_convenience(struct 
smb_iconv_convenience *ic,
char* outbuf = (char*)dest;
smb_iconv_t descriptor;
 
+   if (allow_badcharcnv) {
+   return -1;
+   }
+
if (srclen == (size_t)-1)
srclen = strlen(inbuf)+1;
 
@@ -305,10 +309,13 @@ _PUBLIC_ ssize_t 
convert_string_talloc_convenience(TALLOC_CTX *ctx,
   struct smb_iconv_convenience *ic, 
   charset_t from, charset_t to, 
   void const *src, size_t srclen, 
-  void **dest)
+  void **dest, bool allow_badcharcnv)
 {
smb_iconv_t descriptor;
 
+   if (allow_badcharcnv)
+   return (size_t)-1;
+
*dest = NULL;
 
if (src == NULL || srclen == (size_t)-1 || srclen == 0)
diff --git a/lib/util/charset/charset.h b/lib/util/charset/charset.h
index f027beb..3acdde3 100644
--- a/lib/util/charset/charset.h
+++ b/lib

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-96-g08b180e

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  08b180e40e5179cc02d4aa1867d5063f47b85790 (commit)
   via  74293f117b08ffefdad78828ad9cfa8f8f6049e0 (commit)
   via  e2469e37488fe46257f1f4f4f8b0ebe11c08da47 (commit)
  from  09ac816b36e45fd537af2f7fe7c57a11f5c744f5 (commit)

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


- Log -
commit 08b180e40e5179cc02d4aa1867d5063f47b85790
Merge: 74293f117b08ffefdad78828ad9cfa8f8f6049e0 
09ac816b36e45fd537af2f7fe7c57a11f5c744f5
Author: Jelmer Vernooij 
Date:   Sun Mar 1 17:13:10 2009 +0100

Merge branch 'master' of ssh://git.samba.org/data/git/samba into talloc-next

commit 74293f117b08ffefdad78828ad9cfa8f8f6049e0
Author: Jelmer Vernooij 
Date:   Sun Mar 1 17:09:45 2009 +0100

Rerun pidl.

commit e2469e37488fe46257f1f4f4f8b0ebe11c08da47
Author: Jelmer Vernooij 
Date:   Sun Mar 1 17:09:07 2009 +0100

Don't generate array iterators when the length of the array is always 0.
(bug #6140)

---

Summary of changes:
 librpc/gen_ndr/ndr_drsblobs.c|6 --
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |   10 --
 2 files changed, 8 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_drsblobs.c b/librpc/gen_ndr/ndr_drsblobs.c
index 72e182d..ee7c993 100644
--- a/librpc/gen_ndr/ndr_drsblobs.c
+++ b/librpc/gen_ndr/ndr_drsblobs.c
@@ -1870,9 +1870,6 @@ static enum ndr_err_code 
ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *n
for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) 
{
NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, 
NDR_SCALARS, &r->keys[cntr_keys_0]));
}
-   for (cntr_service_keys_0 = 0; cntr_service_keys_0 < 0; 
cntr_service_keys_0++) {
-   NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, 
NDR_SCALARS, &r->service_keys[cntr_service_keys_0]));
-   }
for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; 
cntr_old_keys_0++) {
NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, 
NDR_SCALARS, &r->old_keys[cntr_old_keys_0]));
}
@@ -1885,9 +1882,6 @@ static enum ndr_err_code 
ndr_push_package_PrimaryKerberosCtr4(struct ndr_push *n
for (cntr_keys_0 = 0; cntr_keys_0 < r->num_keys; cntr_keys_0++) 
{
NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, 
NDR_BUFFERS, &r->keys[cntr_keys_0]));
}
-   for (cntr_service_keys_0 = 0; cntr_service_keys_0 < 0; 
cntr_service_keys_0++) {
-   NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, 
NDR_BUFFERS, &r->service_keys[cntr_service_keys_0]));
-   }
for (cntr_old_keys_0 = 0; cntr_old_keys_0 < r->num_old_keys; 
cntr_old_keys_0++) {
NDR_CHECK(ndr_push_package_PrimaryKerberosKey4(ndr, 
NDR_BUFFERS, &r->old_keys[cntr_old_keys_0]));
}
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 
b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 0e4a7e2..34aebc7 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -586,9 +586,15 @@ sub ParseElementPushLevel
my $length = ParseExpr($l->{LENGTH_IS}, $env, $e->{ORIGINAL});
my $counter = "cntr_$e->{NAME}_$l->{LEVEL_INDEX}";
 
+   my $array_pointless = ($length eq "0");
+
+   if ($array_pointless) {
+   warning($e->{ORIGINAL}, "pointless array `$e->{NAME}' 
will always have size 0");
+   }
+
$var_name = get_array_element($var_name, $counter);
 
-   if (($primitives and not $l->{IS_DEFERRED}) or ($deferred and 
$l->{IS_DEFERRED})) {
+   if ((($primitives and not $l->{IS_DEFERRED}) or ($deferred and 
$l->{IS_DEFERRED})) and not $array_pointless) {
$self->pidl("for ($counter = 0; $counter < $length; 
$counter++) {");
$self->indent;
$self->ParseElementPushLevel($e, GetNextLevel($e, $l), 
$ndr, $var_name, $env, 1, 0);
@@ -596,7 +602,7 @@ sub ParseElementPushLevel
$self->pidl("}");
}
 
-   if ($deferred and ContainsDeferred($e, $l)) {
+   if ($deferred and ContainsDeferred($e, $l) and not 
$array_pointless) {
$self->pidl("for ($counter = 0; $counter < $length; 
$counter++) {");
$self->indent;
$self->ParseElementPushLevel($e, GetNextLevel($e, $l), 
$ndr, $var_name, $env, 0, 1);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-93-g09ac816

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  09ac816b36e45fd537af2f7fe7c57a11f5c744f5 (commit)
   via  235244f4cc707130dd130afce88bde49606bd501 (commit)
  from  54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 (commit)

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


- Log -
commit 09ac816b36e45fd537af2f7fe7c57a11f5c744f5
Merge: 235244f4cc707130dd130afce88bde49606bd501 
54bc27e9374742d37b1ed9012d1cfe8f5ace6d40
Author: Jelmer Vernooij 
Date:   Sun Mar 1 16:39:35 2009 +0100

Merge branch 'master' of git://git.samba.org/samba into teventfix

Conflicts:
lib/tevent/pytevent.c

commit 235244f4cc707130dd130afce88bde49606bd501
Author: Jelmer Vernooij 
Date:   Sun Mar 1 16:38:07 2009 +0100

Avoid using tevent_util.h, which won't be available if we use the system
tevent.

---

Summary of changes:
 lib/tevent/pytevent.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c
index 3b45ba1..fe7e7e3 100644
--- a/lib/tevent/pytevent.c
+++ b/lib/tevent/pytevent.c
@@ -29,7 +29,6 @@
 
 #include 
 #include 
-#include "tevent_util.h"
 
 typedef struct {
PyObject_HEAD
@@ -54,7 +53,8 @@ static PyObject *py_backend_list(PyObject *self)
 PyObject *ret;
 int i, len;
 
-len = ev_str_list_length(backends);
+for (len = 0; backends[len]; len++);
+
 ret = PyList_New(len);
 for (i = 0; i < len; i++)
 PyList_SetItem(ret, i, PyString_FromString(backends[i]));


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-91-g54bc27e

2009-03-01 Thread Jelmer Vernooij
The branch, master has been updated
   via  54bc27e9374742d37b1ed9012d1cfe8f5ace6d40 (commit)
   via  55903e6f9120f1ec58a8554813229975c3028a09 (commit)
   via  d776ac03c3ce8a9090b847f20d2cdd16d745441f (commit)
  from  4a35c974e97551b1ccbfa41d4c08f0598e3c26aa (commit)

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


- Log -
commit 54bc27e9374742d37b1ed9012d1cfe8f5ace6d40
Merge: 55903e6f9120f1ec58a8554813229975c3028a09 
4a35c974e97551b1ccbfa41d4c08f0598e3c26aa
Author: Jelmer Vernooij 
Date:   Sun Mar 1 16:23:53 2009 +0100

Merge branch 'master' of ssh://git.samba.org/data/git/samba into talloc-next

commit 55903e6f9120f1ec58a8554813229975c3028a09
Author: Jelmer Vernooij 
Date:   Sun Mar 1 16:19:38 2009 +0100

Move next_token_talloc to util.c, as util_str.c is only compiled inside 
samba 4.

commit d776ac03c3ce8a9090b847f20d2cdd16d745441f
Author: Jelmer Vernooij 
Date:   Sun Mar 1 16:16:16 2009 +0100

Move next_token_talloc() to top-level.

---

Summary of changes:
 lib/util/util.c|  100 ++
 lib/util/util.h|   15 ++
 source3/lib/util_str.c |  112 
 3 files changed, 115 insertions(+), 112 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/util.c b/lib/util/util.c
index 988d8f9..1f31f55 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -836,4 +836,104 @@ _PUBLIC_ size_t utf16_len_n(const void *src, size_t n)
return len;
 }
 
+/**
+ * @file
+ * @brief String utilities.
+ **/
+
+static bool next_token_internal_talloc(TALLOC_CTX *ctx,
+   const char **ptr,
+char **pp_buff,
+const char *sep,
+bool ltrim)
+{
+   char *s;
+   char *saved_s;
+   char *pbuf;
+   bool quoted;
+   size_t len=1;
+
+   *pp_buff = NULL;
+   if (!ptr) {
+   return(false);
+   }
+
+   s = (char *)*ptr;
+
+   /* default to simple separators */
+   if (!sep) {
+   sep = " \t\n\r";
+   }
+
+   /* find the first non sep char, if left-trimming is requested */
+   if (ltrim) {
+   while (*s && strchr_m(sep,*s)) {
+   s++;
+   }
+   }
+
+   /* nothing left? */
+   if (!*s) {
+   return false;
+   }
+
+   /* When restarting we need to go from here. */
+   saved_s = s;
+
+   /* Work out the length needed. */
+   for (quoted = false; *s &&
+   (quoted || !strchr_m(sep,*s)); s++) {
+   if (*s == '\"') {
+   quoted = !quoted;
+   } else {
+   len++;
+   }
+   }
+
+   /* We started with len = 1 so we have space for the nul. */
+   *pp_buff = talloc_array(ctx, char, len);
+   if (!*pp_buff) {
+   return false;
+   }
+
+   /* copy over the token */
+   pbuf = *pp_buff;
+   s = saved_s;
+   for (quoted = false; *s &&
+   (quoted || !strchr_m(sep,*s)); s++) {
+   if ( *s == '\"' ) {
+   quoted = !quoted;
+   } else {
+   *pbuf++ = *s;
+   }
+   }
+
+   *ptr = (*s) ? s+1 : s;
+   *pbuf = 0;
+
+   return true;
+}
+
+bool next_token_talloc(TALLOC_CTX *ctx,
+   const char **ptr,
+   char **pp_buff,
+   const char *sep)
+{
+   return next_token_internal_talloc(ctx, ptr, pp_buff, sep, true);
+}
+
+/*
+ * Get the next token from a string, return false if none found.  Handles
+ * double-quotes.  This version does not trim leading separator characters
+ * before looking for a token.
+ */
+
+bool next_token_no_ltrim_talloc(TALLOC_CTX *ctx,
+   const char **ptr,
+   char **pp_buff,
+   const char *sep)
+{
+   return next_token_internal_talloc(ctx, ptr, pp_buff, sep, false);
+}
+
 
diff --git a/lib/util/util.h b/lib/util/util.h
index 27f94cd..1f6e3b1 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -204,6 +204,21 @@ _PUBLIC_ void display_set_stderr(void);
 
 /* The following definitions come from lib/util/util_str.c  */
 
+bool next_token_talloc(TALLOC_CTX *ctx,
+   const char **ptr,
+   char **pp_buff,
+   const char *sep);
+
+/**
+ * Get the next token from a string, return false if none found.  Handles
+ * double-quotes.  This version does not trim leading separator characters
+ * before looking for a token.
+ */
+bool next_token_no_ltrim_talloc(TALLOC_CTX *ctx,
+   const char **ptr,
+   char **p

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-88-g4a35c97

2009-03-01 Thread Volker Lendecke
The branch, master has been updated
   via  4a35c974e97551b1ccbfa41d4c08f0598e3c26aa (commit)
  from  79fc0ddaf44af1e31d7e6f2c6f576fd3c05e087d (commit)

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


- Log -
commit 4a35c974e97551b1ccbfa41d4c08f0598e3c26aa
Author: Volker Lendecke 
Date:   Sun Mar 1 11:39:44 2009 +0100

Only copy sharename up from rap_to_pjobid

Why?? :-)

Another one of the little micro-optimizations that I just came across: If 
you
allocate a variable in a sub-block like the "fstring sharename" in
write_file(), gcc even with -O3 will allocate this variable unconditionally 
on
the stack at the beginning of the routine. So with eliminating this fstring 
we
cut 256 bytes of stack in a very hot code path writing to a file. It might 
make
us a bit more cache-friendly.

This would probably not be worth a second look if it involved larger code
changes, but this one was just too simple to let it pass :-)

---

Summary of changes:
 source3/printing/printfsp.c |3 +--
 source3/printing/printing.c |4 +++-
 source3/smbd/fileio.c   |3 +--
 3 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/printfsp.c b/source3/printing/printfsp.c
index b485711..243b8ea 100644
--- a/source3/printing/printfsp.c
+++ b/source3/printing/printfsp.c
@@ -88,7 +88,6 @@ NTSTATUS print_fsp_open(struct smb_request *req, 
connection_struct *conn,
 void print_fsp_end(files_struct *fsp, enum file_close_type close_type)
 {
uint32 jobid;
-   fstring sharename;
 
if (fsp->fh->private_options & FILE_DELETE_ON_CLOSE) {
/*
@@ -102,7 +101,7 @@ void print_fsp_end(files_struct *fsp, enum file_close_type 
close_type)
string_free(&fsp->fsp_name);
}
 
-   if (!rap_to_pjobid(fsp->rap_print_jobid, sharename, &jobid)) {
+   if (!rap_to_pjobid(fsp->rap_print_jobid, NULL, &jobid)) {
DEBUG(3,("print_fsp_end: Unable to convert RAP jobid %u to 
print jobid.\n",
(unsigned int)fsp->rap_print_jobid ));
return;
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 49bd5ac..fc3667e 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -117,7 +117,9 @@ bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, 
uint32 *pjobid)
if ( data.dptr && data.dsize == sizeof(struct rap_jobid_key) )
{
struct rap_jobid_key *jinfo = (struct rap_jobid_key*)data.dptr;
-   fstrcpy( sharename, jinfo->sharename );
+   if (sharename != NULL) {
+   fstrcpy( sharename, jinfo->sharename );
+   }
*pjobid = jinfo->jobid;
DEBUG(10,("rap_to_pjobid: jobid %u maps to RAP jobid %u\n",
(unsigned int)*pjobid, (unsigned int)rap_jobid));
diff --git a/source3/smbd/fileio.c b/source3/smbd/fileio.c
index a9a97a2..adf664b 100644
--- a/source3/smbd/fileio.c
+++ b/source3/smbd/fileio.c
@@ -256,10 +256,9 @@ ssize_t write_file(struct smb_request *req,
int write_path = -1;
 
if (fsp->print_file) {
-   fstring sharename;
uint32 jobid;
 
-   if (!rap_to_pjobid(fsp->rap_print_jobid, sharename, &jobid)) {
+   if (!rap_to_pjobid(fsp->rap_print_jobid, NULL, &jobid)) {
DEBUG(3,("write_file: Unable to map RAP jobid %u to 
jobid.\n",
(unsigned 
int)fsp->rap_print_jobid ));
errno = EBADF;


-- 
Samba Shared Repository