Setting 'UMask' or 'IntHosts' in .conf file result in errors

Bug #1939598 reported by Removed by request
0
Affects Status Importance Assigned to Milestone
SPF Engine
Fix Released
High
Scott Kitterman
spf-engine (Debian)
Fix Released
Unknown

Bug Description

This description is regarding the FreeBSD 13.0-RELEASE-p3 port. However, the bug exists in HEAD.

I was able to install this port and bring up the server right away but I had a lot of problems getting the permissions for the socket (/var/run/pyspf-milter/pyspf-milter.sock) correct. My instance of postfix runs as user:group ‘postfix:maildrop’. The default permissions on the pyspf-milter socket are

       srwxrwx—

which prevented postfix from communicating with the milter. I discovered the config file option ‘UMask’ but pyspf-milter balked when I tried to set it. The error that I kept getting was:

       'str' object is not callable

I’m not anything close to a Python programmer but I started to look at the problem. I discovered a couple of typos in

       policydspfsupp.py

I fixed them. I also implemented a new feature that allows you to specify integer values in the .conf file in decimal, hex, octal & binary (it's canonical to specify a UMask in octal). The corrected/enhanced file is attached.

As I said, I'm not anything close to a Python programmer so feel free to modify my afternoon's worth of quick/dirty work into something more elegant if you like.

I also notified the FreeBSD maintainer but have not received a response.

-- cc

description: updated
description: updated
Revision history for this message
Removed by request (removed8907216) wrote :

Since you're obviously not interested, I'm removing this.

-- cc

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

I wish they hadn't done that. If anyone else has information on this, I am interested.

Revision history for this message
Capone Cicero (caponecicero) wrote :

Here's the patch back.

-- cc

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

Thanks for finding that.

Changed in spf-engine:
assignee: nobody → Scott Kitterman (kitterman)
importance: Undecided → High
milestone: none → 3.0.0
status: New → Triaged
Changed in spf-engine (Debian):
status: Unknown → Confirmed
Revision history for this message
Scott Kitterman (kitterman) wrote :

Fixed the bug based on the patch. The numeric format conversion in the patch didn't actually work and isn't really needed since UMask is evaluated digit by digit, storing an octal value in an int works fine. Fiix will be in v3.0.0.

Changed in spf-engine:
status: Triaged → Fix Committed
Changed in spf-engine:
status: Fix Committed → Fix Released
Changed in spf-engine (Debian):
status: Confirmed → Fix Released
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.