log(L_DEBUG, "lstat(\"%s\")", b);
static int check_symlinks(struct request *r){	char *p = r->path_translated;	struct control *c = r->c;	char b[PATHLEN];	struct stat buf;	char *s, *t;	int flag = 1;	if (c->symlinksok)		return 0;	strcpy(b, p);	t = b + (c->directory ? strlen(c->directory) : 0);	s = b + strlen(b);	while (--s > t) {		if (*s == '/') {			*s = '\0';			flag = 1;		}		else if (flag) {			flag = 0;			if (lstat(b, &buf) == -1) {				lerror("lstat");				return -1;			}			if (S_ISLNK(buf.st_mode)) {				log(L_WARNING, "%s is a symbolic link", b);					return -1;			}		}	}	return 0;}