s3: smbd: Inside call_trans2setfilepathinfo(), for the TRANSACT2_SETPATHINFO case...
authorJeremy Allison <jra@samba.org>
Tue, 14 Dec 2021 00:48:14 +0000 (16:48 -0800)
committerJeremy Allison <jra@samba.org>
Wed, 15 Dec 2021 18:36:31 +0000 (18:36 +0000)
commitd508dff634509eb9c3a69ef628f618eeeda34d9b
treee506a39743bacd8de3b27e42462c7e5ddf9f820c
parenteabcaa2e5545abce9363b729a8128046e10a6191
s3: smbd: Inside call_trans2setfilepathinfo(), for the TRANSACT2_SETPATHINFO case, ensure we have a VALID_STAT return from filename_convert().

Remember, filename_convert() can return NT_STATUS_OK
with !VALID_STAT() if the last component doesn't exist,
as this may be an object create.

For call_trans2setfilepathinfo(), there are only 4 info levels
for the TRANSACT2_SETPATHINFO (pathname) case that don't require
an existing filesystem object (i.e. a VALID_STAT()) in the return
from filename_convert() as they can create an object in the
filesystem.

If we don't get a VALID_STAT() and the info level isn't one of
those 4, error out.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
source3/smbd/trans2.c