]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_dsi.c
Fix signal blocking, pthread_sigmask was called before mask initialisation. Also...
[netatalk.git] / etc / afpd / afp_dsi.c
index 6c6bc7d89e334ade0800fece736afa024c927310..7779b2307f9ca16f8dbda74b8587e8391d5950ad 100644 (file)
@@ -100,10 +100,9 @@ static void afp_dsi_close(AFPObj *obj)
     close_all_vol();
 
     if (obj->logout) {
-        /* Block SIGTERM, PAM might send us a SIGTERM in (*obj->logout)() -> pam_close_session() */
+        /* Block sigs, PAM/systemd/whoever might send us a SIG??? in (*obj->logout)() -> pam_close_session() */
+        sigfillset(&sigs);
         pthread_sigmask(SIG_BLOCK, &sigs, NULL);
-        sigemptyset(&sigs);
-        sigaddset(&sigs, SIGTERM);
         (*obj->logout)();
     }