[SSSD] [sssd PR#128][synchronized] Fix group renaming issue when "id_provider = ldap" is set

2018-03-06 Thread fidencio
   URL: https://github.com/SSSD/sssd/pull/128
Author: fidencio
 Title: #128: Fix group renaming issue when "id_provider = ldap" is set
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/128/head:pr128
git checkout pr128
From cbccc1a1b89e996e375d59be445a09d1eb1a36ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= 
Date: Fri, 16 Feb 2018 13:55:53 +0100
Subject: [PATCH 01/15] NSS: Add InvalidateGroupById handler
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

There are some situations where, from the backend, the NSS responder
will have to be notified to invalidate a group.

In order to achieve this in a clean way, let's add the
InvalidateGroupById handler and make use of it later in this very same
series.

Related:
https://pagure.io/SSSD/sssd/issue/2653

Signed-off-by: Fabiano FidĂȘncio 
---
 src/responder/nss/nss_iface.c   | 16 ++
 src/responder/nss/nss_iface.xml |  3 +++
 src/responder/nss/nss_iface_generated.c | 38 +
 src/responder/nss/nss_iface_generated.h |  5 +
 4 files changed, 62 insertions(+)

diff --git a/src/responder/nss/nss_iface.c b/src/responder/nss/nss_iface.c
index 415af9550..805e4fcdf 100644
--- a/src/responder/nss/nss_iface.c
+++ b/src/responder/nss/nss_iface.c
@@ -199,12 +199,28 @@ int nss_memorycache_update_initgroups(struct sbus_request *sbus_req,
 return iface_nss_memorycache_UpdateInitgroups_finish(sbus_req);
 }
 
+int nss_memorycache_invalidate_group_by_id(struct sbus_request *sbus_req,
+   void *data,
+   gid_t gid)
+{
+struct resp_ctx *rctx = talloc_get_type(data, struct resp_ctx);
+struct nss_ctx *nctx = talloc_get_type(rctx->pvt_ctx, struct nss_ctx);
+
+DEBUG(SSSDBG_TRACE_LIBS,
+  "Invalidating group %"PRIu32" from memory cache\n", gid);
+
+sss_mmap_cache_gr_invalidate_gid(nctx->grp_mc_ctx, gid);
+
+return iface_nss_memorycache_InvalidateGroupById_finish(sbus_req);
+}
+
 struct iface_nss_memorycache iface_nss_memorycache = {
 { _nss_memorycache_meta, 0 },
 .UpdateInitgroups = nss_memorycache_update_initgroups,
 .InvalidateAllUsers = nss_memorycache_invalidate_users,
 .InvalidateAllGroups = nss_memorycache_invalidate_groups,
 .InvalidateAllInitgroups = nss_memorycache_invalidate_initgroups,
+.InvalidateGroupById = nss_memorycache_invalidate_group_by_id,
 };
 
 static struct sbus_iface_map iface_map[] = {
diff --git a/src/responder/nss/nss_iface.xml b/src/responder/nss/nss_iface.xml
index 27aae0197..4d8cf14f9 100644
--- a/src/responder/nss/nss_iface.xml
+++ b/src/responder/nss/nss_iface.xml
@@ -14,5 +14,8 @@
 
 
 
+
+
+
 
 
diff --git a/src/responder/nss/nss_iface_generated.c b/src/responder/nss/nss_iface_generated.c
index 4a8b704da..8d5a4584b 100644
--- a/src/responder/nss/nss_iface_generated.c
+++ b/src/responder/nss/nss_iface_generated.c
@@ -12,6 +12,9 @@
 /* invokes a handler with a 'ssau' DBus signature */
 static int invoke_ssau_method(struct sbus_request *dbus_req, void *function_ptr);
 
+/* invokes a handler with a 'u' DBus signature */
+static int invoke_u_method(struct sbus_request *dbus_req, void *function_ptr);
+
 /* arguments for org.freedesktop.sssd.nss.MemoryCache.UpdateInitgroups */
 const struct sbus_arg_meta iface_nss_memorycache_UpdateInitgroups__in[] = {
 { "user", "s" },
@@ -44,6 +47,18 @@ int iface_nss_memorycache_InvalidateAllInitgroups_finish(struct sbus_request *re
  DBUS_TYPE_INVALID);
 }
 
+/* arguments for org.freedesktop.sssd.nss.MemoryCache.InvalidateGroupById */
+const struct sbus_arg_meta iface_nss_memorycache_InvalidateGroupById__in[] = {
+{ "gid", "u" },
+{ NULL, }
+};
+
+int iface_nss_memorycache_InvalidateGroupById_finish(struct sbus_request *req)
+{
+   return sbus_request_return_and_finish(req,
+ DBUS_TYPE_INVALID);
+}
+
 /* methods for org.freedesktop.sssd.nss.MemoryCache */
 const struct sbus_method_meta iface_nss_memorycache__methods[] = {
 {
@@ -74,6 +89,13 @@ const struct sbus_method_meta iface_nss_memorycache__methods[] = {
 offsetof(struct iface_nss_memorycache, InvalidateAllInitgroups),
 NULL, /* no invoker */
 },
+{
+"InvalidateGroupById", /* name */
+iface_nss_memorycache_InvalidateGroupById__in,
+NULL, /* no out_args */
+offsetof(struct iface_nss_memorycache, InvalidateGroupById),
+invoke_u_method,
+},
 { NULL, }
 };
 
@@ -86,6 +108,22 @@ const struct sbus_interface_meta iface_nss_memorycache_meta = {
 sbus_invoke_get_all, /* GetAll invoker */
 };
 
+/* invokes a handler with a 'u' DBus signature */
+static int invoke_u_method(struct 

[SSSD] [sssd PR#476][comment] IPA: Handle empty nisDomainName

2018-03-06 Thread fidencio
  URL: https://github.com/SSSD/sssd/pull/476
Title: #476: IPA: Handle empty nisDomainName

fidencio commented:
"""
@lslebodn, please, I've asked you before, please, **move on**.

You have already caused enough damage by deliberately blocking my work (or 
anything I've tried to do in the project), offending me publicly in PRs ...

I sincerely don't understand why a person who's **not** a maintainer of the 
project **nor** part of the team has the rights to be adding/removing labels.
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/476#issuecomment-370954252
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org


[SSSD] [sssd PR#528][comment] NSS: Adjust netgroup setnetgrent cache lifetime if midpoint refresh is used

2018-03-06 Thread fidencio
  URL: https://github.com/SSSD/sssd/pull/528
Title: #528: NSS: Adjust netgroup setnetgrent cache lifetime if midpoint 
refresh is used

fidencio commented:
"""
I'm removing the "Accepted" label as my question has been **bulldozed** by a 
former contributor who's not interested (and never been) to do anything else 
but run his personal vendetta against me (proved by blocking my work before, 
offending me on PRs and now just bulldozing my questions ...).
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/528#issuecomment-370953530
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org


[SSSD] [sssd PR#528][-Accepted] NSS: Adjust netgroup setnetgrent cache lifetime if midpoint refresh is used

2018-03-06 Thread fidencio
  URL: https://github.com/SSSD/sssd/pull/528
Title: #528: NSS: Adjust netgroup setnetgrent cache lifetime if midpoint 
refresh is used

Label: -Accepted
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org


[SSSD] [sssd PR#527][comment] PEP8 Fixes and enable PEP8 check in CI

2018-03-06 Thread fidencio
  URL: https://github.com/SSSD/sssd/pull/527
Title: #527: PEP8 Fixes and enable PEP8 check in CI

fidencio commented:
"""
@lslebodn, hopefully at some point you'll understand that your opinion is not 
always the right one, that respecting your peers' opinions is also something 
valuable and that whoever disagrees with you is not automatically wrong.

Anyways, thanks a lot for your input.
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/527#issuecomment-370952909
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org