[SCM] Samba Shared Repository - branch v3-5-test updated
Jeremy Allison
jra at samba.org
Wed Nov 25 15:48:43 MST 2009
The branch, v3-5-test has been updated
via ebd6a9f... Fix warnings with talloc_asprintf. Jeremy. (cherry picked from commit c5b234c9cde079aa45ed93c42b5ed5e66ac969a3)
from 0047845... Make us pass RAW-CHKPATH with a case sensitive share. I know Volker will look at this closely so here's the explaination :-). Originally on a case-sensitive share we simply did a stat (or lstat) call and returned success of fail based on the result. However this failed to take account of incoming paths with a wildcard (which must always fail, and with different error messages depending on whether the wildcard is the last component or in the path). Also it failed to take account of a stat fail with ENOENT due to a missing component of the path as the last component (which is ok as it could be a new file) or if the ENOENT was due to the missing component within the path (not the last component) - which must return the correct error. What this means is that with "case sensitive = yes" we do one more talloc call (to get the parent directory) and one more stat call (on the parent directory) in the case where the stat call fails. I think this is an acceptabl
e overhead to enable case sensitive shares to return the correct error messages for applications. Volker please examine carefully :-). Jeremy. (cherry picked from commit c96d487ae3c65c17b377bb316adac4b5775448f3)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test
- Log -----------------------------------------------------------------
commit ebd6a9fb8fd510a7998867c6ea19b0b690f1a402
Author: Jeremy Allison <jra at samba.org>
Date: Wed Nov 25 14:47:36 2009 -0800
Fix warnings with talloc_asprintf.
Jeremy.
(cherry picked from commit c5b234c9cde079aa45ed93c42b5ed5e66ac969a3)
-----------------------------------------------------------------------
Summary of changes:
source3/printing/nt_printing.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index 7c449f9..5f5f344 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1602,9 +1602,9 @@ static uint32 get_correct_cversion(struct pipes_struct *p,
****************************************************************************/
#define strip_driver_path(_mem_ctx, _element) do { \
- if ((_p = strrchr(_element, '\\')) != NULL) { \
- _element = talloc_asprintf(_mem_ctx, _p+1); \
- W_ERROR_HAVE_NO_MEMORY(_element); \
+ if ((_p = strrchr((_element), '\\')) != NULL) { \
+ (_element) = talloc_asprintf((_mem_ctx), "%s", _p+1); \
+ W_ERROR_HAVE_NO_MEMORY((_element)); \
} \
} while (0);
--
Samba Shared Repository
More information about the samba-cvs
mailing list