

![]() | 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: |
4 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] default_homedirectory...| From | Sent On | Attachments |
|---|---|---|
| Barry Flanagan | Nov 4, 2004 10:52 am | |
| Tom Carlile | Nov 5, 2004 9:05 am | |
| Barry Flanagan | Nov 5, 2004 9:12 am | |
| Joey O'Doherty | Nov 6, 2004 11:09 pm | .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: | Re: [maildropl] default_homedirectory_attr | Actions... |
|---|---|---|
| From: | Joey O'Doherty (jo...@odoherty.net) | |
| Date: | Nov 6, 2004 11:09:07 pm | |
| List: | net.sourceforge.lists.courier-maildrop | |
| Attachments: | ||
On Fri, 5 Nov 2004, Barry Flanagan wrote:
So, I still want what you want, but I think being able to set a default homedirectory_attr is useful. Unfortunately my C skills were pretty much exhausted with my little copy-and-paste patch ;-(
Barry, I've attached a patch (very, very similar to yours) which defines default_homedirectory_attr. It's diffed against 1.5.3, but should be pretty easy to figure out.
cheers, /joeyo
-- pub 1024D/B663781B 2001-11-13 Joey O'Doherty <joey(at)odoherty(dot)net> Key fingerprint = F76B 9ACA 4197 C707 6E4D 2B78 E430 101A B663 781B
diff --unified --recursive --new-file maildrop-1.5.3/maildrop/mdldap.c
maildrop-1.5.3-default_homedir_attr/maildrop/mdldap.c
--- maildrop-1.5.3/maildrop/mdldap.c 2002-06-09 11:26:19.000000000 -0400
+++ maildrop-1.5.3-default_homedir_attr/maildrop/mdldap.c 2004-07-22
23:58:18.000000000 -0400
@@ -132,7 +132,13 @@
rec->homedirectory = strdup(values[0]);
ldap_value_free(values);
} else {
- rec->homedirectory = NULL;
+ values=ldap_get_values(ldap,entry,cfg->default_homedirectory_attr);
+ if ( ldap_count_values(values) > 0 ) {
+ rec->homedirectory = strdup(values[0]);
+ ldap_value_free(values);
+ } else {
+ rec->homedirectory = NULL;
+ }
}
values=ldap_get_values(ldap,entry,cfg->quota_attr);
diff --unified --recursive --new-file maildrop-1.5.3/maildrop/mdldapconfig.c
maildrop-1.5.3-default_homedir_attr/maildrop/mdldapconfig.c
--- maildrop-1.5.3/maildrop/mdldapconfig.c 2001-01-28 14:59:20.000000000 -0500
+++ maildrop-1.5.3-default_homedir_attr/maildrop/mdldapconfig.c 2004-07-22
23:59:00.000000000 -0400
@@ -78,6 +78,10 @@
if ( !strcasecmp(var,"default_gidnumber") ) cfg->default_gidnumber = atoi(val); + + if ( !strcasecmp(var,"default_homedirectory_attr") ) + cfg->default_homedirectory_attr = (char*)strdup(val); + }
fclose(fp);
diff --unified --recursive --new-file maildrop-1.5.3/maildrop/mdldapconfig.h
maildrop-1.5.3-default_homedir_attr/maildrop/mdldapconfig.h
--- maildrop-1.5.3/maildrop/mdldapconfig.h 2001-01-28 14:59:20.000000000 -0500
+++ maildrop-1.5.3-default_homedir_attr/maildrop/mdldapconfig.h 2004-07-22
23:59:27.000000000 -0400
@@ -33,6 +33,7 @@
char *maildir_attr;
char *homedirectory_attr;
char *quota_attr;
+ char *default_homedirectory_attr;
int default_uidnumber; int default_gidnumber;








.patch