[klibc] [PATCH 2/2] Add a relatively minimal mkstemp(3) implementation.

maximilian attems max at stro.at
Sun Jan 30 12:46:18 PST 2011

On Sat, Jan 29, 2011 at 05:31:35PM +0000, Thorsten Glaser wrote:
> Requires arc4random.  Debian: (Closes: #516774)

hmm I'd implement that differently, along the lines of pseudocode
	fd = open("/dev/urandom", O_RDONLY);
	read(fd, &num, sizeof(num);
	/* maybe some blackmagic now */
	i = open(template, flags, 0600);

But the question is why do you need mkstemp?

Should klibc have mkstemp(3): It is indeed part of POSIX.1-2001, but
I'm unsure if it is in the scope of klibc? 


More information about the klibc mailing list