]> code.citadel.org Git - citadel.git/blobdiff - citadel/server/user_ops.c
Be a little less enthusiastic about calling abort()
[citadel.git] / citadel / server / user_ops.c
index 84cc69023bfb8c077f0370c3d15b121a9c453fc2..fc21caf462fd63384f716c7f42ce47f06fb07ed3 100644 (file)
@@ -1,6 +1,6 @@
 // Server functions which perform operations on user objects.
 //
-// Copyright (c) 1987-2022 by the citadel.org team
+// Copyright (c) 1987-2023 by the citadel.org team
 //
 // This program is open source software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License, version 3.
@@ -739,21 +739,21 @@ void start_chkpwd_daemon(void) {
 
        if ((stat(file_chkpwd, &filestats)==-1) || (filestats.st_size==0)) {
                syslog(LOG_ERR, "user_ops: %s: %m", file_chkpwd);
-               abort();
+               exit(CTDLEXIT_CHKPWD);
        }
        if (pipe(chkpwd_write_pipe) != 0) {
                syslog(LOG_ERR, "user_ops: unable to create pipe for chkpwd daemon: %m");
-               abort();
+               exit(CTDLEXIT_CHKPWD);
        }
        if (pipe(chkpwd_read_pipe) != 0) {
                syslog(LOG_ERR, "user_ops: unable to create pipe for chkpwd daemon: %m");
-               abort();
+               exit(CTDLEXIT_CHKPWD);
        }
 
        chkpwd_pid = fork();
        if (chkpwd_pid < 0) {
                syslog(LOG_ERR, "user_ops: unable to fork chkpwd daemon: %m");
-               abort();
+               exit(CTDLEXIT_CHKPWD);
        }
        if (chkpwd_pid == 0) {
                dup2(chkpwd_write_pipe[0], 0);
@@ -761,7 +761,6 @@ void start_chkpwd_daemon(void) {
                for (i=2; i<256; ++i) close(i);
                execl(file_chkpwd, file_chkpwd, NULL);
                syslog(LOG_ERR, "user_ops: unable to exec chkpwd daemon: %m");
-               abort();
                exit(errno);
        }
 }