Make the checksum_seed a bit harder to predict.
authorWayne Davison <wayned@samba.org>
Mon, 11 May 2015 21:31:07 +0000 (14:31 -0700)
committerWayne Davison <wayned@samba.org>
Mon, 11 May 2015 21:32:45 +0000 (14:32 -0700)
compat.c

index f89d466b91365d49b9d0c4aa8f9e9e3e8ae38a59..1df1db8007ca60962e5c076732ca9fac891a245b 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -333,7 +333,7 @@ void setup_protocol(int f_out,int f_in)
 
        if (am_server) {
                if (!checksum_seed)
-                       checksum_seed = time(NULL);
+                       checksum_seed = time(NULL) ^ (getpid() << 6);
                write_int(f_out, checksum_seed);
        } else {
                checksum_seed = read_int(f_in);