The branch, v3-6-test has been updated
       via  bb45a34 tdb:common/open.c - use "discard_const_p" for certain 
"tdb->name" assignments
       via  f4e1c27 tdb:tdbstore.c - remove an useless '\'
       via  0a0f3b4 s3-spoolss: Fix Bug #7641: handle win9x adddriver calls w/o 
config file.
      from  357377d s3: Properly print binary values "net cache"

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit bb45a3460fde3a5d8cd08c0ff6c2a96b0ec4deaf
Author: Matthias Dieter Wallnöfer <m...@samba.org>
Date:   Sat Nov 27 20:19:34 2010 +0100

    tdb:common/open.c - use "discard_const_p" for certain "tdb->name" 
assignments
    
    In order to suppress compiler warnings.
    (cherry picked from commit 989d8803f28826e6541667127abad801c4fa4566)

commit f4e1c2782b5491a796f398ae8d3eee68d3fd3334
Author: Matthias Dieter Wallnöfer <m...@samba.org>
Date:   Sat Nov 27 18:21:32 2010 +0100

    tdb:tdbstore.c - remove an useless '\'
    
    Discovered by a warning of the Tru64 host on the buildfarm.
    (cherry picked from commit d2560cd7dc106d7853442133f237001f68bcb971)

commit 0a0f3b4947689ca4ab7015e9a1ace8d204bab9f3
Author: Günther Deschner <g...@samba.org>
Date:   Mon Nov 29 17:56:40 2010 +0100

    s3-spoolss: Fix Bug #7641: handle win9x adddriver calls w/o config file.
    
    This turned cupsaddsmb to run into an infinite loop.
    
    Guenther
    (cherry picked from commit c62509c8f2589e7b952517626d61ee34b83e96b3)

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

Summary of changes:
 lib/tdb/common/open.c          |    4 ++--
 lib/tdb/tools/tdbrestore.c     |    2 +-
 source3/printing/nt_printing.c |   10 ++++++++--
 3 files changed, 11 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c
index ce8e9f5..ec45689 100644
--- a/lib/tdb/common/open.c
+++ b/lib/tdb/common/open.c
@@ -202,7 +202,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, 
int hash_size, int td
        }
 
        if (name == NULL) {
-               tdb->name = "__NULL__";
+               tdb->name = discard_const_p(char, "__NULL__");
                TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_open_ex: called with name 
== NULL\n"));
                tdb->name = NULL;
                errno = EINVAL;
@@ -215,7 +215,7 @@ _PUBLIC_ struct tdb_context *tdb_open_ex(const char *name, 
int hash_size, int td
                 * set the name as the given string, so that tdb_name() will
                 * work in case of an error.
                 */
-               tdb->name = name;
+               tdb->name = discard_const_p(char, name);
                TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_open_ex: can't 
strdup(%s)\n",
                         name));
                tdb->name = NULL;
diff --git a/lib/tdb/tools/tdbrestore.c b/lib/tdb/tools/tdbrestore.c
index 485c440..601cd5e 100644
--- a/lib/tdb/tools/tdbrestore.c
+++ b/lib/tdb/tools/tdbrestore.c
@@ -39,7 +39,7 @@ static int read_linehead(FILE *f)
                if (c == EOF) {
                        return -1;
                }
-               if (c == '\(') {
+               if (c == '(') {
                        break;
                }
        }
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index ee1ac76..094f4f3 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -760,7 +760,11 @@ static WERROR clean_up_driver_struct_level(TALLOC_CTX 
*mem_ctx,
        WERROR err;
        char *_p;
 
-       if (!*driver_path || !*data_file || !*config_file) {
+       if (!*driver_path || !*data_file) {
+               return WERR_INVALID_PARAM;
+       }
+
+       if (!strequal(architecture, SPOOLSS_ARCHITECTURE_4_0) && !*config_file) 
{
                return WERR_INVALID_PARAM;
        }
 
@@ -772,7 +776,9 @@ static WERROR clean_up_driver_struct_level(TALLOC_CTX 
*mem_ctx,
 
        strip_driver_path(mem_ctx, *driver_path);
        strip_driver_path(mem_ctx, *data_file);
-       strip_driver_path(mem_ctx, *config_file);
+       if (*config_file) {
+               strip_driver_path(mem_ctx, *config_file);
+       }
        if (help_file) {
                strip_driver_path(mem_ctx, *help_file);
        }


-- 
Samba Shared Repository

Reply via email to