

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in net.sourceforge.lists.courier-maildrop[maildropl] LDAP/MySQL virtual user d...| From | Sent On | Attachments |
|---|---|---|
| Sergey Chumakov | Nov 3, 2003 6:31 am | .patch |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [maildropl] LDAP/MySQL virtual user database | Actions... |
|---|---|---|
| From: | Sergey Chumakov (ya...@cit.org.by) | |
| Date: | Nov 3, 2003 6:31:48 am | |
| List: | net.sourceforge.lists.courier-maildrop | |
| Attachments: | ||
Hi All,
Does anybody use maildrop with MySQL or LDAP virtual user database? It seems to me that there is a similar problem at find_in_mysql(...) and find_in_ldap(...) functions. If you don't define maildir/mailbox parameters for the virtual user it causes a SIGSEGV (error message like "maildrop: signal 0x0B").
I think attached patch should fix this problem
Excuse my English
-- Best regards, Sergey Chumakov 2:450/77[.43]
*** main.C.orig Sun Apr 13 04:25:48 2003 --- main.C Mon Nov 3 16:27:01 2003 *************** *** 340,363 **** if ( getuid() != (gid_t)mrec->uidnumber ) nochangeuidgid();
if ( mrec->quota ) maildrop->init_quota=mrec->quota; else { /* if maildirsize exists, delete it .. or else new quotas may not work if they are now disabled, but once were set... this was a bug I found in v1.2.0 .. if its been fixed then this block can be removed */ ! mtmp = (char*)malloc(strlen(mrec->maildir)+strlen("/maildirsize")+1); ! strcat(strcpy(mtmp, mrec->maildir), "/maildirsize"); unlink(mtmp); free(mtmp); }
- maildrop->init_home=mrec->homedir; - maildrop->init_logname=user; - maildrop->init_shell="/bin/sh"; - maildrop->init_default=mrec->maildir ? mrec->maildir : - GetDefaultMailbox(user); - free_mysql_rec(&mrec);
return 1; --- 340,363 ---- if ( getuid() != (gid_t)mrec->uidnumber ) nochangeuidgid();
+ maildrop->init_home=mrec->homedir;
+ maildrop->init_logname=user;
+ maildrop->init_shell="/bin/sh";
+ maildrop->init_default=mrec->maildir ? mrec->maildir :
+ GetDefaultMailbox(user);
+
if ( mrec->quota )
maildrop->init_quota=mrec->quota;
else {
/* if maildirsize exists, delete it .. or else new quotas may not work
if they are now disabled, but once were set... this was a bug I found
in v1.2.0 .. if its been fixed then this block can be removed */
! mtmp =
(char*)malloc(strlen(maildrop->init_default)+strlen("/maildirsize")+1);
! strcat(strcpy(mtmp, maildrop->init_default), "/maildirsize");
unlink(mtmp);
free(mtmp);
}
free_mysql_rec(&mrec);
return 1; *************** *** 389,411 **** if ( getuid() != (gid_t)rec->uidnumber ) nochangeuidgid();
if ( rec->quota ) maildrop->init_quota=rec->quota; else { /* if maildirsize exists, delete it .. or else new quotas may not work if they are now disabled, but once were set... this was a bug I found in v1.2.0 .. if its been fixed then this block can be removed */ ! tmp = (char*)malloc(strlen(rec->maildir)+strlen("/maildirsize")+1); ! strcat(strcpy(tmp, rec->maildir), "/maildirsize"); unlink(tmp); free(tmp); } - - maildrop->init_home=rec->homedirectory; - maildrop->init_logname=user; - maildrop->init_shell="/bin/sh"; - maildrop->init_default=rec->maildir ? rec->maildir : - GetDefaultMailbox(user);;
free_ldap_rec(&rec);
--- 389,411 ---- if ( getuid() != (gid_t)rec->uidnumber ) nochangeuidgid();
+ maildrop->init_home=rec->homedirectory;
+ maildrop->init_logname=user;
+ maildrop->init_shell="/bin/sh";
+ maildrop->init_default=rec->maildir ? rec->maildir :
+ GetDefaultMailbox(user);;
+
if ( rec->quota )
maildrop->init_quota=rec->quota;
else {
/* if maildirsize exists, delete it .. or else new quotas may not work
if they are now disabled, but once were set... this was a bug I found
in v1.2.0 .. if its been fixed then this block can be removed */
! tmp =
(char*)malloc(strlen(maildrop->init_default)+strlen("/maildirsize")+1);
! strcat(strcpy(tmp, maildrop->init_default), "/maildirsize");
unlink(tmp);
free(tmp);
}
free_ldap_rec(&rec);








.patch