Skip to content

Commit

Permalink
- disable nscd caching when sssd is used (bnc#772944)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuchome committed Oct 11, 2012
1 parent 2fde1d4 commit 4c829a3
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.23.0
2.23.1
3 changes: 2 additions & 1 deletion agents/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#

scrconf_DATA = ldap_conf.scr \
cfg_ldap.scr
cfg_ldap.scr \
nscd_conf.scr

fillup_DATA = sysconfig.ldap

Expand Down
6 changes: 6 additions & 0 deletions package/yast2-ldap-client.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Oct 11 10:31:53 CEST 2012 - jsuchome@suse.cz

- disable nscd caching when sssd is used (bnc#772944)
- 2.23.1

-------------------------------------------------------------------
Wed Oct 10 15:19:26 CEST 2012 - jsuchome@suse.cz

Expand Down
24 changes: 24 additions & 0 deletions src/Ldap.ycp
Original file line number Diff line number Diff line change
Expand Up @@ -2651,6 +2651,29 @@ Select another one.
return nds;
}

/**
* Adpat passwd and group cache in /etc/nscd.conf
* Caching should be disabled with sssd on
* @param start_sssd if sssd will be started
*/
boolean WriteNscdCache (boolean start_sssd) {

list<string> enable_cache = (list<string>) SCR::Read (.etc.nscd_conf.v.enable-cache);
enable_cache = maplist (string sect, enable_cache, {
list<string> l = filter (string part, splitstring (sect, " \t"), ``(part != ""));
if (l[0]:"" == "passwd" || l[0]:"" == "group")
{
return sformat ("%1\t\t%2", l[0]:"", start_sssd ? "no": "yes");
}
return sect;
});
if (enable_cache == [] || enable_cache == nil)
{
return false;
}
return SCR::Write (.etc.nscd_conf.v.enable-cache, enable_cache);
}

/**
* Saves LDAP configuration.
* @param abort block for abort
Expand Down Expand Up @@ -2777,6 +2800,7 @@ Select another one.

// default value is 'yes'
WriteLdapConfEntry ("tls_checkpeer", tls_checkpeer == "yes" ? nil : tls_checkpeer);
WriteNscdCache (start && sssd);
}
if (start) // ldap used for authentocation
{
Expand Down

0 comments on commit 4c829a3

Please sign in to comment.