[prev in list] [next in list] [prev in thread] [next in thread]
List: samba-technical
Subject: [PATCH] Add for support for pam_winbind warn_pwd_expire
From: Marcin Mogielnicki <Marcin.Mogielnicki () redbulltechnology ! com>
Date: 2014-11-28 14:25:03
Message-ID: 1d605c564e8b42a1b3e2ceb408afd4b2 () mk-svr-exmbx01 ! f1 ! local
[Download RAW message or body]
Hi,
This is something I keep patching for every release of samba for years, gnome login \
manager crashes having any messages emited by pam stack. Works against 4.2.0rc2
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.
Regards,
Marcin Mogielnicki
--- a/nsswitch/pam_winbind.c.orig 2014-11-28 13:48:04.000000000 +0000
+++ b/nsswitch/pam_winbind.c 2014-11-28 13:52:52.000000000 +0000
@@ -508,6 +508,9 @@
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 @@
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;
______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
["pam_winbind_warn_pwd_expire.patch" (application/octet-stream)]
--- a/nsswitch/pam_winbind.c.orig 2014-11-28 13:48:04.000000000 +0000
+++ b/nsswitch/pam_winbind.c 2014-11-28 13:52:52.000000000 +0000
@@ -508,6 +508,9 @@
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 @@
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;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic