mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-24 14:49:16 +02:00
parent
154216788e
commit
5bbf299c22
@ -51,7 +51,7 @@ Var
|
||||
|
||||
begin
|
||||
P:=@Buf;
|
||||
fd:=FileOpen(RandomDevice,fmOpenRead);
|
||||
fd:=FileOpen(RandomDevice,fmOpenRead or fmShareDenyNone);
|
||||
Result:=(fd>=0);
|
||||
if Result then
|
||||
Try
|
||||
|
@ -28,7 +28,7 @@ Var
|
||||
|
||||
begin
|
||||
P:=@Buf;
|
||||
fd:=FileOpen('/dev/urandom',fmOpenRead);
|
||||
fd:=FileOpen('/dev/urandom',fmOpenRead or fmShareDenyNone);
|
||||
if (fd>=0) then
|
||||
Try
|
||||
While (NBytes>0) do
|
||||
@ -58,7 +58,7 @@ Var
|
||||
S : String;
|
||||
|
||||
begin
|
||||
fd:=FileOpen(KernelUUID,fmOpenRead);
|
||||
fd:=FileOpen(KernelUUID,fmOpenRead or fmShareDenyNone);
|
||||
Result:=(Fd>=0);
|
||||
if Result then
|
||||
try
|
||||
@ -76,7 +76,7 @@ Function SysCreateGUID(out GUID : TGUID) : Integer;
|
||||
|
||||
begin
|
||||
if not CreateKernelGUID(Guid) then
|
||||
GetRandomBytes(GUID,SizeOf(Guid));
|
||||
GetURandomBytes(GUID,SizeOf(Guid));
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user