$OpenBSD: patch-src_imap_cmd-select_c,v 1.1 2003/07/23 06:03:01 jolan Exp $
--- src/imap/cmd-select.c.orig	Sun Apr  6 09:58:14 2003
+++ src/imap/cmd-select.c	Tue Jul 15 15:17:10 2003
@@ -7,6 +7,7 @@ int _cmd_select_full(struct client *clie
 {
 	struct mailbox *box;
 	struct mailbox_status status;
+	enum mailbox_open_flags flags;
 	const char *mailbox;
 
 	/* <mailbox> */
@@ -20,8 +21,10 @@ int _cmd_select_full(struct client *clie
                         client_send_untagged_storage_error(client);
 	}
 
-	box = client->storage->open_mailbox(client->storage, mailbox,
-					    readonly, FALSE);
+	flags = mailbox_open_flags;
+	if (readonly)
+		flags |= MAILBOX_OPEN_READONLY;
+	box = client->storage->open_mailbox(client->storage, mailbox, flags);
 	if (box == NULL) {
 		client_send_storage_error(client);
 		return TRUE;
