When sending a request as follows: union smb_open io; mem_ctx = talloc_init("raw_open"); io.generic.level = RAW_OPEN_NTTRANS_CREATE; io.ntcreatex.in.flags = 0x16; io.ntcreatex.in.root_fid = 0; io.ntcreatex.in.access_mask = 0x196; io.ntcreatex.in.file_attr = 0; io.ntcreatex.in.alloc_size = 0; io.ntcreatex.in.share_access = 0; io.ntcreatex.in.open_disposition = 0; io.ntcreatex.in.create_options = 0x40; io.ntcreatex.in.impersonation = 0; io.ntcreatex.in.security_flags = 0; io.ntcreatex.in.fname = "bug.txt"; io.ntcreatex.in.sec_desc = NULL; io.ntcreatex.in.ea_list = NULL; ret = smb_raw_open(c->tree, mem_ctx, &io); Samba will return NT_STATUS_OK when in unicode mode. But if SMBCLI_FORCE_ASCII is set in the environment, the samba server will return NT_STATUS_FILE_IS_A_DIRECTORY. It goes without saying that there is no directory named bug.txt in the share. This bug exists for all file names I have tested.
Can you send me the complete test case code please, so I can try and reproduce this. Thanks, Jeremy.
Seems this is actually a samba4 sending bug and is not related to the server. Feel free to close this.