[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Wed Nov 25 15:48:20 MST 2009


The branch, master has been updated
       via  c5b234c... Fix warnings with talloc_asprintf. Jeremy.
      from  c96d487... 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.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit c5b234c9cde079aa45ed93c42b5ed5e66ac969a3
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Nov 25 14:47:36 2009 -0800

    Fix warnings with talloc_asprintf.
    Jeremy.

-----------------------------------------------------------------------

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