hostpid.c revision 90d105df6e2b73ef085abb12fb55287eaac62146
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo Sirainen/* Copyright (c) 2002-2013 Dovecot authors, see the included COPYING file */
0f39a57760d93cddbce3ca43096d78e0fe2f42fdTimo Sirainen /* allow calling hostpid_init() multiple times to reset hostname */
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo Sirainen if (gethostname(hostname, sizeof(hostname)-1) < 0)
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo Sirainen strcspn(value, HOSTNAME_DISALLOWED_CHARS) != strlen(value))
2e29e4797a48d78d669821722bdb54fd0a1d3b94Timo Sirainen i_fatal("Invalid system hostname: '%s'", value);
void hostpid_deinit(void)
const char *my_hostdomain(void)
const char *name;
return my_domain;