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:
parent
4af8f37d64
commit
c3eb37f292
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user