The branch, master has been updated
       via  b753845... librpc: finally merge ndr_string.c.
       via  6d9fe52... s3-libndr: merge in better ndr warnings from s4 
ndr_string.c
       via  764cde5... s3-build: add missing prototype for regtype_by_string().
       via  ba1befd... s3-services: move services.h closer to services 
implementation.
       via  e7982bb... s3-lanman: Fix various RAP printing calls according to 
win98 testing and MS-RAP docs.
      from  29629b9... s3 smb2: Fix the build without kerberos

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


- Log -----------------------------------------------------------------
commit b75384546ac2300896b58a4474bce5f09dcc924a
Author: Günther Deschner <[email protected]>
Date:   Thu May 20 13:57:22 2010 +0200

    librpc: finally merge ndr_string.c.
    
    Guenther

commit 6d9fe52310d4aedbd66294cecc1d375da46bef39
Author: Günther Deschner <[email protected]>
Date:   Thu May 20 13:54:44 2010 +0200

    s3-libndr: merge in better ndr warnings from s4 ndr_string.c
    
    Guenther

commit 764cde51902da80bf4457e83e3a15641d259b684
Author: Günther Deschner <[email protected]>
Date:   Thu May 20 13:54:08 2010 +0200

    s3-build: add missing prototype for regtype_by_string().
    
    Guenther

commit ba1befd36564cdc580d29be2303d824f9bde6a36
Author: Günther Deschner <[email protected]>
Date:   Thu May 20 13:39:46 2010 +0200

    s3-services: move services.h closer to services implementation.
    
    Guenther

commit e7982bbe0b560dcf37beb3995b5ce8c091a9c21e
Author: Günther Deschner <[email protected]>
Date:   Thu May 20 00:46:47 2010 +0200

    s3-lanman: Fix various RAP printing calls according to win98 testing and 
MS-RAP docs.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 {source3/librpc => librpc}/ndr/ndr_string.c |   16 +-
 source3/Makefile.in                         |    2 +-
 source3/include/proto.h                     |    1 +
 source3/rpc_server/srv_svcctl_nt.c          |    2 +-
 source3/{include => services}/services.h    |    0 
 source3/services/services_db.c              |    2 +-
 source3/services/svc_netlogon.c             |    2 +-
 source3/services/svc_rcinit.c               |    2 +-
 source3/services/svc_spoolss.c              |    2 +-
 source3/services/svc_winreg.c               |    2 +-
 source3/services/svc_wins.c                 |    2 +-
 source3/smbd/lanman.c                       |   20 +-
 source4/librpc/config.mk                    |    2 +-
 source4/librpc/ndr/ndr_string.c             |  705 ---------------------------
 source4/librpc/wscript_build                |    2 +-
 15 files changed, 29 insertions(+), 733 deletions(-)
 rename {source3/librpc => librpc}/ndr/ndr_string.c (97%)
 rename source3/{include => services}/services.h (100%)
 delete mode 100644 source4/librpc/ndr/ndr_string.c


Changeset truncated at 500 lines:

diff --git a/source3/librpc/ndr/ndr_string.c b/librpc/ndr/ndr_string.c
similarity index 97%
rename from source3/librpc/ndr/ndr_string.c
rename to librpc/ndr/ndr_string.c
index b4891e3..568c368 100644
--- a/source3/librpc/ndr/ndr_string.c
+++ b/librpc/ndr/ndr_string.c
@@ -89,7 +89,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull 
*ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV,
-                                                     "Bad character 
conversion");
+                                                     "Bad character conversion 
with flags 0x%x", flags);
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, (len2 + c_len_term)*byte_mul));
@@ -127,7 +127,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull 
*ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad character 
conversion");
+                                                     "Bad character conversion 
with flags 0x%x", flags);
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul));
@@ -166,7 +166,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull 
*ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad character 
conversion");
+                                                     "Bad character conversion 
with flags 0x%x", flags);
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul));
@@ -201,7 +201,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull 
*ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad character 
conversion");
+                                                     "Bad character conversion 
with flags 0x%x", flags);
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, (len3 + c_len_term)*byte_mul));
@@ -233,7 +233,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull 
*ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad character 
conversion");
+                                                     "Bad character conversion 
with flags 0x%x", flags);
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, len3));
@@ -252,7 +252,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull 
*ndr, int ndr_flags,
                                           &converted_size, false))
                {
                        return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                             "Bad character conversion");
