[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3333-g4af1d07
Jeremy Allison
jra at samba.org
Wed Jan 7 00:07:38 GMT 2009
The branch, v3-2-test has been updated
via 4af1d077915c7bbe5268b78bde71b102861a2b98 (commit)
from 148437fcd0896591ebbf6c2808723575d025123f (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 4af1d077915c7bbe5268b78bde71b102861a2b98
Author: Jeremy Allison <jra at samba.org>
Date: Tue Jan 6 16:06:43 2009 -0800
Fix bug #6017, - magic script does not work. based on a patch from monyo at samba.gr.jp.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/smbd/close.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/smbd/close.c b/source/smbd/close.c
index 8c0fa99..7637ffb 100644
--- a/source/smbd/close.c
+++ b/source/smbd/close.c
@@ -67,10 +67,20 @@ static void check_magic(struct files_struct *fsp)
return;
}
- chmod(fsp->fsp_name,0755);
- ret = smbrun(fsp->fsp_name,&tmp_fd);
+ /* Ensure we don't depend on user's PATH. */
+ p = talloc_asprintf(ctx, "./%s", fsp->fsp_name);
+ if (!p) {
+ TALLOC_FREE(ctx);
+ return;
+ }
+
+ if (chmod(fsp->fsp_name,0755) == -1) {
+ TALLOC_FREE(ctx);
+ return;
+ }
+ ret = smbrun(p,&tmp_fd);
DEBUG(3,("Invoking magic command %s gave %d\n",
- fsp->fsp_name,ret));
+ p,ret));
unlink(fsp->fsp_name);
if (ret != 0 || tmp_fd == -1) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list