mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
s3:modules: VFS CAP symlinkat always fails
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14941
Found by covscan.
Since capnew is initialized by NULL, checking it too early makes the
rest of the function a dead code.
Pair-programmed-with: Andreas Schneider <asn@samba.org>
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 41ebb7f68c
)
Autobuild-User(v4-15-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-15-test): Wed Jan 12 12:43:05 UTC 2022 on sn-devel-184
This commit is contained in:
committed by
Jule Anger
parent
76e7fdb70c
commit
680f68a072
@ -448,7 +448,7 @@ static int cap_symlinkat(vfs_handle_struct *handle,
|
|||||||
int saved_errno = 0;
|
int saved_errno = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!capold || !capnew) {
|
if (capold == NULL) {
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user