+                                             "Bad character conversion with 
flags 0x%x", flags);
                }
                NDR_CHECK(ndr_pull_advance(ndr, len1));
                *s = as;
@@ -277,7 +277,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull 
*ndr, int ndr_flags,
                                                   &converted_size, false))
                        {
                                return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad character 
conversion");
+                                                     "Bad character conversion 
with flags 0x%x", flags);
                        }
                }
                NDR_CHECK(ndr_pull_advance(ndr, len1));
@@ -337,7 +337,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_string(struct ndr_push 
*ndr, int ndr_flags,
                                   (void **)(void *)&dest, &d_len, false))
        {
                return ndr_push_error(ndr, NDR_ERR_CHARCNV, 
-                                     "Bad character conversion");
+                                     "Bad character push conversion with flags 
0x%x", flags);
        }
 
        if (flags & LIBNDR_FLAG_STR_BYTESIZE) {
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 56bee17..81328eb 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -308,7 +308,7 @@ LIBNDR_OBJ = ../librpc/ndr/ndr_basic.o \
             librpc/gen_ndr/ndr_misc.o \
             librpc/gen_ndr/ndr_security.o \
             ../librpc/ndr/ndr_sec_helper.o \
-            librpc/ndr/ndr_string.o \
+            ../librpc/ndr/ndr_string.o \
             ../librpc/ndr/uuid.o \
             librpc/ndr/util.o \
             librpc/gen_ndr/ndr_dcerpc.o
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 3deeb9f..5775ebf 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1294,6 +1294,7 @@ struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t 
uid) ;
 /* The following definitions come from ..libcli/registry/util_reg.c  */
 
 const char *str_regtype(int type);
+int regtype_by_string(const char *str);
 bool push_reg_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *s);
 bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char **a);
 bool pull_reg_sz(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, const char **s);
diff --git a/source3/rpc_server/srv_svcctl_nt.c 
b/source3/rpc_server/srv_svcctl_nt.c
index 604066e..86e329e 100644
--- a/source3/rpc_server/srv_svcctl_nt.c
+++ b/source3/rpc_server/srv_svcctl_nt.c
@@ -24,7 +24,7 @@
 
 #include "includes.h"
 #include "../librpc/gen_ndr/srv_svcctl.h"
-#include "services.h"
+#include "services/services.h"
 #include "registry.h"
 
 #undef DBGC_CLASS
diff --git a/source3/include/services.h b/source3/services/services.h
similarity index 100%
rename from source3/include/services.h
rename to source3/services/services.h
diff --git a/source3/services/services_db.c b/source3/services/services_db.c
index 22e39e0..daf4f50 100644
--- a/source3/services/services_db.c
+++ b/source3/services/services_db.c
@@ -21,7 +21,7 @@
  */
 
 #include "includes.h"
