The branch, master has been updated
       via  e8b7aec winbind_krb5_localauth: Fix a compiler warning
       via  0a91ade s3: smbd/durable: remove dev and inode check from 
vfs_default_durable_reconnect_check_stat()
       via  3430c9c lib:charset: Fix error messages from charset conversion
       via  4ad2a71 s3: smbd: fix a check in stat_cache_add()
      from  0cd4482 docs/vfs_ceph: add CTDB_SAMBA_SKIP_SHARE_CHECK=yes caveat

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


- Log -----------------------------------------------------------------
commit e8b7aecf460a0c09cadbefda0a9b5fe1432f4089
Author: Andreas Schneider <[email protected]>
Date:   Thu Jul 5 18:02:48 2018 +0200

    winbind_krb5_localauth: Fix a compiler warning
    
    This can't used uninitialized but some compiler complains about it.
    
    Signed-off-by: Andreas Schneider <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>
    
    Autobuild-User(master): Ralph Böhme <[email protected]>
    Autobuild-Date(master): Sat Jul  7 16:24:30 CEST 2018 on sn-devel-144

commit 0a91ade5272698c094137fa28d2ad4723b5963cf
Author: Ralph Boehme <[email protected]>
Date:   Fri Mar 2 15:50:29 2018 +0100

    s3: smbd/durable: remove dev and inode check from 
vfs_default_durable_reconnect_check_stat()
    
    On a cluster filesystem the device numbers may differ on the cluster
    nodes. We already verify the file_id in vfs_default_durable_reconnect(),
    so we can safely remove the dev/inode checks.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=13318
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 3430c9c3c27b4c5fe5d38797acc7aa6aeb03c2b4
Author: Christof Schmitt via samba-technical <[email protected]>
Date:   Thu Jun 28 11:50:13 2018 -0700

    lib:charset: Fix error messages from charset conversion
    
    When e.g. trying to access a filename through Samba that does not adhere
    to the encoding configured in 'unix charset', the log will show the
    encoding problem, followed by "strstr_m: src malloc fail". The problem
    is that strstr_m assumes that any failure from push/pull_ucs2_talloc is
    a memory allocation problem, which is not correct.
    
    Address this by removing the misleading messages and add a missing
    message in convert_string_talloc_handle.
    
    Signed-off-by: Christof Schmitt <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

commit 4ad2a716fb0733e44f5bc000fb85e31aff83e682
Author: Ralph Boehme <[email protected]>
Date:   Wed Jun 27 13:07:00 2018 +0200

    s3: smbd: fix a check in stat_cache_add()
    
    As the comment above the if condition says:
    
            /*
             * If we are in case insentive mode, we don't need to
             * store names that need no translation - else, it
             * would be a waste.
             */
    
    Ie if stat_cache_add() is called as
    
            stat_cache_add("foo/bar", "foo/bar", false)
    
    There's no need to cache the path, as a simple stat() on the client
    supplied name (full_orig_name) matches the name used in the
    filesystem (passed to stat_cache_add() as translated_path).
    
    So fix the if condition to match the comment.
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Jeremy Allison <[email protected]>

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

Summary of changes:
 lib/util/charset/convert_string.c             |  1 +
 lib/util/charset/util_str.c                   |  3 ---
 nsswitch/krb5_plugin/winbind_krb5_localauth.c |  4 ++--
 source3/smbd/durable.c                        | 24 ------------------------
 source3/smbd/statcache.c                      |  2 +-
 5 files changed, 4 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/charset/convert_string.c 
b/lib/util/charset/convert_string.c
index 50065f8..196302a 100644
--- a/lib/util/charset/convert_string.c
+++ b/lib/util/charset/convert_string.c
@@ -375,6 +375,7 @@ bool convert_string_talloc_handle(TALLOC_CTX *ctx, struct 
smb_iconv_handle *ic,
                }
                ob = talloc_zero_array(ctx, char, destlen);
                if (ob == NULL) {
+                       DBG_ERR("Could not talloc destination buffer.\n");
                        errno = ENOMEM;
                        return false;
                }
