search for: need_lstat

Displaying 3 results from an estimated 3 matches for "need_lstat".

2016 Mar 09
4
mkdir-dup test flapping
We looked at this some more, and Andrew seemed to understand and wrote the attached patch. > > We got the logs by forcing smbd to run with -d10 by patching > file_server/fileserver.c. The issue appears to be in this call: 3638 /* Ensure there was no race condition. */ 3639 if (!check_same_stat(&smb_dname->st, &fsp->fsp_name->st)) { 3640
2016 Mar 09
0
mkdir-dup test flapping
...e3/smbd/open.c b/source3/smbd/open.c > index baebd7c..bc676f9 100644 > --- a/source3/smbd/open.c > +++ b/source3/smbd/open.c > @@ -3397,6 +3397,7 @@ static NTSTATUS open_directory(connection_struct *conn, > struct timespec mtimespec; > int info = 0; > bool ok; > + bool need_lstat = false; > > if (is_ntfs_stream_smb_fname(smb_dname)) { > DEBUG(2, ("open_directory: %s is a stream name!\n", > @@ -3502,25 +3503,9 @@ static NTSTATUS open_directory(connection_struct *conn, > return status; > } > > - /* > - * If m...
2016 Mar 09
0
mkdir-dup test flapping
...not significant, we reworked the > code to do the lstat() after the fstat(), and not compare the owner. Fix is really close, but still needs a little work - the call to: fsp->file_id = vfs_file_id_from_sbuf(conn, &smb_dname->st); needs to be moved too (as in the race condition when need_lstat is true smb_dname->st isn't correctly initialized yet), or the lstat needs to be done both before and after. Doing the lstat twice might be safer as I'll need to check what uses fsp->file_id to ensure moving to after the lstat is safe. *Really* nice work though - thanks ! It's la...