* FIX: Missing UAM links
* FIX: Lockup in AFP logout on Fedora 17
+* FIX: Reset signal handlers and alarm timer after successfull PAM
+ authentication. Fixes a problem with AFP disconnects caused
+ by pam_smbpass.so messing with our handlers and timer.
Changes in 2.2.3
================
}
}
-/* -------------------------------------------
- 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;
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);
/* pam_umask or similar might have changed our umask */
(void)umask(obj->options.umask);
+ /* Some PAM module might have reset our signal handlers and timer, so we need to reestablish them */
+ afp_over_dsi_sighandlers(obj);
+
return( AFP_OK );
}