mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
s3: torture: Change cmd_symlink to call SMB_VFS_SYMLINKAT().
Use conn->cwd_fsp as current fsp. No logic change for now. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
This commit is contained in:
parent
8c851da40f
commit
1354f2f521
@ -1157,6 +1157,7 @@ static NTSTATUS cmd_lock(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
|
||||
|
||||
static NTSTATUS cmd_symlink(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
|
||||
{
|
||||
int ret;
|
||||
struct smb_filename *new_smb_fname = NULL;
|
||||
|
||||
if (argc != 3) {
|
||||
@ -1170,7 +1171,11 @@ static NTSTATUS cmd_symlink(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc
|
||||
if (new_smb_fname == NULL) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
if (SMB_VFS_SYMLINK(vfs->conn, argv[1], new_smb_fname) == -1) {
|
||||
ret = SMB_VFS_SYMLINKAT(vfs->conn,
|
||||
argv[1],
|
||||
vfs->conn->cwd_fsp,
|
||||
new_smb_fname);
|
||||
if (ret == -1) {
|
||||
printf("symlink: error=%d (%s)\n", errno, strerror(errno));
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user