result->error = r;
if (r == MAILIMAP_NO_ERROR) {
- fd = open(param->filename, O_RDWR | O_CREAT, 0600);
+ fd = g_open(param->filename, O_RDWR | O_CREAT, 0600);
if (fd < 0) {
result->error = MAILIMAP_ERROR_FETCH;
goto free;
}
size = stat_buf.st_size;
- fd = open(param->filename, O_RDONLY);
+ fd = g_open(param->filename, O_RDONLY);
if (fd < 0) {
result->error = MAILIMAP_ERROR_APPEND;
return;
/* Detach from the controlling tty if we have one. Otherwise,
SSH might do something stupid like trying to use it instead
of running $SSH_ASKPASS. Doh. */
- fd = open("/dev/tty", O_RDONLY);
+ fd = g_open("/dev/tty", O_RDONLY);
if (fd != -1) {
ioctl(fd, TIOCNOTTY, NULL);
close(fd);