[SAMBA3] tdb signed vs. unsigned char *

Stefan (metze) Metzmacher metze at samba.org
Fri Mar 23 11:51:33 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I created a patch to change TDB_DATA to contain
an unsigned char *dptr instead of char *.
When this patch is in, I'd like to sync tdb with samba4,
there are merges in both directions needed...

there are the following functions:
make_tdb_data(), string_tdb_data() and string_term_tdb_data().

the string_term_tdb_data() uses strlen()+1 and string_tdb_data()
just strlen(), that's really ugly, but existing code is wildly mixed here...

because I don't want to add ugly (const char *) to very strlen(), I
changed the code to use the wrapper functions or use the
tdb_*_bystring() functions, which assume strlen()+1.

This needs to be reviewed very,very careful!!!

Please take a closer look that I don't changed from strlen() to
strlen()+1, as this would break existing installations!

This isn't for 3.0.25!:-)

metze
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFGA79Fm70gjA5TCD8RAup/AKCs/EE+m6NQsDzSM6jfmOTPmR3VYwCfUZUY
R7JupJmzq+eknIaNhCtB53k=
=7nuS
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tdb-merge-07.diff
Type: text/x-patch
Size: 120113 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070323/b596a9fe/tdb-merge-07-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tdb-merge-07.diff.sig
Type: application/pgp-signature
Size: 65 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20070323/b596a9fe/tdb-merge-07.diff-0001.bin


More information about the samba-technical mailing list