[PATCH] Ensure default SMB_VFS_GETWD() call can't return a partially completed struct smb_filename.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] Ensure default SMB_VFS_GETWD() call can't return a partially completed struct smb_filename.

Samba - samba-technical mailing list
When I converted SMB_VFS_GETWD() to return a struct smb_filename *
I messed up and allowed it to return a partially constructed
struct if the underlying sys_getwd() returned NULL (i.e. I didn't immediately
return NULL if sys_getwd() failed).

Found whilst investigating a different bug, but this is a pretty
obvious fix. Only affects 4.7 as that contains the struct smb_filename *
VFS changes.

Please review and push for master if happy !

Cheers,

Jeremy.

0001-s3-VFS-Ensure-default-SMB_VFS_GETWD-call-can-t-retur.patch (999 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] Ensure default SMB_VFS_GETWD() call can't return a partially completed struct smb_filename.

Samba - samba-technical mailing list
On Tue, Oct 03, 2017 at 12:43:48AM +0000, Jeremy Allison wrote:

> When I converted SMB_VFS_GETWD() to return a struct smb_filename *
> I messed up and allowed it to return a partially constructed
> struct if the underlying sys_getwd() returned NULL (i.e. I didn't immediately
> return NULL if sys_getwd() failed).
>
> Found whilst investigating a different bug, but this is a pretty
> obvious fix. Only affects 4.7 as that contains the struct smb_filename *
> VFS changes.
>
> Please review and push for master if happy !

pushed.

-slow