From ed38e6026494a2b58c70cc175c6e210bea454e5c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 17 Jan 2005 14:25:58 +0000 Subject: [PATCH] r4802: Don't try to update a column with the name "NULL" --- source/passdb/pdb_sql.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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++; -- 2.47.3