svn commit: samba r24655 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

abartlet at samba.org abartlet at samba.org
Fri Aug 24 22:58:30 GMT 2007


Author: abartlet
Date: 2007-08-24 22:58:29 +0000 (Fri, 24 Aug 2007)
New Revision: 24655

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24655

Log:
Fix bug 4919 reported by Matthias Walln?\195?\182fer <mwallnoefer at yahoo.de>:

> When you change to the SAMBA private directory on a shell (default
> /usr/local/samba/private) and start there for example ldbedit with the sam.ldb,
> the application crashes if you don't put the "./" before the filename. 

I've adapted Matthias's patch.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c	2007-08-24 15:50:12 UTC (rev 24654)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/partition.c	2007-08-24 22:58:29 UTC (rev 24655)
@@ -722,11 +722,10 @@
 	}
 	if ( (p = strrchr(path, '/')) != NULL) {
 		p[0] = '\0';
+		full_name = talloc_asprintf(mem_ctx, "%s/%s", path, name);
 	} else {
-		talloc_free(path);
-		return NULL;
+		full_name = talloc_asprintf(mem_ctx, "./%s", name);
 	}
-	full_name = talloc_asprintf(mem_ctx, "%s/%s", path, name);
 	talloc_free(path);
 	return full_name;
 }



More information about the samba-cvs mailing list