/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
#include "auth-common.h"
#include "userdb.h"
#ifdef USERDB_PASSWD_FILE
#include "istream.h"
#include "str.h"
#include "auth-cache.h"
#include "db-passwd-file.h"
#include <unistd.h>
#include <fcntl.h>
struct passwd_file_userdb_iterate_context {
char *path;
bool skip_passdb_entries;
};
struct passwd_file_userdb_module {
const char *username_format;
};
static int
{
unsigned int i;
continue;
str_truncate(str, 0);
"Failed to expand extra field %s: %s",
return -1;
}
} else {
value = "";
}
}
return 0;
}
{
(struct passwd_file_userdb_module *)_module;
int ret;
return;
}
}
}
return;
}
}
static struct userdb_iterate_context *
{
(struct passwd_file_userdb_module *)_module;
int fd;
i_error("passwd-file: User iteration isn't currently supported "
"with %%variable paths");
}
/* for now we support only a single passwd-file */
if (fd == -1) {
} else {
}
}
{
(struct passwd_file_userdb_iterate_context *)_ctx;
const char *line, *p;
else {
continue; /* no username or comment */
if (ctx->skip_passdb_entries &&
/* only passdb info */
continue;
}
break;
}
}
}
else T_BEGIN {
} T_END;
}
{
(struct passwd_file_userdb_iterate_context *)_ctx;
return ret;
}
static struct userdb_module *
{
const char *p;
args += 16;
if (p == NULL) {
args = "";
} else {
args = p + 1;
}
}
if (*args == '\0')
i_fatal("userdb passwd-file: Missing args");
}
{
(struct passwd_file_userdb_module *)_module;
}
{
(struct passwd_file_userdb_module *)_module;
}
"passwd-file",
};
#else
.name = "passwd-file"
};
#endif