diff options
author | 2009-11-09 22:28:08 +0000 | |
---|---|---|
committer | 2009-11-09 22:28:08 +0000 | |
commit | 66f07e0f8408049cd96b886cdadac4d4a10c6f9f (patch) | |
tree | c01120f7c0030835544c868ca2e83117393976f9 | |
parent | pfsync devices can be dynamically created too; from vladimir kirillov (diff) | |
download | wireguard-openbsd-66f07e0f8408049cd96b886cdadac4d4a10c6f9f.tar.xz wireguard-openbsd-66f07e0f8408049cd96b886cdadac4d4a10c6f9f.zip |
support the userpart+foobar@domainpart syntax which got wiped when i wrote
the virtual domains support as it was in my way. this time, make it work as
it should: userpart+foobar@domainpart becomes:
path->user = userpart+foobar
path->domain = domainpart
path->pw_name = userpart
discussed quickly with jacekm@
-rw-r--r-- | usr.sbin/smtpd/lka.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/lka.c b/usr.sbin/smtpd/lka.c index 71849263256..e49642e648f 100644 --- a/usr.sbin/smtpd/lka.c +++ b/usr.sbin/smtpd/lka.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka.c,v 1.83 2009/11/08 23:08:56 gilles Exp $ */ +/* $OpenBSD: lka.c,v 1.84 2009/11/09 22:28:08 gilles Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -1014,10 +1014,15 @@ lka_resolve_path(struct smtpd *env, struct lkasession *lkasession, struct path * case C_NET: case C_DOM: { char username[MAXLOGNAME]; + char *sep; struct passwd *pw; lowercase(username, path->user, sizeof(username)); + sep = strchr(username, '+'); + if (sep != NULL) + *sep = '\0'; + if (aliases_exist(env, path->rule.r_amap, username)) { path->flags |= F_PATH_ALIAS; return 1; |