On Mon, Oct 06, 2003 at 10:03:29AM +0200, [EMAIL PROTECTED] wrote:
> On Fri, Oct 03, 2003 at 11:27:09PM -0700, Tracy R Reed wrote:
> > open("/dev/urandom", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) == -1
> > ACCES (Permission denied)
> 
> How to reproduce?
> 
> strace java -cp freenet.jar freenet.crypt.Yarrow
> 
> > Why does java/freenet access /dev/urandom? And why is it being denied?
> > Perms look ok...
> 
> Why?
> 
> Probably because fast_pool_reseed() in src/freenet/crypt/Yarrow.java
> tries to write_seed(seedfile); If seedfile is /dev/urandom and you are
> not root that wont work.

See attachement for patch.

Joris Bontje / mids
-- 
PGP Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xF19326A9
Key fingerprint = 730D 9B3A F406 F28A 957D 6397 31E8 6D4C F193 26A9
--- src/freenet/crypt/Yarrow.java.orig  2003-10-07 00:41:03.000000000 +0200
+++ src/freenet/crypt/Yarrow.java       2003-10-07 01:03:03.000000000 +0200
@@ -374,8 +374,10 @@
        rekey(tmp);
        Util.wipe(v0);
        fast_entropy=0;
+       if (! (seedfile.toString()).equals("/dev/urandom")) {
        write_seed(seedfile);
     }
+    }
 
     private void slow_pool_reseed() {
        byte[] slow_hash=slow_pool.digest();

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to