Re: Cyrus IMAPd 2.3.10 Released

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John Capo wrote:
> On Thu, October 25, 2007 21:10, John Capo wrote:
>> Quoting Ken Murchison (murch@xxxxxxxxxxxxxx):
>>
>>> Simon Matter wrote:
>>>
>>>>> On the Linux box, all fresh compilations aside from the sasl 2.1.15 binaries:
>>>>>
>>>> I once posted to the list that 2.3.9 needs at least cyrus-sasl-2.1.19. As a package
>>>> maintainer I know that :)
>>> Did you ever figure out why?  I'm not surprised that code in Cyrus somehow depends on
>>> a change in SASL, but I can't seem to find anything in the CVS logs or diffs that
>>> would be the cause.
>> This is what I had to do for cmd_login to work in 2.3.9.
>>
>>
>> /* authstate already created by mysasl_proxy_policy() */
>> /* Not when using login and allowplaintext.  imapd_authstate is NULL  TM Login fix */
>> if (imapd_authstate == NULL)
>>     imapd_authstate = auth_newstate(imapd_userid);
>>
>> But 2.3.10 cores :-(
> 
> Its coring in getgrouplist() probably because the 3rd argyument is NULL.
> 
>     /* get number of groups user is member of into ngroups */
>     getgrouplist(identifier, gid, NULL, &ngroups);
> 
> BSD man page does not indicate that NULL args are OK.
> 
>   int
>   getgrouplist(const char *name, int basegid, int *groups, int *ngroups);
> 
>  The resulting group list is returned in the integer array pointed to by
>  groups.  The caller specifies the size of the groups array in the integer
>  pointed to by ngroups; the actual number of groups found is returned in
>  ngroups.


See if this fixes the getgrouplist() problem:

--- auth_unix.c.~1.46.~	2007-09-27 16:02:45.000000000 -0400
+++ auth_unix.c	2007-10-25 23:02:15.000000000 -0400
@@ -225,7 +225,7 @@
      struct group *grp;
  #ifdef HAVE_GETGROUPLIST
      gid_t gid, *groupids = NULL;
-    int ret, ngroups = 0;
+    int ret, ngroups = 10;
  #else
      char **mem;
  #endif
@@ -248,10 +248,7 @@
  #ifdef HAVE_GETGROUPLIST
      gid = pwd ? pwd->pw_gid : (gid_t) -1;

-    /* get number of groups user is member of into ngroups */
-    getgrouplist(identifier, gid, NULL, &ngroups);
-
-    /* get the actual group ids */
+    /* get the group ids */
      do {
  	groupids = (gid_t *)xrealloc((gid_t *)groupids,
  				     ngroups * sizeof(gid_t));

-- 
Kenneth Murchison
Systems Programmer
Project Cyrus Developer/Maintainer
Carnegie Mellon University
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux