vfs_GetWd depends upon a current tcon in fake_acls, otherwise it will
call openat with an invalid dirfd on a relative pathname.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
return;
}
- cwdfname = vfs_GetWd(talloc_tos(), conn);
- if (cwdfname == NULL) {
- return;
+ if (conn->tcon_done) {
+ cwdfname = vfs_GetWd(talloc_tos(), conn);
}
DBG_INFO("Impersonated user: uid=(%d,%d), gid=(%d,%d), cwd=[%s]\n",
(int)geteuid(),
(int)getgid(),
(int)getegid(),
- cwdfname->base_name);
+ cwdfname ? cwdfname->base_name : "no cwd");
TALLOC_FREE(cwdfname);
}