bcb4e51a409d94ae670de96afb8483a4f7855294Stephan Bosch/* Copyright (c) 2011-2018 Dovecot authors, see the included COPYING file */
60bdf7c0422caeb08cc615c60b659d4d1ff30614Timo Sirainen#define _POSIX_PTHREAD_SEMANTICS /* for Solaris */
c8555d0f669c5732c8b9f5bece7b41fc65545f33Timo Sirainen pwbuf_size = nearest_power(old_pwbuf_size + 1);
c8555d0f669c5732c8b9f5bece7b41fc65545f33Timo Sirainen pwbuf = i_realloc(pwbuf, old_pwbuf_size, pwbuf_size);
c8555d0f669c5732c8b9f5bece7b41fc65545f33Timo Sirainen grbuf_size = nearest_power(old_grbuf_size + 1);
c8555d0f669c5732c8b9f5bece7b41fc65545f33Timo Sirainen grbuf = i_realloc(grbuf, old_grbuf_size, grbuf_size);
596f582a422eddef951ee445f9a0ed3d4bf14ff8Timo Sirainenint i_getpwnam(const char *name, struct passwd *pwd_r)
c8555d0f669c5732c8b9f5bece7b41fc65545f33Timo Sirainen errno = getpwnam_r(name, pwd_r, pwbuf, pwbuf_size, &result);
9a1a4c2ca1b9a8bbadd38224b15a364c78cb9938Timo Sirainen /* FreeBSD fails here when name="user@domain" */
596f582a422eddef951ee445f9a0ed3d4bf14ff8Timo Sirainenint i_getpwuid(uid_t uid, struct passwd *pwd_r)
c8555d0f669c5732c8b9f5bece7b41fc65545f33Timo Sirainen errno = getpwuid_r(uid, pwd_r, pwbuf, pwbuf_size, &result);
596f582a422eddef951ee445f9a0ed3d4bf14ff8Timo Sirainenint i_getgrnam(const char *name, struct group *grp_r)
c8555d0f669c5732c8b9f5bece7b41fc65545f33Timo Sirainen errno = getgrnam_r(name, grp_r, grbuf, grbuf_size, &result);