JeffreySmith opened a new pull request, #4163:
URL: https://github.com/apache/ambari/pull/4163
## What changes were proposed in this pull request?
This fixes an inconsistent behaviour between the root and non-root branches
of makedir in sudo.py.
In the root path, the `mode` option is silently dropped, while it is
respected in the non-root path. Since mode is not passed, it will default to
0o777, which is unexpected behaviour when passing some other mode to the
function.
This is the non-root path:
```
def makedir(path, mode):
shell.checked_call(["mkdir", path], sudo=True)
chmod(path, mode)
```
In this path, mode is honoured and set as expected.
## How was this patch tested?
No testing was performed - this just adds the mode parameter to os.mkdir
that was previously silently ignored, but still required.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]