1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

19 Commits

Author SHA1 Message Date
Jelmer Vernooij
d875327b10 Move NS_GUID_string and NS_GUID_from_string to dsdb-common. 2012-03-20 13:54:07 +01:00
Jelmer Vernooij
0b6dea9d66 libndr: Define trivial is_valid_policy_hnd as macro.
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20 13:54:07 +01:00
Jelmer Vernooij
b4d35bee38 libndr: Rename policy_handle_empty to ndr_policy_handle_empty.
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20 13:54:07 +01:00
Jelmer Vernooij
f92b05b955 libndr: Rename policy_handle_equal to ndr_policy_handle_equal.
This makes the NDR namespace a bit clearer, in preparation of ABI checking.
2012-03-20 13:54:07 +01:00
Günther Deschner
947ba448a4 libndr: apply some const and make is_valid_policy_hnd a callback to policy_handle_empty.
Guenther
2011-02-08 14:05:36 +01:00
Günther Deschner
be5edba117 libndr: share some uuid helpers.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Feb  8 09:52:56 CET 2011 on sn-devel-104
2011-02-08 09:52:56 +01:00
Andreas Schneider
e52f3d8637 s3-librpc: Fixed GUID_from_data_blob() with length of 32.
If we hit the case that the blob length is 32. The code goes to the end
of the function and generates a GUID with garbage.
So try to convert the blob to the GUID and return.
2010-06-29 11:12:12 +02:00
Andreas Schneider
dc2e41a16a librpc: Use switch in GUID_from_data_blob(). 2010-06-28 10:18:12 +02:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Andrew Tridgell
a106fefcfb librpc: fixed the GUID_compare() function
When comparing two unsigned values you can't just subtract
them.

Imagine you are comparing: "uint32_t u1" and "uint32_t u2". If you use
"u1 - u2" and u2 is zero, then the signed integer result will depend
on the top bit of u1.

This error occurs in a few places in Samba. For DRS replication it
resulted in corrupt uptodateness vectors.
2009-12-21 23:41:07 +11:00
Andrew Tridgell
3ce800dcbe libndr: added a GUID_to_ndr_blob() helper function
This can be used in many places that deal with GUIDs
2009-12-10 17:51:28 +11:00
Andrew Tridgell
effff54426 librpc: split out a separate GUID_from_ndr_blob() function
This will simplify many of the places that deal with NDR formatted
GUIDs
2009-12-10 17:51:26 +11:00
Andrew Bartlett
fd5174e88c lib/util Split data_blob_hex_string() into upper and lower
Rather than have a repeat of the bugs we found at the plugfest where
hexidecimal strings must be in upper or lower case in particular
places, ensure that each caller chooses which case they want.

This reverts most of the callers back to upper case, as things were
before tridge's patch.  The critical call in the extended DN code is
of course handled in lower case.

Andrew Bartlett
2009-11-12 16:34:01 +11:00
Volker Lendecke
dd0e16b1d5 uuid.c: Remove some dead code 2009-11-01 23:50:04 +01:00
Andrew Bartlett
18c095e5d8 Don't trust sscanf not to run off the end of the string
The memory allocations here are wasteful, but they do nicely ensure we
cannot walk off the end of the DATA_BLOB that might be a string, or
might be binary and might not be NULL terminated.

Andrew Bartlett
2008-12-20 14:44:39 +11:00
Stefan Metzmacher
2cff27cefd librpc/ndr: add GUID_hexstring()
metze
2008-11-16 16:37:22 +01:00
Stefan Metzmacher
69af236e77 librpc/ndr: let GUID_from_data_blob() accept a ndr blob or a hex string too
metze
2008-11-16 16:24:34 +01:00
Andrew Bartlett
536de25fae Add a new function to parse a DATA_BLOB into a GUID
The reason for this new function is to ensure the length is not
discarded when the input is a ldb_val (aka DATA_BLOB) in ldb.

Andrew Bartlett
2008-11-16 16:24:33 +01:00
Jelmer Vernooij
58f844ab54 Share uuid implementations. 2008-10-13 15:23:35 +02:00