Fix dkim for no-key case under SENDFILE compile. Bug 934
authorWolfgang Breyha <wbreyha@gmx.net>
Wed, 11 Jun 2014 18:19:49 +0000 (19:19 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Wed, 11 Jun 2014 18:58:21 +0000 (19:58 +0100)
Tested-by: <wbreyha@gmx.net>
src/src/transport.c

index d222adce868e8d240e59cb742a4f1dead4f63d21..3648bfc82f054be2076c66cda2c702666c94ffc5 100644 (file)
@@ -1068,7 +1068,7 @@ if (dkim_private_key && dkim_domain && dkim_selector)
       uschar *dkim_strict_result = expand_string(dkim_strict);
       if (dkim_strict_result)
        if ( (strcmpic(dkim_strict,US"1") == 0) ||
-            (strcmpic(dkim_strict,US"true") == 0) )
+            (strcmpic(dkim_strict,US"true") == 0) ) 
          {
          /* Set errno to something halfway meaningful */
          save_errno = EACCES;
@@ -1104,8 +1104,8 @@ if (dkim_private_key && dkim_domain && dkim_selector)
     }
   }
 
-  /* Fetch file positition (the size) */
-  size = lseek(dkim_fd,0,SEEK_CUR);
+/* Fetch file size */
+size = lseek(dkim_fd, 0, SEEK_END);
 
 /* Rewind file */
 lseek(dkim_fd, 0, SEEK_SET);