A puzzle
Write a portable ANSI C program which can be run multiple times as an unprivileged user and gives different output each time with the same input. For example:
somehost:~$ cc -o random random.c somehost:~$ ./random 0 somehost:~$ ./random 1 somehost:~$ ./random 1 somehost:~$ ./random 0
Well, you say, that's easy, I'll just read /dev/urandom, or I'll be retro and call random(3) and seed it with the current time, the way we did in the old days. But no, you have to follow these conditions:
- no looking at filesystem state, or attempting to alter it in order to observe the results (you can't open, creat, stat, read, write [except to stdout], unlink, etc.); this includes device nodes and directories
- no looking at the current system time
- no establishing or accepting network connections
- no using a library function which makes a prohibited system call (e.g. you can't call fopen from libc)
I found two ways of doing it subject to these constraints. I should make the constraints tougher, and see if it could still be done, but that would be a spoiler for how to do it.
- Links from other weblogs:
Tue Aug 19 00:59:10: casino spiele mit echtem geld from juego al instante paginas web
Play poker texas online game poker on line gratis http://groups.google.it/group/re...