summaryrefslogtreecommitdiff
path: root/server/confdb
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-06-22 10:07:53 -0400
committerSimo Sorce <ssorce@redhat.com>2009-07-20 10:50:51 -0400
commitf6525c7259fe0c731157828ef12804fd09228fa0 (patch)
treedd46ca6af08a9d9e0ee5faefd47e45f0f6044f29 /server/confdb
parente519ed7c7f203a6a95e58b7e770253c093d2dec6 (diff)
downloadsssd-f6525c7259fe0c731157828ef12804fd09228fa0.tar.gz
sssd-f6525c7259fe0c731157828ef12804fd09228fa0.tar.bz2
sssd-f6525c7259fe0c731157828ef12804fd09228fa0.zip
Improvements to config file updates
1) Some text editors will create a new file and move it into place on top of the existing file. When this happens, the kernel issues an IN_IGNORE inotify event and automatically removes the watch descriptor for that file. We'll handle the event and create a new watch descriptor for the new file. We will attempt to rewatch the file six times at five-second intervals. 2) Some scripts may append new data to the config file in several steps (such as calling echo "foo" >> sssd.conf several times). In order to handle these scripts safely, we'll defer processing of inotify events for one second after the first is detected. This should be ample time for the remainder of the script to complete.
Diffstat (limited to 'server/confdb')
-rw-r--r--server/confdb/confdb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/confdb/confdb.h b/server/confdb/confdb.h
index b165d218..ad3f15a6 100644
--- a/server/confdb/confdb.h
+++ b/server/confdb/confdb.h
@@ -37,8 +37,9 @@
#define SERVICE_CONF_ENTRY "config/services"
struct confdb_ctx;
+struct config_file_ctx;
-typedef int (*confdb_reconf_fn) (struct confdb_ctx *cdb, void *pvt);
+typedef int (*confdb_reconf_fn) (struct config_file_ctx *file_ctx);
struct sss_domain_info {
char *name;