From f6525c7259fe0c731157828ef12804fd09228fa0 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 22 Jun 2009 10:07:53 -0400 Subject: 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. --- server/confdb/confdb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'server/confdb') 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; -- cgit