Author: vlendec
Date: 2007-08-07 11:50:03 +0000 (Tue, 07 Aug 2007)
New Revision: 24267

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

Log:
Fix the build farm

I had only tested with "net getlocalsid". posix_locking_init() calls this
with a NULL name...

Modified:
   branches/SAMBA_3_2/source/lib/util_tdb.c
   branches/SAMBA_3_2_0/source/lib/util_tdb.c


Changeset:
Modified: branches/SAMBA_3_2/source/lib/util_tdb.c
===================================================================
--- branches/SAMBA_3_2/source/lib/util_tdb.c    2007-08-07 11:28:04 UTC (rev 
24266)
+++ branches/SAMBA_3_2/source/lib/util_tdb.c    2007-08-07 11:50:03 UTC (rev 
24267)
@@ -696,7 +696,7 @@
        log_ctx.log_fn = tdb_log;
        log_ctx.log_private = NULL;
 
-       if (hash_size == 0) {
+       if ((hash_size == 0) && (name != NULL)) {
                const char *base = strrchr_m(name, '/');
                if (base != NULL) {
                        base += 1;
@@ -940,7 +940,7 @@
                return NULL;
        }
 
-       if (hash_size == 0) {
+       if ((hash_size == 0) && (name != NULL)) {
                const char *base = strrchr_m(name, '/');
                if (base != NULL) {
                        base += 1;

Modified: branches/SAMBA_3_2_0/source/lib/util_tdb.c
===================================================================
--- branches/SAMBA_3_2_0/source/lib/util_tdb.c  2007-08-07 11:28:04 UTC (rev 
24266)
+++ branches/SAMBA_3_2_0/source/lib/util_tdb.c  2007-08-07 11:50:03 UTC (rev 
24267)
@@ -696,7 +696,7 @@
        log_ctx.log_fn = tdb_log;
        log_ctx.log_private = NULL;
 
-       if (hash_size == 0) {
+       if ((hash_size == 0) && (name != NULL)) {
                const char *base = strrchr_m(name, '/');
                if (base != NULL) {
                        base += 1;
@@ -940,7 +940,7 @@
                return NULL;
        }
 
-       if (hash_size == 0) {
+       if ((hash_size == 0) && (name != NULL)) {
                const char *base = strrchr_m(name, '/');
                if (base != NULL) {
                        base += 1;

Reply via email to