os: make GenerateRandomData() independent of XCSECURITY
The function itself does not depend on the macro. Move it outside of the ifdef guard and remove the identical copy in XWIN. This is step 1 towards removing the duplication in winauth.c and moving the OS specifics to os/ Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
This commit is contained in:
parent
8aee1f40ea
commit
292ee71516
|
@ -68,16 +68,6 @@ static xcb_auth_info_t auth_info;
|
|||
*/
|
||||
|
||||
#ifndef XCSECURITY
|
||||
void
|
||||
GenerateRandomData(int len, char *buf)
|
||||
{
|
||||
int fd;
|
||||
|
||||
fd = open("/dev/urandom", O_RDONLY);
|
||||
read(fd, buf, len);
|
||||
close(fd);
|
||||
}
|
||||
|
||||
static char cookie[16]; /* 128 bits */
|
||||
|
||||
XID
|
||||
|
|
Loading…
Reference in New Issue
Block a user