Created attachment 181831 [details] Patch to make salt.modules.pw_user.get_loginclass return string rather than dict sysutils/py-salt: Add patch to fix salt.modules.pw_user.chloginclass Make salt.modules.pw_user.get_loginclass return string rather than dict This aligns with salt.modules.useradd.get_loginclass which is used for OpenBSD. This fixes salt.modules.pw_user.chloginclass which is used for FreeBSD and expects a string to be returned. This was therefore returning False even after successfully changing the loginclass. This also fixes salt.states.user.present on FreeBSD when loginclass is set.
This has also been submitted as a pull request upstream: https://github.com/saltstack/salt/pull/40714 Seeking maintainer feedback to commit this fix to the ports tree until it is incorporated upstream and the next version of salt is released.
Thanks for the patch!
Committed. Thanks for approving.
A commit references this bug: Author: woodsb02 Date: Mon Apr 24 13:09:34 UTC 2017 New revision: 439289 URL: https://svnweb.freebsd.org/changeset/ports/439289 Log: sysutils/py-salt: Make salt.modules.pw_user.get_loginclass return string rather than dict. This fixes salt.modules.pw_user.chloginclass which is used for FreeBSD and expects a string to be returned. This was therefore returning False even after successfully changing the loginclass. This also fixes salt.states.user.present on FreeBSD when loginclass is set. PR: 218694 Approved by: Christer Edwards <christer.edwards@gmail.com> (maintainer) Changes: head/sysutils/py-salt/Makefile head/sysutils/py-salt/files/patch-salt_modules_pw__user.py