acl-storage.c revision a27e065f1a1f91c7fbdf7c2ea1c387441af0cbb3
/* Copyright (C) 2006 Timo Sirainen */
#include "lib.h"
#include "array.h"
#include "istream.h"
#include "acl-api-private.h"
#include "acl-plugin.h"
#include <stdlib.h>
unsigned int acl_storage_module_id = 0;
static bool acl_storage_module_id_set = FALSE;
static const char *acl_storage_right_names[ACL_STORAGE_RIGHT_COUNT] = {
};
unsigned int acl_storage_right_idx, bool *can_see_r)
{
struct acl_object *aclobj;
if (ret2 < 0)
ret = -1;
}
return ret;
}
const char *
const char *name)
{
const char *p;
char sep;
}
{
}
static struct mailbox *
{
bool can_see;
int ret;
/* mailbox can be opened either for reading or appending new messages */
if ((flags & MAILBOX_OPEN_SAVEONLY) != 0) {
&can_see);
} else {
&can_see);
}
if (ret <= 0) {
if (ret < 0)
return NULL;
if (can_see) {
} else {
}
return NULL;
}
return NULL;
return acl_mailbox_open_box(box);
}
bool directory)
{
int ret;
t_push();
t_pop();
if (ret <= 0) {
if (ret == 0) {
/* Note that if the mailbox didn't have LOOKUP
permission, this not reveals to user the mailbox's
existence. Can't help it. */
}
return -1;
}
}
{
bool can_see;
int ret;
&can_see);
if (ret <= 0) {
if (ret < 0)
return -1;
if (can_see) {
} else {
}
return -1;
}
}
const char *newname)
{
bool can_see;
int ret;
/* renaming requires rights to delete the old mailbox */
if (ret <= 0) {
if (ret < 0)
return -1;
if (can_see) {
} else {
}
return 0;
}
/* and create the new one under the parent mailbox */
t_push();
t_pop();
if (ret <= 0) {
if (ret == 0) {
/* Note that if the mailbox didn't have LOOKUP
permission, this not reveals to user the mailbox's
existence. Can't help it. */
}
return -1;
}
}
{
struct acl_mail_storage *astorage;
struct acl_backend *backend;
unsigned int i;
/* FIXME: set groups. owner_username isn't also correct here it's a
per-mailbox thing. but we don't currently support shared mailboxes,
so this will do for now.. */
i_fatal("ACL backend initialization failed");
/* FIXME: not necessarily, but safer to do this for now.. */
i_fatal("mail_full_filesystem_access=yes is "
"incompatible with ACLs");
}
/* build ACL right lookup table */
for (i = 0; i < ACL_STORAGE_RIGHT_COUNT; i++) {
}
if (!acl_storage_module_id_set) {
}
}