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