浏览代码

Fixed the group patch that did not get updated to 2.3.10 in the last update round. Moved lmtpunix logging into the lmtp.log.

Thomas Lotterer 18 年之前
父节点
当前提交
356d25a789
共有 3 个文件被更改,包括 22 次插入23 次删除
  1. 2 2
      imapd/fsl.imapd
  2. 18 19
      imapd/imapd.patch.group
  3. 2 2
      imapd/imapd.spec

+ 2 - 2
imapd/fsl.imapd

@@ -38,7 +38,7 @@ ident (sieve)/.+ q{
     }
 };
 
-ident (lmtp)/.+ q{
+ident (lmtp|lmtpunix)/.+ q{
     prefix(
         prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
     )
@@ -110,7 +110,7 @@ ident (cyr_expire|ctl_cyrusdb|tls_prune|delprune)/.+ q{
     }
 };
 
-ident (lmtpunix|squatter)/.+ q{
+ident (squatter)/.+ q{
     prefix(
         prefix="%b %d %H:%M:%S %N <%L> $1[%P]: "
     )

+ 18 - 19
imapd/imapd.patch.group

@@ -1,7 +1,7 @@
-Index: lib/auth_unix.c
---- lib/auth_unix.c.orig	2006-11-30 18:11:22 +0100
-+++ lib/auth_unix.c	2007-02-08 09:32:47 +0100
-@@ -48,6 +48,7 @@
+diff -r e502c48f9ba9 lib/auth_unix.c
+--- a/lib/auth_unix.c	Thu Oct 25 08:10:12 2007 +0200
++++ b/lib/auth_unix.c	Fri Nov 30 11:33:23 2007 +0100
+@@ -48,12 +48,133 @@
  #include <stdlib.h>
  #include <pwd.h>
  #include <grp.h>
@@ -9,10 +9,10 @@ Index: lib/auth_unix.c
  #include <ctype.h>
  #include <string.h>
  
-@@ -55,6 +56,126 @@
+ #include "auth.h"
  #include "libcyr_cfg.h"
  #include "xmalloc.h"
- 
++
 +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
 +/*
 + * __getgrent.c - This file is part of the libc-8086/grp package for ELKS,
@@ -132,11 +132,10 @@ Index: lib/auth_unix.c
 +    return __getgrent(fileno(file), line_buff, members);
 +}
 +#endif /* __FreeBSD__ */
-+
+ 
  struct auth_state {
      char userid[81];
-     char **group;
-@@ -142,6 +263,25 @@
+@@ -142,6 +263,25 @@ static char allowedchars[256] = {
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  };
  
@@ -162,7 +161,7 @@ Index: lib/auth_unix.c
  /*
   * Convert 'identifier' into canonical form.
   * Returns a pointer to a static buffer containing the canonical form
-@@ -177,7 +317,7 @@
+@@ -177,7 +317,7 @@ size_t len;
       */
      
      if (!strncmp(retbuf, "group:", 6)) {
@@ -171,18 +170,18 @@ Index: lib/auth_unix.c
  	if (!grp) return 0;
  	strcpy(retbuf+6, grp->gr_name);
  	return retbuf;
-@@ -224,6 +364,7 @@
-     struct passwd *pwd;
-     struct group *grp;
+@@ -228,6 +368,7 @@ static struct auth_state *mynewstate(con
+     int ret, ngroups = 0;
+ #else
      char **mem;
 +    FILE *groupfile;
+ #endif
  
      identifier = mycanonifyid(identifier, 0);
-     if (!identifier) return 0;
-@@ -240,20 +381,23 @@
+@@ -286,20 +427,23 @@ err:
+     if (groupids) free(groupids);
  
-     pwd = getpwnam(identifier);
- 	
+ #else /* !HAVE_GETGROUPLIST */
 -    setgrent();
 -    while ((grp = getgrent())) {
 -	for (mem = grp->gr_mem; *mem; mem++) {
@@ -214,6 +213,6 @@ Index: lib/auth_unix.c
 +       }
 +       fclose(groupfile);
 +    } 
-     return newstate;
- }
+ #endif /* HAVE_GETGROUPLIST */
  
+     return newstate;

+ 2 - 2
imapd/imapd.spec

@@ -33,7 +33,7 @@ Class:        BASE
 Group:        Mail
 License:      BSD
 Version:      2.3.10
-Release:      20071107
+Release:      20071130
 
 #   package options
 %option       with_fsl           yes
@@ -125,7 +125,7 @@ AutoReqProv:  no
 %if "%{with_group_igncase}" == "yes"
     %{l_shtool} subst -e 's;^\(\+.*\)strcmp;\1strcasecmp;' imapd.patch.group
 %endif
-    %{l_patch} -p0 <imapd.patch.group
+    %{l_patch} -p1 <imapd.patch.group
     %{l_shtool} subst \
         -e 's;/etc/imapd\.group;%{l_prefix}/etc/imapd/imapd.group;' \
         lib/auth_unix.c