Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • Samba Samba
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Merge requests 156
    • Merge requests 156
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • The Samba TeamThe Samba Team
  • SambaSamba
  • Merge requests
  • !1826

BUG: smbd: return correct error in mkdir_internal

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Sachin Prabhu requested to merge samba-team/devel/samba:spuiuk/mkdir_internal_errno into master Mar 09, 2021
  • Overview 6
  • Commits 1
  • Pipelines 2
  • Changes 1

Commit - 405d1164 smbd: open a pathref fsp on the parent directory adds a TALLOC_FREE() call which clears out the errno required by the subsequent map_nt_error_from_unix() call. The errno is possibly cleared by a destructor called by the TALLOC_FREE(). This results in an incorrect nt_status being returned.

This is causing failures in smb2.create.mkdir-dup with glusterfs as the backing fs.

Fix this by calling map_nt_error_from_unix(errno) before the TALLOC_FREE() call is made.

I have tested this patch using smbtorture smb2.create.mkdir-dup test with glusterfs as the backend filesystem for both replicate and disperse volumes.

BZ: https://bugzilla.samba.org/show_bug.cgi?id=14662

Edit: Add BZ

Checklist

  • Commits have Signed-off-by: with name/author being identical to the commit author
  • (optional) This MR is just one part towards a larger feature.
  • (optional, if backport required) Bugzilla bug filed and BUG: tag added
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated
  • CI timeout is 3h or higher (see Settings/CICD/General pipelines/ Timeout)

Reviewer's checklist:

  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to README.Coding.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code
Edited Mar 10, 2021 by Sachin Prabhu
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: spuiuk/mkdir_internal_errno