change to acl_read module for supporting dirsync module
Matthieu Patou
mat at samba.org
Fri Mar 11 13:43:10 MST 2011
Hi Matthias,
I'm starting to clean my code and fix stuff (ie. like adding more checks).
So I'm paying attention to your remarks in anycase but
> * I've also performed a quick review of the control implementation
> and I've noticed some type problems:
> o The counter variables aren't appropriate yet. LDB objects
> are counted as "unsigned int". That means the following in
> the downto manner: for (i >= ...num_values - 1; i !=
> (unsigned) - 1; i--).
Ok but well that's a bit dirty don't you think so ? why not casting the
num_values to a (signed) int ? I think can safely assume that we won't
have more than 2^31 attributes in a message (well I hope ;-)).
> o On "for (i=0; i < rmd.ctr.ctr1.count; i++) {" "i" should be
> "uint32_t" since we are working os DSR stuff.
Ok right, in fact I added another var as i is a (un?)signed int used for
ldb_msg_element iteration (paragraph before).
> o "functional_level" in "struct dirsync_control" should be
> typed as "int".
> o "addedAttributes" I would type as "unsigned int" (the same
> as "num_elements" in LDB).
well it was a uint32_t ... but if you think it's really better
--
Matthieu Patou
Samba Team http://samba.org
Private repo http://git.samba.org/?p=mat/samba.git;a=summary
More information about the samba-technical
mailing list