*
* Functions which implement RFC2086 (and maybe RFC4314) (IMAP ACL extension)
*
+ *
+ * Copyright (c) 2007-2009 by the citadel.org team
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <ctype.h>
#include <string.h>
#include <limits.h>
+#include <libcitadel.h>
#include "citadel.h"
#include "server.h"
#include "sysdep_decls.h"
#include "policy.h"
#include "database.h"
#include "msgbase.h"
-#include "tools.h"
#include "internet_addressing.h"
#include "serv_imap.h"
#include "imap_tools.h"
/*
* Search for the specified room or folder
*/
- ret = imap_grabroom(roomname, parms[2], 0);
+ ret = imap_grabroom(roomname, parms[2], 1);
if (ret != 0) {
cprintf("%s NO Invalid mailbox name or access denied\r\n",
parms[0]);
cdb_free(cdbus);
CtdlRoomAccess(&CC->room, &temp, &ra, NULL);
- if (strlen(temp.fullname) > 0) {
+ if (!IsEmptyStr(temp.fullname)) {
imap_acl_flags(rights, ra);
- if (strlen(rights) > 0) {
+ if (!IsEmptyStr(rights)) {
cprintf(" ");
imap_strout(temp.fullname);
cprintf(" %s", rights);
/*
* Search for the specified room/folder
*/
- ret = imap_grabroom(roomname, parms[2], 0);
+ ret = imap_grabroom(roomname, parms[2], 1);
if (ret != 0) {
cprintf("%s NO Invalid mailbox name or access denied\r\n",
parms[0]);
* Search for the specified user
*/
ret = (-1);
- valid = validate_recipients(parms[3]);
+ valid = validate_recipients(parms[3], NULL, 0);
if (valid != NULL) {
if (valid->num_local == 1) {
ret = getuser(&temp, valid->recp_local);
return;
}
- ret = imap_grabroom(roomname, parms[2], 0);
+ ret = imap_grabroom(roomname, parms[2], 1);
if (ret != 0) {
cprintf("%s NO Invalid mailbox name or access denied\r\n",
parms[0]);