summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-01-17 14:25:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:55 -0500
commited38e6026494a2b58c70cc175c6e210bea454e5c (patch)
treefc637597be6ca2d6e08d6d723e40d1023a57c2df /source
parent760455875f78a29c3fedd7de3671d6ae537c1d1a (diff)
downloadsamba-ed38e6026494a2b58c70cc175c6e210bea454e5c.tar.gz
samba-ed38e6026494a2b58c70cc175c6e210bea454e5c.tar.xz
samba-ed38e6026494a2b58c70cc175c6e210bea454e5c.zip
r4802: Don't try to update a column with the name "NULL"
Diffstat (limited to 'source')
-rw-r--r--source/passdb/pdb_sql.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/passdb/pdb_sql.c b/source/passdb/pdb_sql.c
index 820280bcbf6..ee9ece2baf0 100644
--- a/source/passdb/pdb_sql.c
+++ b/source/passdb/pdb_sql.c
@@ -141,8 +141,14 @@ static const char * config_value_write(const char *location, const char *name, c
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++;