1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

r3787: a function to generate a random GUID

metze
(This used to be commit 8bd2e3cb4e)
This commit is contained in:
Stefan Metzmacher 2004-11-16 13:14:02 +00:00 committed by Gerald (Jerry) Carter
parent 4af8f37d64
commit c3eb37f292

View File

@ -1195,6 +1195,16 @@ NTSTATUS GUID_from_string(const char *s, struct GUID *guid)
return NT_STATUS_OK;
}
/* generate a random GUID */
struct GUID GUID_random(void)
{
struct GUID guid;
generate_random_buffer((uint8_t *)&guid, sizeof(guid));
return guid;
}
/*
its useful to be able to display these in debugging messages
*/