quota.c revision ecd54d6c65d15c1a518c6754383389acac655ec2
1N/A#include "write-full.h"
1N/A#include "eacces-error.h"
1N/A#include "wildcard-match.h"
1N/A#include "mailbox-list-private.h"
1N/A#include "quota-private.h"
1N/A#include "quota-fs.h"
1N/A#include "program-client.h"
1N/A#include "settings-parser.h"
1N/A#define DEFAULT_QUOTA_EXCEEDED_MSG \
1N/Astruct quota_root_iter {
1N/Aunsigned int quota_module_id = 0;
1N/A#ifdef HAVE_FS_QUOTA
1N/A i_unreached();
1N/Avoid quota_backends_register(void);
1N/Avoid quota_backends_unregister(void);
1N/Avoid quota_backends_register(void)
1N/Avoid quota_backends_unregister(void)
if (p == NULL) {
switch (res) {
case QUOTA_ALLOC_RESULT_OK:
i_unreached();
const char **error_r)
&error) < 0) {
error);
i_unreached();
&error) < 0) {
i_unreached();
const char **error_r)
const char *const *tmp;
unsigned int i, count;
const char *error;
int ret;
for (i = 0; i < count; i++) {
if (ret < 0) {
if (ret > 0)
unsigned int i, count;
for (i = 0; i < count; i++)
const char *mailbox_name,
bool *ignored_r)
bool enabled;
&mailbox_name);
bytes_limit = 0;
count_limit = 0;
unsigned int i, count;
for (i = 0; i < count; i++) {
return TRUE;
return FALSE;
return FALSE;
unsigned int i, j, count;
for (i = 0; i < count; i++) {
unsigned int i, count;
for (i = 0; i < count; i++) {
struct quota_root_iter *
return iter;
return FALSE;
return FALSE;
return FALSE;
return FALSE;
return TRUE;
bool enforce)
return FALSE;
return FALSE;
return TRUE;
unsigned int count;
int ret;
return NULL;
return NULL;
if (ret == 0) {
if (ret > 0) {
iter->i++;
return root;
unsigned int i, count;
return NULL;
for (i = 0; i < count; i++) {
return roots[i];
return NULL;
int ret;
if (ret <= 0)
return ret;
&ignored) < 0)
*limit_r = 0;
if (kilobytes) {
return ctx;
const char *mailbox_name;
unsigned int i, count;
int ret;
for (i = 0; i < count; i++) {
&ignored) < 0) {
if (!ignored)
if (bytes_limit > 0) {
if (ret > 0) {
} else if (ret < 0) {
if (count_limit > 0) {
if (ret > 0) {
} else if (ret < 0) {
args++;
error);
unsigned int i, count;
const char *reason;
if (count == 0)
bytes_before = 0;
count_before = 0;
for (i = 0; i < count; i++) {
&reason)) {
unsigned int i, count;
const char *mailbox_name;
int ret = 0;
(void)mail_namespace_find_unalias(
for (i = 0; i < count; i++) {
} T_END;
return ret;
const char **quota_over_script_r,
const char **quota_over_flag_r,
bool *status_r)
return FALSE;
return FALSE;
return TRUE;
const char *const *resources;
bool quota_over_status;
int ret;
if (ret < 0) {
resources[i]);
(unsigned long long)value,
(unsigned long long)limit);
unsigned int i, count;
const char *name;
for (i = 0; i < count; i++) {
return QUOTA_ALLOC_RESULT_TEMPFAIL;
return QUOTA_ALLOC_RESULT_OK;
return QUOTA_ALLOC_RESULT_OK;
return QUOTA_ALLOC_RESULT_TEMPFAIL;
return ret;
return QUOTA_ALLOC_RESULT_OK;
return QUOTA_ALLOC_RESULT_TEMPFAIL;
return QUOTA_ALLOC_RESULT_TEMPFAIL;
return QUOTA_ALLOC_RESULT_OVER_MAXSIZE;
return QUOTA_ALLOC_RESULT_OK;
unsigned int i, count;
bool ignore;
int ret;
return QUOTA_ALLOC_RESULT_OK;
for (i = 0; i < count; i++) {
&ignore);
if (ret < 0)
return QUOTA_ALLOC_RESULT_TEMPFAIL;
return QUOTA_ALLOC_RESULT_OVER_QUOTA;