Author: jelmer
Date: 2005-01-17 14:25:58 +0000 (Mon, 17 Jan 2005)
New Revision: 4802

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

Log:
Don't try to update a column with the name "NULL"

Modified:
   branches/SAMBA_3_0/source/passdb/pdb_sql.c


Changeset:
Modified: branches/SAMBA_3_0/source/passdb/pdb_sql.c
===================================================================
--- branches/SAMBA_3_0/source/passdb/pdb_sql.c  2005-01-17 11:54:22 UTC (rev 
4801)
+++ branches/SAMBA_3_0/source/passdb/pdb_sql.c  2005-01-17 14:25:58 UTC (rev 
4802)
@@ -141,8 +141,14 @@
        swrite = strrchr(v, ':');
 
        /* Default to the same field as read field */
-       if (!swrite)
+       if (!swrite) {
+
+               /* Updating NULL does not make much sense */
+               if (!strcmp(v, "NULL")) 
+                       return NULL;
+
                return v;
+       }
 
        swrite++;
 

Reply via email to