summaryrefslogtreecommitdiff
path: root/source3
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
commit5d47f8e5e59d0de7d7bac8a670f91423627b437e (patch)
tree8927581ac76146c72e6b139d20acf5f825ee4139 /source3
parent69e24e59a4230f3261c49de6661512a9b502f735 (diff)
downloadsamba-5d47f8e5e59d0de7d7bac8a670f91423627b437e.tar.gz
samba-5d47f8e5e59d0de7d7bac8a670f91423627b437e.tar.bz2
samba-5d47f8e5e59d0de7d7bac8a670f91423627b437e.zip
r4802: Don't try to update a column with the name "NULL"
(This used to be commit ed38e6026494a2b58c70cc175c6e210bea454e5c)
Diffstat (limited to 'source3')
-rw-r--r--source3/passdb/pdb_sql.c8
1 files changed, 7 insertions, 1 deletions
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++;