diff --git a/lib/util/charset/util_str.c b/lib/util/charset/util_str.c
index 6feed17..3f5b247 100644
--- a/lib/util/charset/util_str.c
+++ b/lib/util/charset/util_str.c
@@ -570,13 +570,11 @@ char *strstr_m(const char *src, const char *findstr)
        frame = talloc_stackframe();
 
        if (!push_ucs2_talloc(frame, &src_w, src, &converted_size)) {
-               DBG_WARNING("src malloc fail\n");
                TALLOC_FREE(frame);
                return NULL;
        }
 
        if (!push_ucs2_talloc(frame, &find_w, findstr, &converted_size)) {
-               DBG_WARNING("find malloc fail\n");
                TALLOC_FREE(frame);
                return NULL;
        }
@@ -591,7 +589,6 @@ char *strstr_m(const char *src, const char *findstr)
        *p = 0;
        if (!pull_ucs2_talloc(frame, &s2, src_w, &converted_size)) {
                TALLOC_FREE(frame);
-               DEBUG(0,("strstr_m: dest malloc fail\n"));
                return NULL;
        }
        retp = discard_const_p(char, (s+strlen(s2)));
diff --git a/nsswitch/krb5_plugin/winbind_krb5_localauth.c 
b/nsswitch/krb5_plugin/winbind_krb5_localauth.c
index 7c77609..b412575 100644
--- a/nsswitch/krb5_plugin/winbind_krb5_localauth.c
+++ b/nsswitch/krb5_plugin/winbind_krb5_localauth.c
@@ -84,8 +84,8 @@ static krb5_error_code winbind_userok(krb5_context context,
        krb5_error_code code = 0;
        char *princ_str = NULL;
        struct passwd *pwd = NULL;
-       uid_t princ_uid;
-       uid_t lname_uid;
+       uid_t princ_uid = (uid_t)-1;
+       uid_t lname_uid = (uid_t)-1;
        wbcErr wbc_status;
        int cmp;
 
diff --git a/source3/smbd/durable.c b/source3/smbd/durable.c
index 7d7a1b2..80392e2 100644
--- a/source3/smbd/durable.c
+++ b/source3/smbd/durable.c
@@ -302,30 +302,6 @@ static bool vfs_default_durable_reconnect_check_stat(
 {
        int ret;
 
-       if (cookie_st->st_ex_dev != fsp_st->st_ex_dev) {
-               DEBUG(1, ("vfs_default_durable_reconnect (%s): "
-                         "stat_ex.%s differs: "
-                         "cookie:%llu != stat:%llu, "
-                         "denying durable reconnect\n",
-                         name,
-                         "st_ex_dev",
-                         (unsigned long long)cookie_st->st_ex_dev,
-                         (unsigned long long)fsp_st->st_ex_dev));
-               return false;
-       }
-
-       if (cookie_st->st_ex_ino != fsp_st->st_ex_ino) {
-               DEBUG(1, ("vfs_default_durable_reconnect (%s): "
-                         "stat_ex.%s differs: "
-                         "cookie:%llu != stat:%llu, "
-                         "denying durable reconnect\n",
-                         name,
-                         "st_ex_ino",
-                         (unsigned long long)cookie_st->st_ex_ino,
-                         (unsigned long long)fsp_st->st_ex_ino));
-               return false;
-       }
-
        if (cookie_st->st_ex_mode != fsp_st->st_ex_mode) {
                DEBUG(1, ("vfs_default_durable_reconnect (%s): "
                          "stat_ex.%s differs: "
diff --git a/source3/smbd/statcache.c b/source3/smbd/statcache.c
index d49f5ee..27f9dec 100644
--- a/source3/smbd/statcache.c
+++ b/source3/smbd/statcache.c
@@ -73,7 +73,7 @@ void stat_cache_add( const char *full_orig_name,
         * would be a waste.
         */
 
-       if (case_sensitive && (strcmp(full_orig_name, translated_path) == 0)) {
+       if (!case_sensitive && (strcmp(full_orig_name, translated_path) == 0)) {
                return;
        }
 


-- 
Samba Shared Repository

Reply via email to