-#include "services.h"
+#include "services/services.h"
 #include "registry.h"
 
 struct rcinit_file_information {
diff --git a/source3/services/svc_netlogon.c b/source3/services/svc_netlogon.c
index 41b4f95..582cb56 100644
--- a/source3/services/svc_netlogon.c
+++ b/source3/services/svc_netlogon.c
@@ -18,7 +18,7 @@
  */
 
 #include "includes.h"
-#include "services.h"
+#include "services/services.h"
 
 /* Implementation for internal netlogon service */
 
diff --git a/source3/services/svc_rcinit.c b/source3/services/svc_rcinit.c
index e19b3d1..199e5f1 100644
--- a/source3/services/svc_rcinit.c
+++ b/source3/services/svc_rcinit.c
@@ -18,7 +18,7 @@
  */
 
 #include "includes.h"
-#include "services.h"
+#include "services/services.h"
 
 /*********************************************************************
 *********************************************************************/
diff --git a/source3/services/svc_spoolss.c b/source3/services/svc_spoolss.c
index 2495fb4..3b56f93 100644
--- a/source3/services/svc_spoolss.c
+++ b/source3/services/svc_spoolss.c
@@ -18,7 +18,7 @@
  */
 
 #include "includes.h"
-#include "services.h"
+#include "services/services.h"
 
 /* Implementation for internal spoolss service */
 
diff --git a/source3/services/svc_winreg.c b/source3/services/svc_winreg.c
index 0e63e62..04c137f 100644
--- a/source3/services/svc_winreg.c
+++ b/source3/services/svc_winreg.c
@@ -18,7 +18,7 @@
  */
 
 #include "includes.h"
-#include "services.h"
+#include "services/services.h"
 
 /* Implementation for internal winreg service */
 
diff --git a/source3/services/svc_wins.c b/source3/services/svc_wins.c
index e1069af..f1e94c5 100644
--- a/source3/services/svc_wins.c
+++ b/source3/services/svc_wins.c
@@ -18,7 +18,7 @@
  */
 
 #include "includes.h"
-#include "services.h"
+#include "services/services.h"
 
 /* Implementation for internal wins service */
 
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 91eb135..744d460 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -830,9 +830,9 @@ static bool api_DosPrintQGetInfo(connection_struct *conn, 
uint16 vuid,
 
        status = rpccli_spoolss_OpenPrinter(cli, mem_ctx,
                                            QueueName,
-                                           NULL,
+                                           "RAW",
                                            devmode_ctr,
-                                           SEC_FLAG_MAXIMUM_ALLOWED,
+                                           PRINTER_ACCESS_USE,
                                            &handle,
                                            &werr);
        if (!NT_STATUS_IS_OK(status)) {
@@ -1072,9 +1072,9 @@ static bool api_DosPrintQEnum(connection_struct *conn, 
uint16 vuid,
 
                status = rpccli_spoolss_OpenPrinter(cli, mem_ctx,
                                                    printername,
-                                                   NULL,
+                                                   "RAW",
                                                    devmode_ctr,
-                                                   SEC_FLAG_MAXIMUM_ALLOWED,
+                                                   PRINTER_ACCESS_USE,
                                                    &handle,
                                                    &werr);
                if (!NT_STATUS_IS_OK(status)) {
@@ -3113,9 +3113,9 @@ static bool api_RDosPrintJobDel(connection_struct 
*conn,uint16 vuid,
 
        status = rpccli_spoolss_OpenPrinter(cli, mem_ctx,
                                            sharename,
-                                           NULL,
+                                           "RAW",
                                            devmode_ctr,
-                                           SEC_FLAG_MAXIMUM_ALLOWED,
+                                           JOB_ACCESS_ADMINISTER,
                                            &handle,
                                            &werr);
        if (!NT_STATUS_IS_OK(status)) {
@@ -3411,9 +3411,9 @@ static bool api_PrintJobInfo(connection_struct *conn, 
uint16 vuid,
 
        status = rpccli_spoolss_OpenPrinter(cli, mem_ctx,
                                            sharename,
-                                           NULL,
+                                           "RAW",
                                            devmode_ctr,
-                                           SEC_FLAG_MAXIMUM_ALLOWED,
+                                           PRINTER_ACCESS_USE,
                                            &handle,
                                            &werr);
        if (!NT_STATUS_IS_OK(status)) {
@@ -4399,9 +4399,9 @@ static bool api_WPrintJobGetInfo(connection_struct *conn, 
uint16 vuid,
 
        status = rpccli_spoolss_OpenPrinter(cli, mem_ctx,
                                            sharename,
-                                           NULL,
+                                           "RAW",
                                            devmode_ctr,
-                                           SEC_FLAG_MAXIMUM_ALLOWED,
+                                           PRINTER_ACCESS_USE,
                                            &handle,
                                            &werr);
        if (!NT_STATUS_IS_OK(status)) {
diff --git a/source4/librpc/config.mk b/source4/librpc/config.mk
index 5fe944a..ec4496c 100644
--- a/source4/librpc/config.mk
+++ b/source4/librpc/config.mk
@@ -8,7 +8,7 @@ dcerpcsrcdir = $(librpcsrcdir)/rpc
 PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBTALLOC LIBSAMBA-UTIL CHARSET \
                                          LIBSAMBA-HOSTCONFIG
 
-LIBNDR_OBJ_FILES = $(addprefix $(ndrsrcdir)/, ndr_string.o) 
../librpc/ndr/ndr_basic.o ../librpc/ndr/uuid.o ../librpc/ndr/ndr.o 
../librpc/gen_ndr/ndr_misc.o ../librpc/ndr/ndr_misc.o
+LIBNDR_OBJ_FILES = ../librpc/ndr/ndr_string.o ../librpc/ndr/ndr_basic.o 
../librpc/ndr/uuid.o ../librpc/ndr/ndr.o ../librpc/gen_ndr/ndr_misc.o 
../librpc/ndr/ndr_misc.o
 
 PC_FILES += ../librpc/ndr.pc
 LIBNDR_VERSION = 0.0.1
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c
deleted file mode 100644
index 08c3c7f..0000000
--- a/source4/librpc/ndr/ndr_string.c
+++ /dev/null
@@ -1,705 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-
-   routines for marshalling/unmarshalling string types
-
-   Copyright (C) Andrew Tridgell 2003
-   
-   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 <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "librpc/ndr/libndr.h"
-
-/**
-  pull a general string from the wire
-*/
-_PUBLIC_ enum ndr_err_code ndr_pull_string(struct ndr_pull *ndr, int 
ndr_flags, const char **s)
-{
-       char *as=NULL;
-       uint32_t len1, ofs, len2;
-       uint16_t len3;
-       size_t ret;
-       charset_t chset = CH_UTF16;
-       unsigned byte_mul = 2;
-       unsigned flags = ndr->flags;
-       unsigned c_len_term = 0;
-
-       if (!(ndr_flags & NDR_SCALARS)) {
-               return NDR_ERR_SUCCESS;
-       }
-
-       if (NDR_BE(ndr)) {
-               chset = CH_UTF16BE;
-       }
-
-       if (flags & LIBNDR_FLAG_STR_ASCII) {
-               chset = CH_DOS;
-               byte_mul = 1;
-               flags &= ~LIBNDR_FLAG_STR_ASCII;
-       }
-
-       if (flags & LIBNDR_FLAG_STR_UTF8) {
-               chset = CH_UTF8;
-               byte_mul = 1;
-               flags &= ~LIBNDR_FLAG_STR_UTF8;
-       }
-
-       flags &= ~LIBNDR_FLAG_STR_CONFORMANT;
-       if (flags & LIBNDR_FLAG_STR_CHARLEN) {
-               c_len_term = 1;
-               flags &= ~LIBNDR_FLAG_STR_CHARLEN;
-       }
-
-       switch (flags & LIBNDR_STRING_FLAGS) {
-       case LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_SIZE4:
-       case LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_NOTERM:
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &len1));
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &ofs));
-               if (ofs != 0) {
-                       return ndr_pull_error(ndr, NDR_ERR_STRING, "non-zero 
array offset with string flags 0x%x\n",
-                                             ndr->flags & LIBNDR_STRING_FLAGS);
-               }
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &len2));
-               if (len2 > len1) {
-                       return ndr_pull_error(ndr, NDR_ERR_STRING, 
-                                             "Bad string lengths len1=%u 
ofs=%u len2=%u\n", 
-                                             len1, ofs, len2);
-               }
-               NDR_PULL_NEED_BYTES(ndr, (len2 + c_len_term)*byte_mul);
-               if (len2 == 0) {
-                       as = talloc_strdup(ndr->current_mem_ctx, "");
-               } else {
-                       if (!convert_string_talloc(ndr->current_mem_ctx,
-                                                   chset, CH_UNIX, 
-                                                   ndr->data+ndr->offset, 
-                                                   (len2 + 
c_len_term)*byte_mul,
-                                                   (void **)&as, &ret, false)) 
{
-                               return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad character conversion 
with flags 0x%x", flags);
-                       }
-               }
-               NDR_CHECK(ndr_pull_advance(ndr, (len2 + c_len_term)*byte_mul));
-
-               if (len1 != len2) {
-                       DEBUG(6,("len1[%u] != len2[%u] '%s'\n", len1, len2, 
as));
-               }
-
-               /* this is a way of detecting if a string is sent with the wrong
-                  termination */
-               if (ndr->flags & LIBNDR_FLAG_STR_NOTERM) {
-                       if (strlen(as) < (len2 + c_len_term)) {
-                               DEBUG(6,("short string '%s'\n", as));
-                       }
-               } else {
-                       if (strlen(as) == (len2 + c_len_term)) {
-                               DEBUG(6,("long string '%s'\n", as));
-                       }
-               }
-               *s = as;
-               break;
-
-       case LIBNDR_FLAG_STR_SIZE4:
-       case LIBNDR_FLAG_STR_SIZE4|LIBNDR_FLAG_STR_NOTERM:
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &len1));
-               NDR_PULL_NEED_BYTES(ndr, (len1 + c_len_term)*byte_mul);
-               if (len1 == 0) {
-                       as = talloc_strdup(ndr->current_mem_ctx, "");
-               } else {
-                       if (!convert_string_talloc(ndr->current_mem_ctx,
-                                                   chset, CH_UNIX, 
-                                                   ndr->data+ndr->offset, 
-                                                   (len1 + 
c_len_term)*byte_mul,
-                                                   (void **)&as, &ret, false)) 
{
-                               return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad character conversion 
with flags 0x%x", flags);
-                       }
-               }
-               NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul));
-
-               /* this is a way of detecting if a string is sent with the wrong
-                  termination */
-               if (ndr->flags & LIBNDR_FLAG_STR_NOTERM) {
-                       if (strlen(as) < (len1 + c_len_term)) {
-                               DEBUG(6,("short string '%s'\n", as));
-                       }
-               } else {
-                       if (strlen(as) == (len1 + c_len_term)) {
-                               DEBUG(6,("long string '%s'\n", as));
-                       }
-               }
-               *s = as;
-               break;
-
-       case LIBNDR_FLAG_STR_LEN4:
-       case LIBNDR_FLAG_STR_LEN4|LIBNDR_FLAG_STR_NOTERM:
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &ofs));
-               if (ofs != 0) {
-                       return ndr_pull_error(ndr, NDR_ERR_STRING, "non-zero 
array offset with string flags 0x%x\n",
-                                             ndr->flags & LIBNDR_STRING_FLAGS);
-               }
-               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &len1));
-               NDR_PULL_NEED_BYTES(ndr, (len1 + c_len_term)*byte_mul);
-               if (len1 == 0) {
-                       as = talloc_strdup(ndr->current_mem_ctx, "");
-               } else {
-                       if (!convert_string_talloc(ndr->current_mem_ctx,
-                                                   chset, CH_UNIX, 
-                                                   ndr->data+ndr->offset, 
-                                                   (len1 + 
c_len_term)*byte_mul,
-                                                   (void **)&as, &ret, false)) 
{
-                               return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad character conversion 
with flags 0x%x", flags);
-                       }
-               }
-               NDR_CHECK(ndr_pull_advance(ndr, (len1 + c_len_term)*byte_mul));
-
-               /* this is a way of detecting if a string is sent with the wrong
-                  termination */
-               if (ndr->flags & LIBNDR_FLAG_STR_NOTERM) {
-                       if (strlen(as) < (len1 + c_len_term)) {
-                               DEBUG(6,("short string '%s'\n", as));
-                       }
-               } else {
-                       if (strlen(as) == (len1 + c_len_term)) {
-                               DEBUG(6,("long string '%s'\n", as));
-                       }
-               }
-               *s = as;
-               break;
-
-
-       case LIBNDR_FLAG_STR_SIZE2:
-       case LIBNDR_FLAG_STR_SIZE2|LIBNDR_FLAG_STR_NOTERM:
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &len3));
-               NDR_PULL_NEED_BYTES(ndr, (len3 + c_len_term)*byte_mul);
-               if (len3 == 0) {
-                       as = talloc_strdup(ndr->current_mem_ctx, "");
-               } else {
-                       if (!convert_string_talloc(ndr->current_mem_ctx,
-                                                   chset, CH_UNIX, 
-                                                   ndr->data+ndr->offset, 
-                                                   (len3 + 
c_len_term)*byte_mul,
-                                                   (void **)&as, &ret, false)) 
{
-                               return ndr_pull_error(ndr, NDR_ERR_CHARCNV, 
-                                                     "Bad character conversion 
with flags 0x%x", flags);
-                       }
-               }
-               NDR_CHECK(ndr_pull_advance(ndr, (len3 + c_len_term)*byte_mul));
-
-               /* this is a way of detecting if a string is sent with the wrong
-                  termination */
-               if (ndr->flags & LIBNDR_FLAG_STR_NOTERM) {
-                       if (strlen(as) < (len3 + c_len_term)) {
-                               DEBUG(6,("short string '%s'\n", as));
-                       }
-               } else {
-                       if (strlen(as) == (len3 + c_len_term)) {
-                               DEBUG(6,("long string '%s'\n", as));
-                       }
-               }
-               *s = as;
-               break;
-
-       case 
LIBNDR_FLAG_STR_SIZE2|LIBNDR_FLAG_STR_NOTERM|LIBNDR_FLAG_STR_BYTESIZE:
-               NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &len3));
-               NDR_PULL_NEED_BYTES(ndr, len3);
-               if (len3 == 0) {


-- 
Samba Shared Repository

Reply via email to