[Samba] samba-2.2.3a bug, including fix
Mark Wheadon
M.C.Wheadon at ukc.ac.uk
Wed Feb 20 04:19:04 GMT 2002
Hi - here's how to reproduce the problem.
umask 22
mkdir foo
chmod 311 foo
mkdir foo/baz
echo hello > foo/baz/test.txt
then type the path to test.txt into Windows explorer (for example) -
can't browse to it as foo isn't readable, but you can get there by
typing the path as there's search permission. It works, but generates:
[2002/02/20 09:49:47, 0] smbd/vfs.c:vfs_GetWd(794)
vfs_GetWd: vfs_getwd call failed, errno Permission denied
in the samba log file. Note that a pwd in the UNIX world in the above
directory (foo/baz) succeeds (as search permission is enough), but
vfs_GetWd() fails.
Our setup here generates truck-loads of these error messages.
My fix is to do the vfs_GetWd() after becoming root rather than before
in oplock.c (i.e. swap two lines in oplock.c).
Cheers,
Mark
Here's a patch for 2.2.3a (generated with diff -u):
--- samba-2.2.3a/source/smbd/oplock.c.orig Wed Feb 20 09:56:47 2002
+++ samba-2.2.3a/source/smbd/oplock.c Wed Feb 20 09:58:48 2002
@@ -730,8 +730,8 @@
saved_user_conn = current_user.conn;
saved_vuid = current_user.vuid;
saved_fsp_conn = fsp->conn;
- vfs_GetWd(saved_fsp_conn,saved_dir);
change_to_root_user();
+ vfs_GetWd(saved_fsp_conn,saved_dir);
/* Save the chain fnum. */
file_chain_save();
More information about the samba
mailing list