/* Copyright (c) 2008-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "mountpoint.h"
#include "strescape.h"
#include "sysinfo-get.h"
#include <unistd.h>
#include <fcntl.h>
#ifdef HAVE_SYS_UTSNAME_H
#endif
{
if (fd == -1)
return FALSE;
i_close_fd(&fd);
if (ret <= 0)
return FALSE;
return TRUE;
}
{
return FALSE;
break;
}
if (*p == NULL)
return FALSE;
if (*str != '"')
else {
}
return TRUE;
}
static const char *distro_get(void)
{
static const char *files[] = {
"", "/etc/redhat-release",
"", "/etc/SuSE-release",
"", "/etc/mandriva-release",
"", "/etc/fedora-release",
"", "/etc/sourcemage-release",
"", "/etc/slackware-version",
"", "/etc/gentoo-release",
"Debian ", "/etc/debian_version",
};
const char *name;
unsigned int i;
return name;
NULL);
}
}
return "";
}
{
const char *path;
else
if (*path == '~') {
/* we don't know where users' home dirs are */
return "";
}
return "";
/* all in all it seems we can support only /<path>/%u style location */
return "";
}
{
#ifdef HAVE_SYS_UTSNAME_H
struct utsname u;
if (uname(&u) < 0)
i_error("uname() failed: %m");
else {
}
distro = distro_get();
#endif
return "";
}