]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/afp_dsi.c
Reset signal handlers and alarm timer after successfull PAM authentication
[netatalk.git] / etc / afpd / afp_dsi.c
index 7779b2307f9ca16f8dbda74b8587e8391d5950ad..8529177d6cf85588270148e1cca524cbcb64d54a 100644 (file)
@@ -383,23 +383,11 @@ static void pending_request(DSI *dsi)
     }
 }
 
-/* -------------------------------------------
- afp over dsi. this never returns. 
-*/
-void afp_over_dsi(AFPObj *obj)
+void afp_over_dsi_sighandlers(AFPObj *obj)
 {
     DSI *dsi = (DSI *) obj->handle;
-    int rc_idx;
-    u_int32_t err, cmd;
-    u_int8_t function;
     struct sigaction action;
 
-    AFPobj = obj;
-    obj->exit = afp_dsi_die;
-    obj->reply = (int (*)()) dsi_cmdreply;
-    obj->attention = (int (*)(void *, AFPUserBytes)) dsi_attention;
-    dsi->tickle = 0;
-
     memset(&action, 0, sizeof(action));
     sigfillset(&action.sa_mask);
     action.sa_flags = SA_RESTART;
@@ -462,6 +450,25 @@ void afp_over_dsi(AFPObj *obj)
         afp_dsi_die(EXITERR_SYS);
     }
 #endif /* DEBUGGING */
+}
+
+/* -------------------------------------------
+ afp over dsi. this never returns. 
+*/
+void afp_over_dsi(AFPObj *obj)
+{
+    DSI *dsi = (DSI *) obj->handle;
+    int rc_idx;
+    u_int32_t err, cmd;
+    u_int8_t function;
+
+    AFPobj = obj;
+    obj->exit = afp_dsi_die;
+    obj->reply = (int (*)()) dsi_cmdreply;
+    obj->attention = (int (*)(void *, AFPUserBytes)) dsi_attention;
+    dsi->tickle = 0;
+
+    afp_over_dsi_sighandlers(obj);
 
     if (dircache_init(obj->options.dircachesize) != 0)
         afp_dsi_die(EXITERR_SYS);