On (17/08/15 10:32), Jakub Hrozek wrote:
On Sun, Aug 16, 2015 at 05:59:22PM +0200, Pavel Březina wrote:
>
https://fedorahosted.org/sssd/ticket/2737
>
> Hi, it should work... :-) However, I wanted to make import as transaction so
> no changes are made if some error occurs, but I had some troubles with it so
> I gave up eventually.
Thanks a lot for the patches. I didn't do any review yet, just scrolled
through them.
My first reaction was that the second patch should be split up and at
least the colondb should be unit tested.
btw did you get inspired by some existing code, like libuser or
shadow-utils with the colondb?
Is there a design page for this?
Maybe I missed something but I haven't noticed any discussion about
export format for "local views".
I'm not very happy with custom format. Yes, it's already late
because patches are ready and deadline is comming.
Did you consider a ldif format?
libldb already provide such functions.
[alcik@unused-4-233][~/projects/sssd]$objdump -T /usr/lib64/libldb.so | grep ldb_ldif
000000000000afe0 g DF .text 0000000000000641 LDB_1.1.0 ldb_ldif_parse_modrdn
000000000000afc0 g DF .text 0000000000000008 LDB_0.9.10 ldb_ldif_write
000000000000bcc0 g DF .text 000000000000000f LDB_1.1.5 ldb_ldif_read_file_state
000000000000be00 g DF .text 0000000000000019 LDB_0.9.10 ldb_ldif_message_string
000000000000bd40 g DF .text 0000000000000054 LDB_1.1.12
ldb_ldif_write_redacted_trace_string
000000000000bcd0 g DF .text 0000000000000015 LDB_0.9.10 ldb_ldif_read_file
000000000000bd20 g DF .text 000000000000001f LDB_0.9.10 ldb_ldif_write_file
000000000000b630 g DF .text 0000000000000683 LDB_0.9.10 ldb_ldif_read
000000000000afd0 g DF .text 000000000000000f LDB_0.9.10 ldb_ldif_read_free
000000000000bda0 g DF .text 0000000000000054 LDB_0.9.10 ldb_ldif_write_string
000000000000bcf0 g DF .text 000000000000002b LDB_0.9.10 ldb_ldif_read_string
e.g.
ldb_ldif_message_string can be used to format "struct ldb_message" as string
/*
Produce a string form of an ldb message
convenient function to turn a ldb_message into a string. Useful for
debugging
*/
char *ldb_ldif_message_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
enum ldb_changetype changetype,
const struct ldb_message *msg);
LS