acl-api.c revision 10ccd0e45768923d69be459e87ef6cd2574cec60
/* Copyright (c) 2006-2013 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "str.h"
#include "hash.h"
#include "mail-user.h"
#include "mailbox-list.h"
#include "acl-cache.h"
#include "acl-api-private.h"
const char *name)
{
}
const char *child_name)
{
}
{
}
{
unsigned int read_idx;
return -1;
return -1;
}
return 1;
/* when dsync is running on a shared mailbox, it must be able
to do everything inside it. however, dsync shouldn't touch
mailboxes where user doesn't have any read access, because
that could make them readable on the replica. */
return 1;
}
return 0;
}
const char *const *
{
const char *const *names;
count = 0;
else {
continue;
/* @UNSAFE */
}
}
}
/* @UNSAFE */
return rights;
}
const char *const **rights_r)
{
return -1;
return -1;
}
return 0;
}
const char *const **rights_r)
{
int ret;
if (pool->datastack_pool)
T_BEGIN {
} T_END;
return ret;
}
{
}
{
}
const struct acl_rights_update *update)
{
}
{
}
struct acl_rights *rights_r)
{
return -1;
}
{
}
struct acl_mailbox_list_context *
{
}
const char **name_r)
{
}
void
{
}
{
}
{
case ACL_ID_ANYONE:
break;
case ACL_ID_AUTHENTICATED:
break;
case ACL_ID_OWNER:
break;
case ACL_ID_USER:
break;
case ACL_ID_GROUP:
break;
case ACL_ID_GROUP_OVERRIDE:
break;
case ACL_ID_TYPE_COUNT:
i_unreached();
}
}
{
}
static bool is_standard_right(const char *name)
{
unsigned int i;
for (i = 0; all_mailbox_rights[i] != NULL; i++) {
return TRUE;
}
return FALSE;
}
const char **error_r)
{
unsigned int i, j;
return -1;
}
return 0;
}
if (right[0] != '-')
dest = &dest_rights;
else {
right++;
dest = &dest_neg_rights;
}
if (*right == ':') {
/* non-standard right */
right++;
} else if (is_standard_right(right)) {
} else {
right);
return -1;
}
} else {
for (j = 0; all_mailbox_rights[j] != NULL; j++)
}
}
if (array_count(&dest_rights) > 0) {
}
if (array_count(&dest_neg_rights) > 0) {
}
return 0;
}
{
}
}
{
const char *const *p;
/* ignore owner rights */
return FALSE;
}
return FALSE;
if (strcmp(*p, MAIL_ACL_LOOKUP) == 0)
return TRUE;
}
return FALSE;
}
{
strlen(ACL_ID_NAME_USER_PREFIX)) == 0) {
strlen(ACL_ID_NAME_GROUP_PREFIX)) == 0) {
strlen(ACL_ID_NAME_GROUP_OVERRIDE_PREFIX)) == 0) {
} else {
return -1;
}
return 0;
}