The branch, master has been updated
       via  8bd7669d8d2 dsdb/password_hash: don't double assign variables (CID 
1363048, 1034720)
       via  9199541052a pypidl: check the result of 
py_dcerpc_ndr_pointer_deref()
       via  e78db8a7ebd policy/gp: always close a file (CID 1445119)
       via  213a8d551dc s4/winbind/idmap: check the right variable (CID 1272950)
      from  05d4466a6d1 smbd: check for stale pid in get_lease_type()

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


- Log -----------------------------------------------------------------
commit 8bd7669d8d2b313502a8556943f0cff22c08f960
Author: Douglas Bagnall <[email protected]>
Date:   Thu May 23 09:59:51 2019 +1200

    dsdb/password_hash: don't double assign variables (CID 1363048, 1034720)
    
    Signed-off-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>
    
    Autobuild-User(master): Andreas Schneider <[email protected]>
    Autobuild-Date(master): Mon Jul  6 13:56:17 UTC 2020 on sn-devel-184

commit 9199541052a057e0a49b203646f35394b0362290
Author: Douglas Bagnall <[email protected]>
Date:   Wed May 15 11:53:07 2019 +1200

    pypidl: check the result of py_dcerpc_ndr_pointer_deref()
    
    Signed-off-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit e78db8a7ebd01afd3d3128c1221853827d35ab4b
Author: Douglas Bagnall <[email protected]>
Date:   Wed May 15 10:54:33 2019 +1200

    policy/gp: always close a file (CID 1445119)
    
    Signed-off-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 213a8d551dc416a137fec5f392925bbf9ebec55a
Author: Douglas Bagnall <[email protected]>
Date:   Fri May 10 10:26:54 2019 +1200

    s4/winbind/idmap: check the right variable (CID 1272950)
    
    Signed-off-by: Douglas Bagnall <[email protected]>
    Reviewed-by: Andreas Schneider <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

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

Summary of changes:
 pidl/lib/Parse/Pidl/Samba4/Python.pm           | 5 +++++
 source4/dsdb/samdb/ldb_modules/password_hash.c | 8 ++++----
 source4/lib/policy/gp_filesys.c                | 1 +
 source4/winbind/idmap.c                        | 2 +-
 4 files changed, 11 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm 
b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 344f48987d1..76a094b625b 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -1947,6 +1947,11 @@ sub ConvertObjectFromPythonLevel($$$$$$$$$)
                if ($need_deref == 1) {
                        my $ndr_pointer_typename = 
$self->import_type_variable("samba.dcerpc.base", "ndr_pointer");
                        $self->pidl("$py_var = 
py_dcerpc_ndr_pointer_deref($ndr_pointer_typename, $py_var);");
+                       $self->pidl("if ($py_var == NULL) {");
+                       $self->indent;
+                        $self->pidl($fail);
+                       $self->deindent;
+                       $self->pidl("}");
                }
                unless ($nl->{TYPE} eq "DATA" and 
Parse::Pidl::Typelist::scalar_is_reference($nl->{DATA_TYPE})) {
                        $var_name = get_value_of($var_name);
diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c 
b/source4/dsdb/samdb/ldb_modules/password_hash.c
index 00f21307d90..bfdfa51595a 100644
--- a/source4/dsdb/samdb/ldb_modules/password_hash.c
+++ b/source4/dsdb/samdb/ldb_modules/password_hash.c
@@ -2456,8 +2456,8 @@ static int setup_password_fields(struct 
setup_password_fields_io *io)
 {
        struct ldb_context *ldb = ldb_module_get_ctx(io->ac->module);
        struct loadparm_context *lp_ctx =
-               lp_ctx = talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
-                                        struct loadparm_context);
+               talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
+                               struct loadparm_context);
        int ret;
 
        ret = setup_last_set_field(io);
@@ -2708,8 +2708,8 @@ static int check_password_restrictions(struct 
setup_password_fields_io *io, WERR
        struct ldb_context *ldb = ldb_module_get_ctx(io->ac->module);
        int ret;
        struct loadparm_context *lp_ctx =
-               lp_ctx = talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
-                                        struct loadparm_context);
+               talloc_get_type(ldb_get_opaque(ldb, "loadparm"),
+                               struct loadparm_context);
 
        *werror = WERR_INVALID_PARAMETER;
 
diff --git a/source4/lib/policy/gp_filesys.c b/source4/lib/policy/gp_filesys.c
index 5a300f134fe..eaae5b79230 100644
--- a/source4/lib/policy/gp_filesys.c
+++ b/source4/lib/policy/gp_filesys.c
@@ -486,6 +486,7 @@ static NTSTATUS push_recursive (struct gp_context *gp_ctx, 
const char *local_pat
                                        DBG_ERR("read failed with errno %s\n",
                                                strerror(errno));
                                        status = NT_STATUS_UNSUCCESSFUL;
+                                       close(local_fd);
                                        goto done;
                                }
                                smbcli_write(gp_ctx->cli->tree, remote_fd, 0,
diff --git a/source4/winbind/idmap.c b/source4/winbind/idmap.c
index b6fd8aa45e1..c4039be473a 100644
--- a/source4/winbind/idmap.c
+++ b/source4/winbind/idmap.c
@@ -645,7 +645,7 @@ static NTSTATUS idmap_sid_to_xid(struct idmap_context 
*idmap_ctx,
                }
 
                vals = talloc_array(tmp_ctx, struct ldb_val, 2);
-               if (els == NULL) {
+               if (vals == NULL) {
                        status = NT_STATUS_NO_MEMORY;
                        goto failed;
                }


-- 
Samba Shared Repository

Reply via email to