summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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++;