diff options
| author | Sam Varshavchik | 2015-06-09 21:23:27 -0400 |
|---|---|---|
| committer | Sam Varshavchik | 2015-06-09 21:23:27 -0400 |
| commit | 6d99e5e7a7e4101786f32e4f6e2dabbe741f5342 (patch) | |
| tree | 7ac8639939a93bc04a8c98c012f8dbaf28fdbf9f | |
| parent | ac0f2369f1fcdabca201a562781de6d5c10c7dff (diff) | |
| download | courier-libs-6d99e5e7a7e4101786f32e4f6e2dabbe741f5342.tar.bz2 | |
added AUTH_MKHOMEDIR_SKEL setting.
| -rw-r--r-- | sqwebmail/ChangeLog | 4 | ||||
| -rw-r--r-- | sqwebmail/auth.c | 7 | ||||
| -rw-r--r-- | sqwebmail/sqwebmaild.dist.in.git | 10 |
3 files changed, 17 insertions, 4 deletions
diff --git a/sqwebmail/ChangeLog b/sqwebmail/ChangeLog index 6f81115..d646e4d 100644 --- a/sqwebmail/ChangeLog +++ b/sqwebmail/ChangeLog @@ -1,3 +1,7 @@ +2015-06-09 Sam Varshavchik <mrsam@courier-mta.com> + + * AUTH_MKHOMEDIR_SKEL setting: autocreate home directory. + 2015-05-12 "Hanno Böck" <hanno@hboeck.de> * Fix gcc warnings. diff --git a/sqwebmail/auth.c b/sqwebmail/auth.c index 3030e77..7294d7f 100644 --- a/sqwebmail/auth.c +++ b/sqwebmail/auth.c @@ -1,5 +1,5 @@ /* -** Copyright 1998 - 2006 Double Precision, Inc. See COPYING for +** Copyright 1998 - 2015 Double Precision, Inc. See COPYING for ** distribution information. */ @@ -102,7 +102,7 @@ static int doauthlogin(struct authinfo *a, void *vp) if (p && atoi(p)) return -1; - if ((rc = auth_callback_default(a)) != 0) + if ((rc = auth_callback_default_autocreate(a)) != 0) { if (rc > 0) perror("ERR: authentication error"); @@ -223,7 +223,7 @@ const char *login_returnaddr() { static char *addrbuf=0; const char *p, *domain=""; - + if ((p=getenv("AUTHENTICATED")) == NULL || *p == 0) p=getenv("AUTHADDR"); if (!p) p=""; @@ -323,4 +323,3 @@ static char *uhdrbuf=0; return (hdrbuf); } - diff --git a/sqwebmail/sqwebmaild.dist.in.git b/sqwebmail/sqwebmaild.dist.in.git index 3b810a0..900f314 100644 --- a/sqwebmail/sqwebmaild.dist.in.git +++ b/sqwebmail/sqwebmaild.dist.in.git @@ -41,6 +41,16 @@ MAILDIRPATH=Maildir # SQWEBMAIL_PREFORK=5 +##NAME: AUTH_MKHOMEDIR_SKEL:0 +# +# Uncomment this setting to automatically create a home directory on first +# login. if the AUTH_MKHOMEDIR_SKEL environment variable is set, and the +# home directory does not exist, the home directory gets created, with its +# initial contents copied from AUTH_MKHOMEDIR_SKEL which must be a directory, +# typically /etc/skel. +# +# AUTH_MKHOMEDIR_SKEL=/etc/skel + ##NAME: LOGGEROPTS:0 # # courierlogger(1) options, e.g. to set syslog facility |
