rpmlint error about use of mktemp

RetroShare Development discussion

rpmlint error about use of mktemp

Postby librepc » Fri May 30, 2014 3:52 pm


when building retroshare for Mageia, i have a warning for the use of mktemp.
It seams, it is more secure to use mkstemp.
Posts: 4
Joined: Wed Oct 03, 2012 2:01 pm

Re: rpmlint error about use of mktemp

Postby electron » Sat May 31, 2014 6:27 am

This was discussed before, because the Coverty scan reported mktemp as unsafe. I don't know what the result was.

From reading pgphandler.cc i can tell you: the code in question has to be triggered by the user. You usually do this not more often than one or two times a year. So mktemp can fail, but it is very unlikely to happen. You would have to run the keyring cleanup 26 times while having the same process id. It would be better to use a timestamp for the file name.
Posts: 96
Joined: Sun Aug 12, 2012 9:39 am

Return to Developers Corner

Who is online

Users browsing this forum: No registered users and 0 guests