Author: jelmer
Date: 2005-01-17 14:39:13 +0000 (Mon, 17 Jan 2005)
New Revision: 4803

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

Log:
Don't try to update a column with the name "NULL"
-This line, and those below, will be ignored--

M    passdb/pdb_sql.c

Modified:
   trunk/source/passdb/pdb_sql.c


Changeset:
Modified: trunk/source/passdb/pdb_sql.c
===================================================================
--- trunk/source/passdb/pdb_sql.c       2005-01-17 14:25:58 UTC (rev 4802)
+++ trunk/source/passdb/pdb_sql.c       2005-01-17 14:39:13 UTC (rev 4803)
@@ -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