[SSSD] remove nisNetgroupTriple or memberNisNetgroup from server bug sssd did not reflect it.

Stephen Gallagher sgallagh at redhat.com
Fri Jan 20 00:23:05 UTC 2012


On Fri, 2012-01-20 at 08:21 +0800, Joe Jin wrote:
> On 01/20/12 00:17, Stephen Gallagher wrote:
> > On Tue, 2012-01-17 at 10:00 +0800, Joe Jin wrote:
> >> On 01/16/12 20:40, Stephen Gallagher wrote:
> >>> On Mon, 2012-01-16 at 16:48 +0800, Joe Jin wrote:
> >>>> On 01/07/12 06:39, Dmitri Pal wrote:
> >>>>> Do not have a code in front of me that this sounds like a bug in the
> >>>>> error handling of the empty list.
> >>>>> It seems that if the list is not empty the cache is reconciled by if the
> >>>>> content of the netgroup is empty it chooses a different code path rather
> >>>>> than reconciling the content of the group.
> >>>>>
> >>>>> Stephen, Jakub can you please check my theory?
> >>>>
> >>>> I tried to call sysdb_remove_attrs() in either sysdb_add_netgroup() or sdap_save_netgroup(),
> >>>> when the attr empty, but always return FAILED, any comments?
> >>>>
> >>>
> >>> What was the failure error code? Also, did you use SYSDB_MOD_REPLACE or
> >>> SYSDB_MOD_DEL? The latter is probably what you were looking for.
> >>>
> >>
> >> It returned ENOENT(-2) when call sysdb_remove_attrs() in the end of sdap_save_netgroup().
> >> In sysdb_remove_attrs(), it using SYSDB_MOD_DEL for ldb_msg_add_empty:
> >>
> >> 2859         DEBUG(8, ("Removing attribute [%s] from [%s]\n",
> >> 2860                   remove_attrs[i], name));
> >> 2861         lret = ldb_msg_add_empty(msg, remove_attrs[i],
> >> 2862                                  LDB_FLAG_MOD_DELETE, NULL);
> >> 2863         if (lret != LDB_SUCCESS) {
> >> 2864             ret = sysdb_error_to_errno(lret);
> >> 2865             goto done;
> >> 2866         }
> >>
> >> Thanks,
> >> Joe
> > 
> > 
> > Sorry Joe, I thought I replied to this earlier, but either I forgot to
> > do so or it got lost in the mail.
> > 
> > Would you mind attaching the patch you were working with? It might be
> > easier to track down what's going wrong.
> 
> Stephen, as a workaround, I add a empty entry then remove it later, I dont
> think it's a good patch at all, so I did not send to the maillist, if you 
> interesting it I'll send it to you.


Yes, I think I'd like to see it please.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20120119/90220307/attachment.sig>


More information about the sssd-devel mailing list