<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 09/16/2014 07:25 PM, Nathaniel
      McCallum wrote:<br>
    </div>
    <blockquote cite="mid:1410888358.3889.13.camel@redhat.com"
      type="cite">
      <pre wrap="">On Tue, 2014-09-16 at 19:24 +0200, thierry bordaz wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">On 09/15/2014 09:05 PM, Nathaniel McCallum wrote:

</pre>
        <blockquote type="cite">
          <pre wrap="">This plugin ensures that all counter/watermark operations are atomic
and never decrement. Also, deletion is not permitted.

<a class="moz-txt-link-freetext" href="https://fedorahosted.org/freeipa/ticket/4494">https://fedorahosted.org/freeipa/ticket/4494</a>


_______________________________________________
Freeipa-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-devel@redhat.com">Freeipa-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-devel">https://www.redhat.com/mailman/listinfo/freeipa-devel</a>
</pre>
        </blockquote>
        <pre wrap="">Hello Nathaniel,

        Starting looking at it, I have just a question about
        sanitize_input.
        If the modification (replace) is related to counter/watermark,
        it triggers an internal search on the target entry itself.
        The original/modified entry is also present in the pblock. The
        internal search will check the filter but except that what is
        the benefit vs
        taking the entry directly in the pblock.
</pre>
      </blockquote>
      <pre wrap="">
I didn't know the entry was already in the pblock. What loads it? And
when? How do I access it?

Nathaniel

</pre>
    </blockquote>
    <font face="Times New Roman, Times, serif">Hello Nathaniel</font>,<br>
    <br>
    <blockquote><font face="Times New Roman, Times, serif">You may
        retrieve the entry with slapi_pblock_get(pb, SLAPI_ENTRY_PRE_OP,
        &e) [Slapi_Entry *e;].<br>
        This is the original entry, before the  other be-preop plugin
        are called and modifications occured.<br>
        <br>
        If you need to check that the entry match a filter you may also
        do:<br>
            filter_str =
slapi_ch_strdup("(|(objectClass=ipatokenHOTP)(objectClass=ipatokenTOTP))");<br>
            filter = slapi_str2filter(filter_str);<br>
            if (slapi_filter_test_simple(e, filter) != 0) {<br>
                /* do not match */<br>
            }<br>
        <br>
        or directly checking the objectclass values
        slapi_entry_attr_find/slapi_attr_value_find</font><br>
      <br>
      <font face="Times New Roman, Times, serif">thanks<br>
        thierry</font><br>
    </blockquote>
  </body>
</html>