if (*s == '/') ++s;
struct control *faketoreal(char *x, char *y, struct request *r, int update, int maxlen){	struct control *c;	char *s, *t;	struct passwd *p;	int l;	if (r->vs == 0) {		log_d("virtualhost not initialized!");		return 0;	}	c = r->vs->vserver->controls;	while (c) {		if (c->locations && c->alias) {			s = c->exact_match ? exactmatch(x, c->alias) : dirmatch(x, c->alias);			if (s) {				if (c->user_directory == 0) {					l = expand_hostname(y, c->locations->name, r->host, maxlen - 1);					r->location_length = l;					if (c->locations->name[0] == '/' || !c->path_args_ok)						sprintf(y + l, "%.*s", maxlen - (l + 1), s);					break;				} else {					t = strchr(s, '/');					if (t)						*t = 0;					p = getpwnam(s);					if (t)						*t = '/';					if (p == 0 || p->pw_dir == 0)						return 0;					l = strlen(p->pw_dir);					if (l + 2 > maxlen) {						log_d("overflow in faketoreal");						return 0;					}					l = sprintf(y, "%s/%.*s", p->pw_dir, maxlen - (l + 2), c->locations->name);					r->location_length = l;					maxlen -= l + 1;					if (t && (c->locations->name[0] == '/' || !c->path_args_ok))						sprintf(y + l, "%.*s", maxlen, t);					break;				}			}		}		c = c->next;	}	if (c && update)		c->locations = c->locations->next;	return c;}