[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7537

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P2  |P3

--


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2019-12-12 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7537

berni44  changed:

   What|Removed |Added

 CC||bugzi...@d-ecke.de

--- Comment #11 from berni44  ---
Is this still not fixed?

--


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2014-01-28 Thread d-bugmail
https://d.puremagic.com/issues/show_bug.cgi?id=7537


Vladimir Panteleev  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Platform|All |x86_64
 Resolution|FIXED   |


--- Comment #10 from Vladimir Panteleev  2014-01-28 
11:52:42 EET ---
(In reply to comment #3)
> What?? How is this not a bug?

I may have been wrong here. The problem is not present on Win32, but on Win64
the MS runtime does what the DMC runtime used to do - attempt to create the
file in the drive root. And it's not a bug, it's working according to the
documentation:

> The tmpfile function creates a temporary file and returns a pointer to that 
> stream. The temporary file is created in the root directory. To create a 
> temporary file in a directory other than the root, use tmpnam or tempnam in 
> conjunction with fopen.

Conclusion: this function is horrible and needs to be replaced with something
better.

Some relevant discussion here:
https://github.com/D-Programming-Language/phobos/pull/691

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2012-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7537


Walter Bright  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


--- Comment #9 from Walter Bright  2012-04-19 
12:15:09 PDT ---
I have it fixed in snn.lib now. You can pick it up here:

ftp://ftp.digitalmars.com/dmc.zip

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2012-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7537



--- Comment #8 from Vladimir Panteleev  2012-04-19 
11:32:02 PDT ---
(In reply to comment #7)
> XP allowed it.

You mean, to administrator users? I don't think regular users can create files
in the drive root on XP either:
http://dump.thecybershadow.net/2d089ee536e35b4a8244f26f36be491c/0814.png

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2012-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7537


Walter Bright  changed:

   What|Removed |Added

 CC||bugzi...@digitalmars.com


--- Comment #7 from Walter Bright  2012-04-19 
11:23:55 PDT ---
(In reply to comment #5)
> The filename is chosen by the C runtime, not the operating system. It is a bug
> in the DigitalMars C runtime. It probably tries to use the hard-coded
> %WINDIR%\Temp directory, instead of the user profile directory or %TEMP%.

Actually, it uses stdio.h's _P_tmpdir, which on Windows is "\\". Did I say that
implementation is rather old? I also noticed that Windows 7 does not allow
writing to the root directory. XP allowed it.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2012-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7537



--- Comment #6 from SomeDude  2012-04-19 09:19:52 
PDT ---
Oh, I just saw the author of the issue. It's not "random Denis".
Anyway, has a bug report been done in DMC C bugzilla ?
Else this one will stay open forever, I'm affraid.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2012-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7537



--- Comment #5 from Vladimir Panteleev  2012-04-19 
09:10:28 PDT ---
The filename is chosen by the C runtime, not the operating system. It is a bug
in the DigitalMars C runtime. It probably tries to use the hard-coded
%WINDIR%\Temp directory, instead of the user profile directory or %TEMP%.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2012-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7537



--- Comment #4 from SomeDude  2012-04-19 09:09:13 
PDT ---
(In reply to comment #3)
> What?? How is this not a bug?

The OS prevents to create the file, so tmpfile() throws an exception. I don't
see how this can be considered a bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2012-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7537


SomeDude  changed:

   What|Removed |Added

 CC||lovelyd...@mailmetrash.com


--- Comment #2 from SomeDude  2012-04-19 09:01:44 
PDT ---
This is not a bug. It works as intended. Should close.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2012-04-19 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7537



--- Comment #3 from Vladimir Panteleev  2012-04-19 
09:03:04 PDT ---
What?? How is this not a bug?

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---


[Issue 7537] `File.tmpfile` requires administrator rights on Windows

2012-04-05 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=7537


Vladimir Panteleev  changed:

   What|Removed |Added

 CC||thecybersha...@gmail.com


--- Comment #1 from Vladimir Panteleev  2012-04-05 
19:23:30 PDT ---
File.tmpfile is just a simple wrapper around core.stdc.stdio.tmpfile, so the
issue is with the DMC's C standard library.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
--- You are receiving this mail because: ---