commit:     87fa39d4afc36a62de9f2b21b0c11af9cf6a5889
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Apr  4 18:28:45 2025 +0000
Commit:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Apr  4 18:28:45 2025 +0000
URL:        https://gitweb.gentoo.org/proj/pambase.git/commit/?id=87fa39d4

Eliminate local_users_only variable

Replace with inline conditional in the template.

Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>

 pambase.py                | 4 ----
 templates/system-auth.tpl | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/pambase.py b/pambase.py
index 2e6546c..994e4db 100755
--- a/pambase.py
+++ b/pambase.py
@@ -94,7 +94,6 @@ def process_args(args):
         "unix_authtok",
         "unix_extended_encryption",
         "likeauth",
-        "local_users_only",
     ]
 
     # create a blank dictionary
@@ -109,9 +108,6 @@ def process_args(args):
     if args.krb5:
         output["krb5_params"] = "{0} ignore_root 
try_first_pass".format("debug").strip()
 
-    if args.sssd:
-        output["local_users_only"] = "local_users_only"
-
     if args.yescrypt:
         output["unix_extended_encryption"] = "yescrypt shadow"
     elif args.sha512:

diff --git a/templates/system-auth.tpl b/templates/system-auth.tpl
index 97aedd0..1c24c17 100644
--- a/templates/system-auth.tpl
+++ b/templates/system-auth.tpl
@@ -55,7 +55,7 @@ password      required        pam_passwdqc.so 
config=/etc/security/passwdqc.conf
 {% endif %}
 
 {% if pwquality %}
-password       required        pam_pwquality.so {{ 
local_users_only|default('', true ) }}
+password       required        pam_pwquality.so {% if sssd 
%}local_users_only{% endif %}
 {% endif %}
 
 {% if pwhistory %}

Reply via email to