[SSSD] [PATCH] sysdb: try dealing with binary-content attributes

Jan Engelhardt jengelh at inai.de
Mon Feb 25 11:28:38 UTC 2013


On Monday 2013-02-25 11:29, Jakub Hrozek wrote:
>> 
>> My problem was not the lack of termination, but that something that
>> is not a logical string was fed to a string function. :)
>> 
>
>Ah, sorry, then I misunderstood you on the IRC. I was under the
>impression that strlen() returned bogus data b/c the attribute was not
>null-terminated.

That might happen _in addition_ to it, yes. Depending on the LDAP
library implementation.


>> >> +int sysdb_attrs_add_mem(struct sysdb_attrs *attrs, const char *name,
>> >
>> >Since we use talloc all around the place in the sssd, the _mem suffix
>> >evocates that this function would add contents of a memory context
>> 
>> Well it does add contents of a memory region, does it not?[..].
>
>Well, "arbitrary data" implies even C structures to me and I doubt
>they'd be stored in LDAP :-)

You ain't seen nothing yet. People store certificates and jpegPhotos
in there. I have no idea what loginAllowedTimeMap is. Looks like a 
bitmap, could be very well some structure for which Novell eDirectory 
has defined a portable C structure declaration.


>As I said, this is mostly a matter of personal preference, though. I'll
>accept the patch even with _mem and void*.
>Are you going to send another iteration that uses the new call in
>sdap_parse_deref() or shall I do it on your behalf?

I have an update.


The following changes since commit ad65d4ef017e87c1be4b1054e1276f5256a77bfc:

  subdomains: replace invalid characters with underscore in krb5 mapping file
 name (2013-02-14 19:33:23 +0100)

are available in the git repository at:

  git://git.inai.de/sssd master

for you to fetch changes up to d388d7d70cfbc3c68976c46e729436528b979e65:

  sysdb: try dealing with binary-content attributes (2013-02-22 18:37:55 +0100)

----------------------------------------------------------------
Jan Engelhardt (1):
      sysdb: try dealing with binary-content attributes

 src/db/sysdb.c                  |   10 ++++++++++
 src/db/sysdb.h                  |    2 ++
 src/providers/ldap/sdap.c       |    7 +++----
 src/providers/ldap/sdap_async.c |    4 ++--
 4 files changed, 17 insertions(+), 6 deletions(-)



More information about the sssd-devel mailing list