--- virtual.c.orig 2010-11-09 10:06:10.829767335 +0000 +++ virtual.c 2010-11-09 10:06:15.847769298 +0000 @@ -127,6 +127,7 @@ struct passwd *virtual_userpass(char *us char *address, *pathname; char *template, *passwd; int fail; + int vname_lookup_fail=1; int fd, size; *known = 0; @@ -137,7 +138,9 @@ struct passwd *virtual_userpass(char *us virtual_spool = NULL; #if VIRTUAL_VNAME - if (!(address = vname_lookup(user))) + if (address = vname_lookup(user)) + vname_lookup_fail=0; + else #endif if (!(address = lookup())) return NULL; @@ -154,7 +157,7 @@ struct passwd *virtual_userpass(char *us } /* This "can't happen", but is just too critical to not check explicitly */ - if (strchr(address, '/') || strchr(user, '/')) + if ( vname_lookup_fail && (strchr(address, '/') || strchr(user, '/')) ) return NULL; pathname = concat(VIRTUAL_HOME_PATH, "/", address, NULL);