// 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.
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);
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);
}
}