TDB signed vs. unsigned char (was Re: [SCM] Samba Shared Repository
- branch master updated - release-4-0-0alpha7-554-gf942cb6)
Stefan (metze) Metzmacher
metze at samba.org
Wed Apr 1 10:39:28 GMT 2009
Hi Jeremy,
> commit f942cb616e981e5370fab122969127de0910b58b
> Author: Jeremy Allison <jra at samba.org>
> Date: Wed Mar 18 15:44:13 2009 -0700
>
> Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly.
> This is a really nasty one to fix as in order to successfully update the
> passdb.tdb we must do the equivalent of a tdbbackup to move to the new hash
> values before we do the upgrade.
> Jeremy.
Sorry, that I "introducted" the change that triggers with problems...
But it shows once again that we really need to use 'uint8_t *' instead
of 'char *' to represent raw bytes! As the same problem is there,
if we copy passdb.tdb from a machine where char is signed to a machine
were char is unsigned, while using exactly the same source on both machines.
So we should really try to get rid of all 'char *buf' pointers we have,
but as the above example shows we need to be extremly careful and add
explicit cast in the right spots in order to avoid upgrade problems.
metze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.samba.org/archive/samba-technical/attachments/20090401/88976449/signature.bin
More information about the samba-technical
mailing list