safe-mkstemp.c revision 7b9f0c6aba07358e5520dc60c058126a4cae4056
/* Copyright (c) 2007-2008 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "str.h"
#include "hex-binary.h"
#include "randgen.h"
#include "hostpid.h"
#include "safe-mkstemp.h"
#include <unistd.h>
#include <fcntl.h>
{
unsigned char randbuf[8];
int fd;
for (;;) {
do {
return -1;
}
if (fd != -1)
break;
return -1;
}
}
i_error("fchown(%s, %ld, %ld) failed: %m",
return -1;
}
}
return fd;
}
{
}