mirror of
				https://github.com/samba-team/samba.git
				synced 2025-10-31 12:23:52 +03:00 
			
		
		
		
	r1498: (merge from 3.0)
Rework our random number generation system. On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork(). For other systems, we now only re-seed after a fork, and on startup. No need to do it per-operation. This removes the 'need_reseed' parameter from generate_random_buffer(). This also requires that we start the secrets subsystem, as that is where the reseed value is stored, for systems without /dev/urandom. In order to aviod identical streams in forked children, the random state is re-initialised after the fork(), at the same point were we do that to the tdbs. Andrew Bartlett
This commit is contained in:
		
				
					committed by
					
						 Gerald (Jerry) Carter
						Gerald (Jerry) Carter
					
				
			
			
				
	
			
			
			
						parent
						
							65147f5aa2
						
					
				
				
					commit
					b97d3cb2ef
				
			| @@ -150,8 +150,7 @@ static NTSTATUS netr_ServerReqChallenge(struct dcesrv_call_state *dce_call, TALL | ||||
| 	pipe_state->client_challenge = *r->in.credentials; | ||||
|  | ||||
| 	generate_random_buffer(pipe_state->server_challenge.data,  | ||||
| 			       sizeof(pipe_state->server_challenge.data), | ||||
| 			       False); | ||||
| 			       sizeof(pipe_state->server_challenge.data)); | ||||
|  | ||||
| 	*r->out.credentials = pipe_state->server_challenge; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user