/[mailutils]/mailutils/imap4d/bye.c
ViewVC logotype

Diff of /mailutils/imap4d/bye.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by gray, Sun Aug 4 08:20:24 2002 UTC revision 1.7 by gray, Tue Aug 13 13:24:57 2002 UTC
# Line 27  imap4d_bye (int reason) Line 27  imap4d_bye (int reason)
27  int  int
28  imap4d_bye0 (int reason, struct imap4d_command *command)  imap4d_bye0 (int reason, struct imap4d_command *command)
29  {  {
   struct passwd *pw = mu_getpwuid (getuid ());  
   const char *username;  
30    int status = EXIT_FAILURE;    int status = EXIT_FAILURE;
   username = (pw) ? pw->pw_name : "Unknown";  
31    
32    if (mbox)    if (mbox)
33      {      {
# Line 57  imap4d_bye0 (int reason, struct imap4d_c Line 54  imap4d_bye0 (int reason, struct imap4d_c
54        if (state == STATE_NONAUTH)        if (state == STATE_NONAUTH)
55          syslog (LOG_INFO, "Session timed out for no user");          syslog (LOG_INFO, "Session timed out for no user");
56        else        else
57          syslog (LOG_INFO, "Session timed out for user: %s", username);          syslog (LOG_INFO, "Session timed out for user: %s", auth_data->name);
58        break;        break;
59    
60      case ERR_NO_OFILE:      case ERR_NO_OFILE:
# Line 69  imap4d_bye0 (int reason, struct imap4d_c Line 66  imap4d_bye0 (int reason, struct imap4d_c
66        if (state == STATE_NONAUTH)        if (state == STATE_NONAUTH)
67          syslog (LOG_INFO, "Session terminating");          syslog (LOG_INFO, "Session terminating");
68        else        else
69          syslog (LOG_INFO, "Session terminating for user: %s", username);          syslog (LOG_INFO, "Session terminating for user: %s", auth_data->name);
70        status = EXIT_SUCCESS;        status = EXIT_SUCCESS;
71        break;        break;
72    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26