UMask is decimal

Bug #1945520 reported by David Mandelberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dkimpy-milter
Triaged
Medium
Unassigned

Bug Description

If I'm reading the code right, https://git.launchpad.net/dkimpy-milter/tree/dkimpy_milter/config.py?id=b4da312ea7a6ca46c2e572547e3114a15d74e602#n339 says the UMask is an int, https://git.launchpad.net/dkimpy-milter/tree/dkimpy_milter/config.py?id=b4da312ea7a6ca46c2e572547e3114a15d74e602#n432 uses python's int constructor to parse the string, and https://git.launchpad.net/dkimpy-milter/tree/dkimpy_milter/util.py?id=b4da312ea7a6ca46c2e572547e3114a15d74e602#n89 sets the umask without any conversion. According to https://docs.python.org/3/library/functions.html#int, the default is base 10. int('010') is 10, not 8.

Would it be possible to either specify base=0, so that the config file can use 0o as a prefix for octal, or set base=8 for UMask? (I'm guessing most people will assume that UMask is octal if it's not otherwise specified.)

description: updated
Revision history for this message
Scott Kitterman (kitterman) wrote :

I think that would make sense. The documentation does specify it's an integer, but I agree it would be better to be more "normal" about it.

Changed in dkimpy-milter:
importance: Undecided → Medium
status: New → Triaged
milestone: none → future
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.