From: Jelmer Vernooij Date: Mon, 17 Jan 2005 14:25:58 +0000 (+0000) Subject: r4802: Don't try to update a column with the name "NULL" X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~5411 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ed38e6026494a2b58c70cc175c6e210bea454e5c;p=thirdparty%2Fsamba.git r4802: Don't try to update a column with the name "NULL" --- 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++;