ipwd.c revision 5cc9289a900f5d40d126ca663790dca2a7456416
/* Copyright (c) 2011 Dovecot authors, see the included COPYING file */
#define _POSIX_PTHREAD_SEMANTICS /* for Solaris */
#include "lib.h"
#include "ipwd.h"
#include <unistd.h>
#define DEFAULT_PWBUF_SIZE 16384
#define DEFAULT_GRBUF_SIZE 16384
static void pw_init(void)
{
long size;
if (size < 0)
pwbuf_size = size;
}
}
static void gr_init(void)
{
long size;
/* Some BSDs return too low value for this. instead of trying
to figure out exactly which, just make sure it's at least
a reasonable size. if the real size is smaller, it doesn't
matter much that we waste a few kilobytes of memory. */
if (size < DEFAULT_GRBUF_SIZE)
grbuf_size = size;
}
}
void ipwd_deinit(void)
{
}
{
pw_init();
return 1;
return errno == 0 ? 0 : -1;
}
{
pw_init();
return 1;
return errno == 0 ? 0 : -1;
}
{
gr_init();
return 1;
return errno == 0 ? 0 : -1;
}
{
gr_init();
return 1;
return errno == 0 ? 0 : -1;
}