The branch, master has been updated
       via  78b7db1 pam_winbind: fix warn_pwd_expire implementation.
      from  816751a s3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id()

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 78b7db18149e7ecd484e4686461e6eb1a41ab5cb
Author: Günther Deschner <g...@samba.org>
Date:   Wed Dec 3 16:55:39 2014 +0100

    pam_winbind: fix warn_pwd_expire implementation.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=9056
    
    warn_pwd_expire parameter is not working as documented in pam_winbind manual
    page. This patch adds missing bit and allows disabling warning message 
fully,
    i.e. setting warn time to zero days.
    
    Guenther
    
    Signed-off-by: Guenther Deschner <g...@samba.org>
    Reviewed-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Guenther Deschner <g...@samba.org>
    
    Autobuild-User(master): Günther Deschner <g...@samba.org>
    Autobuild-Date(master): Wed Dec  3 21:36:49 CET 2014 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 nsswitch/pam_winbind.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index f06f2b5..f1b88cb 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -508,6 +508,9 @@ config_from_pam:
                        ctrl |= WINBIND_CACHED_LOGIN;
                else if (!strcasecmp(*v, "mkhomedir"))
                        ctrl |= WINBIND_MKHOMEDIR;
+               else if (!strncasecmp(*v, "warn_pwd_expire",
+                       strlen("warn_pwd_expire")))
+                       ctrl |= WINBIND_WARN_PWD_EXPIRE;
                else if (type != PAM_WINBIND_CLEANUP) {
                        __pam_log(pamh, ctrl, LOG_ERR,
                                 "pam_parse: unknown option: %s", *v);
@@ -2379,7 +2382,7 @@ static int get_warn_pwd_expire_from_config(struct 
pwb_context *ctx)
        ret = get_config_item_int(ctx, "warn_pwd_expire",
                                  WINBIND_WARN_PWD_EXPIRE);
        /* no or broken setting */
-       if (ret <= 0) {
+       if (ret < 0) {
                return DEFAULT_DAYS_TO_WARN_BEFORE_PWD_EXPIRES;
        }
        return ret;


-- 
Samba Shared Repository

Reply via email to