From 5d47f8e5e59d0de7d7bac8a670f91423627b437e Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 17 Jan 2005 14:25:58 +0000 Subject: r4802: Don't try to update a column with the name "NULL" (This used to be commit ed38e6026494a2b58c70cc175c6e210bea454e5c) --- source3/passdb/pdb_sql.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/passdb') diff --git a/source3/passdb/pdb_sql.c b/source3/passdb/pdb_sql.c index 820280bcbf..ee9ece2baf 100644 --- a/source3/passdb/pdb_sql.c +++ b/source3/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++; -- cgit