saltstack/salt — pull request #9813 by kaithar (2014-01-17 21:21:32+00:00)
Title: config.manage_mode(): Changing zfill(3) to zfill(4) so that we get '0700' instead of '700'

There is a possibility of this causing regressions, it will work correctly where both params are passed through it or where it's being compared with stat() output. If there is code expecting a '700' style permission it will fail. Realistically, '0700' is correct so the other code needs to be fixed.

I've updated the tests, including uncommenting the one that actually tests for this case.

This is to correct the following impossible to resolve state:
```
# `---> salt 'test1' file.check_perms /root '{}' root root \'0700\'
test1:
----------
- changes:
----------
mode:
700
- comment:

- name:
/root
- result:
True
----------
- lgroup:
root
- lmode:
0700
- luser:
root
```

Calls to managed permissions will never succeed without this.