The branch, master has been updated via 749a50874906ba38f1085065933f2781b81d5dfa (commit) via 72da71acf925ffe4cc87ca2bcba3770af3fe3d8b (commit) via 74046c8054d2afe7da51c1ff09ffd594a9cb8b73 (commit) from d57e67f9eb5a6a05f0e173d48e86dd1fe050635e (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 749a50874906ba38f1085065933f2781b81d5dfa Author: Volker Lendecke <v...@samba.org> Date: Tue Jul 14 18:34:36 2009 +0200 Create a talloc_stackframe for each file in wildcard unlink There might be *many* files to delete commit 72da71acf925ffe4cc87ca2bcba3770af3fe3d8b Author: Volker Lendecke <v...@samba.org> Date: Tue Jul 14 18:34:07 2009 +0200 Create a correct talloc hierarchy in make_sec_acl() commit 74046c8054d2afe7da51c1ff09ffd594a9cb8b73 Author: Volker Lendecke <v...@samba.org> Date: Tue Jul 14 18:33:01 2009 +0200 TALLOC_FREE(sd) in check_open_rights upon an error ----------------------------------------------------------------------- Summary of changes: libcli/security/secacl.c | 2 +- source3/smbd/open.c | 1 + source3/smbd/reply.c | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c index 9373ef5..29afe46 100644 --- a/libcli/security/secacl.c +++ b/libcli/security/secacl.c @@ -51,7 +51,7 @@ struct security_acl *make_sec_acl(TALLOC_CTX *ctx, positive number. */ if ((num_aces) && - ((dst->aces = talloc_array(ctx, struct security_ace, num_aces)) + ((dst->aces = talloc_array(dst, struct security_ace, num_aces)) == NULL)) { return NULL; } diff --git a/source3/smbd/open.c b/source3/smbd/open.c index e01350f..404461f 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -94,6 +94,7 @@ static NTSTATUS check_open_rights(struct connection_struct *conn, "on %s: %s\n", smb_fname_str_dbg(smb_fname), nt_errstr(status))); + TALLOC_FREE(sd); return status; } diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index e35c5bc..4d0a2b8 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -2646,18 +2646,23 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req, while ((dname = ReadDirName(dir_hnd, &offset, &smb_fname->st))) { + TALLOC_CTX *frame = talloc_stackframe(); + if (!is_visible_file(conn, fname_dir, dname, &smb_fname->st, true)) { + TALLOC_FREE(frame); continue; } /* Quick check for "." and ".." */ if (ISDOT(dname) || ISDOTDOT(dname)) { + TALLOC_FREE(frame); continue; } if(!mask_match(dname, fname_mask, conn->case_sensitive)) { + TALLOC_FREE(frame); continue; } @@ -2669,23 +2674,28 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req, if (!smb_fname->base_name) { TALLOC_FREE(dir_hnd); status = NT_STATUS_NO_MEMORY; + TALLOC_FREE(frame); goto out; } status = check_name(conn, smb_fname->base_name); if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(dir_hnd); + TALLOC_FREE(frame); goto out; } status = do_unlink(conn, req, smb_fname, dirtype); if (!NT_STATUS_IS_OK(status)) { + TALLOC_FREE(frame); continue; } count++; DEBUG(3,("unlink_internals: successful unlink [%s]\n", smb_fname->base_name)); + + TALLOC_FREE(frame); } TALLOC_FREE(dir_hnd); } -- Samba Shared Repository