mirror of
https://github.com/samba-team/samba.git
synced 2025-02-03 13:47:25 +03:00
libsmb: Fix the smbclient readlink command
We use cli_smb2_qpathinfo_basic() for cli_resolve_path() before calling cli_readlink(). This fails as it never tries with FILE_OPEN_REPARSE_POINT, so we never get to the point where we actually can issue the FSCTL_GET_REPARSE_POINT. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
f471b2c70e
commit
3804161dca
@ -1614,6 +1614,24 @@ NTSTATUS cli_smb2_qpathinfo_basic(struct cli_state *cli,
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (NT_STATUS_EQUAL(status, NT_STATUS_STOPPED_ON_SYMLINK)) {
|
||||
/* Maybe a reparse point ? */
|
||||
status = cli_smb2_create_fnum(cli,
|
||||
name,
|
||||
0, /* create_flags */
|
||||
SMB2_IMPERSONATION_IMPERSONATION,
|
||||
FILE_READ_ATTRIBUTES, /* desired_access */
|
||||
0, /* file attributes */
|
||||
FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, /* share_access */
|
||||
FILE_OPEN, /* create_disposition */
|
||||
FILE_OPEN_REPARSE_POINT, /* create_options */
|
||||
NULL,
|
||||
&fnum,
|
||||
&cr,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user