Index: [thread] [date] [subject] [author]
  From: Raul Dias <chaos@swi.com.br>
  To  : <imapvpop@davideous.com>
  Date: Thu, 12 Jul 2001 19:23:04 -0300

Doubts about the patch

Hi,

In the original patch, the following bit of code seem to be trying to patch a .orig file.
Question: Should I patch env_unix.c with this?

--------- 8< -----------------------------
diff -rNu3 imap-4.6_vpop_orig/src/osdep/unix/env_unix.c.orig imap-4.6_vpop_my/src/osdep/unix/env_unix.c.orig
--- imap-4.6_vpop_orig/src/osdep/unix/env_unix.c.orig	Sun Oct 10 13:33:56 1999
+++ imap-4.6_vpop_my/src/osdep/unix/env_unix.c.orig	Tue Nov  9 23:05:06 1999
@@ -511,6 +511,7 @@
   struct passwd *pw;
   struct stat sbuf;
   char *s,tmp[MAILTMPLEN];
+  DRIVER *d;
   if (myUserName) fatal ("env_init called twice!");
 				/* myUserName must be set before dorc() call */
   myUserName = cpystr ((char *) (user ? user : anonymous_user));
@@ -557,7 +558,12 @@
   if (!anonymous && !sharedHome && (pw = getpwnam ("imapshared")))
     sharedHome = cpystr (pw->pw_dir);
 				/* force default prototype to be set */
-  if (!createProto) createProto = &CREATEPROTO;
+  /* this hard-wires in a createProto of the INBOX format */
+  if (!createProto) {
+    createProto = ((d = mail_valid (NIL,"INBOX",NIL)) &&
+                     strcmp (d->name,"dummy")) ?
+                       ((*d->open) (NIL)) : &CREATEPROTO;
+  }
   if (!appendProto) appendProto = &EMPTYPROTO;
 				/* re-do open action to get flags */
   (*createProto->dtb->open) (NIL);
----------- >8 -------------------------

Another point.  Lots of calls to myusername() were
changed to myusername_unix().

However myusername() is just a call to myusername_full()
which was patched to call myusername_full_backend().

Is the change to myusername_unix() really needed?

-Raul Dias

Index: [thread] [date] [subject] [author]