The branch, v4-12-test has been updated
       via  237a51d926e classicupgrade: treat old never expires value right
       via  6382ca85682 s3:pysmbd: fix fd leak in py_smbd_create_file()
       via  e80ef35f935 HEIMDAL: krb5_storage_free(NULL) should work
      from  40e503732dc lib:util: Avoid free'ing our own pointer

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-12-test


- Log -----------------------------------------------------------------
commit 237a51d926e1620dd185cd55c3d9dbfb443b44e8
Author: Björn Jacke <b...@sernet.de>
Date:   Fri Feb 5 12:47:01 2021 +0100

    classicupgrade: treat old never expires value right
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=14624
    
    Signed-off-by: Bjoern Jacke <bja...@samba.org>
    Reviewed-by: Stefan Metzmacher <me...@samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <me...@samba.org>
    Autobuild-Date(master): Wed Feb 10 15:06:49 UTC 2021 on sn-devel-184
    
    (cherry picked from commit df75d82c9de6977c466ee9f01886cb012a9c5fef)
    
    Autobuild-User(v4-12-test): Karolin Seeger <ksee...@samba.org>
    Autobuild-Date(v4-12-test): Tue Feb 16 22:33:52 UTC 2021 on sn-devel-184

commit 6382ca8568219a1ba54bc05d24ccbff019240cfe
Author: Stefan Metzmacher <me...@samba.org>
Date:   Tue Feb 9 13:48:36 2021 +0100

    s3:pysmbd: fix fd leak in py_smbd_create_file()
    
    Various 'samba-tool domain backup' commands use this and will
    fail if there's over ~1000 files in the sysvol folder.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13898
    
    Signed-off-by: Stefan Metzmacher <me...@samba.org>
    (cherry picked from commit d8fa464a2dfb11df4e1db4ebffe8bd28ff118c75)

commit e80ef35f9356eadcaf6578a5b2c8d68acc45c172
Author: Paul Wise <pa...@bonedaddy.net>
Date:   Mon Feb 29 11:58:45 2016 -0600

    HEIMDAL: krb5_storage_free(NULL) should work
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12505
    
    Signed-off-by: Paul Wise <pa...@bonedaddy.net>
    Reviewed-by: Jeremy Allison <j...@samba.org>
    Reviewed-by: Andrew Bartlett <abart...@samba.org>
    Original-author: Nicolas Williams <n...@twosigma.com>
    (cherry-picked from heimdal commit b3db07d5f0e03f6a1a0a392e70f9675e19a6d6af)
    (cherry picked from commit f9ed4f7028a5ed29026ac8ef1b47b63755ba98f8)

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

Summary of changes:
 python/samba/upgrade.py          | 2 +-
 source3/smbd/pysmbd.c            | 3 +++
 source4/heimdal/lib/krb5/store.c | 2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/python/samba/upgrade.py b/python/samba/upgrade.py
index 8511bed2868..dff856a8d7c 100644
--- a/python/samba/upgrade.py
+++ b/python/samba/upgrade.py
@@ -74,7 +74,7 @@ def import_sam_policy(samdb, policy, logger):
 
     if 'maximum password age' in policy:
         max_pw_age_unix = policy['maximum password age']
-        if max_pw_age_unix == -1 or max_pw_age_unix == 0:
+        if max_pw_age_unix == -1 or max_pw_age_unix == 0 or max_pw_age_unix == 
0xFFFFFFFF:
             max_pw_age_nt = -0x8000000000000000
         else:
             max_pw_age_nt = int(-max_pw_age_unix * (1e7))
diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c
index 39fe875a385..58c96396e08 100644
--- a/source3/smbd/pysmbd.c
+++ b/source3/smbd/pysmbd.c
@@ -1113,9 +1113,12 @@ static PyObject *py_smbd_create_file(PyObject *self, 
PyObject *args, PyObject *k
        if (!NT_STATUS_IS_OK(status)) {
                DBG_ERR("init_files_struct failed: %s\n",
                        nt_errstr(status));
+       } else if (fsp != NULL) {
+               SMB_VFS_CLOSE(fsp);
        }
 
        TALLOC_FREE(frame);
+       PyErr_NTSTATUS_NOT_OK_RAISE(status);
        Py_RETURN_NONE;
 }
 
diff --git a/source4/heimdal/lib/krb5/store.c b/source4/heimdal/lib/krb5/store.c
index 17de78e9e74..31afb23c983 100644
--- a/source4/heimdal/lib/krb5/store.c
+++ b/source4/heimdal/lib/krb5/store.c
@@ -270,6 +270,8 @@ krb5_storage_get_eof_code(krb5_storage *sp)
 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
 krb5_storage_free(krb5_storage *sp)
 {
+    if (sp == NULL)
+        return 0;
     if(sp->free)
        (*sp->free)(sp);
     free(sp->data);


-- 
Samba Shared Repository

Reply via email to