]> arthur.barton.de Git - netatalk.git/commitdiff
Fix signal blocking, pthread_sigmask was called before mask initialisation. Also...
authorFrank Lahm <franklahm@googlemail.com>
Wed, 20 Jun 2012 13:33:26 +0000 (15:33 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 20 Jun 2012 13:33:26 +0000 (15:33 +0200)
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)();
     }