* Fix bug #31555, disbablefile locking

git-svn-id: trunk@35611 -
This commit is contained in:
michael 2017-03-17 07:58:59 +00:00
parent 154216788e
commit 5bbf299c22
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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;