The branch, v4-9-test has been updated
       via  6a549df2419 ctdb-daemon: Exit with error if a database directory 
does not exist
      from  b2ef0e08a9b CVE-2018-16853: fix crash in expired passowrd case

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-9-test


- Log -----------------------------------------------------------------
commit 6a549df2419199e2364e6206fc3ab3cc2b4b0eaf
Author: Martin Schwenke <mar...@meltin.net>
Date:   Fri Nov 30 12:44:26 2018 +1100

    ctdb-daemon: Exit with error if a database directory does not exist
    
    Since 4.9.0, the log messages can be confusing if a required database
    directory does not exist.  Explicitly check for database directories,
    logging a clear error and exiting if one is missing.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=13696
    
    Signed-off-by: Martin Schwenke <mar...@meltin.net>
    Reviewed-by: Amitay Isaacs <ami...@gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <ami...@samba.org>
    Autobuild-Date(master): Mon Dec  3 06:56:41 CET 2018 on sn-devel-144
    
    (cherry picked from commit dd7574afd1b2fb6a88defa154bc3d15e94f9ce0d)
    
    Autobuild-User(v4-9-test): Karolin Seeger <ksee...@samba.org>
    Autobuild-Date(v4-9-test): Wed Dec  5 13:01:52 CET 2018 on sn-devel-144

-----------------------------------------------------------------------

Summary of changes:
 ctdb/server/ctdbd.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)


Changeset truncated at 500 lines:

diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c
index 721347c4733..45519a7fc3d 100644
--- a/ctdb/server/ctdbd.c
+++ b/ctdb/server/ctdbd.c
@@ -299,8 +299,28 @@ int main(int argc, const char *argv[])
         */
 
        ctdb->db_directory = ctdb_config.dbdir_volatile;
+       ok = directory_exist(ctdb->db_directory);
+       if (! ok) {
+               D_ERR("Volatile database directory %s does not exist\n",
+                     ctdb->db_directory);
+               goto fail;
+       }
+
        ctdb->db_directory_persistent = ctdb_config.dbdir_persistent;
+       ok = directory_exist(ctdb->db_directory_persistent);
+       if (! ok) {
+               D_ERR("Persistent database directory %s does not exist\n",
+                     ctdb->db_directory_persistent);
+               goto fail;
+       }
+
        ctdb->db_directory_state = ctdb_config.dbdir_state;
+       ok = directory_exist(ctdb->db_directory_state);
+       if (! ok) {
+               D_ERR("State database directory %s does not exist\n",
+                     ctdb->db_directory_state);
+               goto fail;
+       }
 
        if (ctdb_config.lock_debug_script != NULL) {
                ret = setenv("CTDB_DEBUG_LOCKS",


-- 
Samba Shared Repository

Reply via email to