- Timestamp:
- Jan 25, 2012 5:26:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/pam/pam_vbox.cpp
r39741 r39880 55 55 #endif 56 56 57 #define VBOX_MODULE_NAME "pam_vbox" 57 #define VBOX_MODULE_NAME "pam_vbox" 58 59 #define VBOX_PAM_FLAG_SILENT "PAM_SILENT" 60 #define VBOX_PAM_FLAG_DISALLOW_NULL_AUTHTOK "PAM_DISALLOW_NULL_AUTHTOK" 61 #define VBOX_PAM_FLAG_ESTABLISH_CRED "PAM_ESTABLISH_CRED" 62 #define VBOX_PAM_FLAG_DELETE_CRED "PAM_DELETE_CRED" 63 #define VBOX_PAM_FLAG_REINITIALIZE_CRED "PAM_REINITIALIZE_CRED" 64 #define VBOX_PAM_FLAG_REFRESH_CRED "PAM_REFRESH_CRED" 58 65 59 66 RT_C_DECLS_BEGIN … … 676 683 int rc = RTThreadCreate(&threadWait, pam_vbox_wait_thread, 677 684 (void *)&threadData, 0, 678 RTTHREADTYPE_DEFAULT, RTTHREADFLAGS_WAITABLE, "pam_vbox");685 RTTHREADTYPE_DEFAULT, NULL /* Non-waitable */, "pam_vbox"); 679 686 if (RT_SUCCESS(rc)) 680 687 { … … 703 710 g_verbosity = 1; 704 711 else 705 pam_vbox_error(hPAM, "pam_ sm_authenticate: unknown command line argument \"%s\"\n", argv[i]);712 pam_vbox_error(hPAM, "pam_vbox_authenticate: unknown command line argument \"%s\"\n", argv[i]); 706 713 } 707 714 pam_vbox_log(hPAM, "pam_vbox_authenticate called\n"); … … 737 744 if (!uTimeoutMS) 738 745 { 739 pam_vbox_error(hPAM, "pam_ sm_authenticate: invalid waiting timeout value specified, defaulting to infinite timeout\n");746 pam_vbox_error(hPAM, "pam_vbox_authenticate: invalid waiting timeout value specified, defaulting to infinite timeout\n"); 740 747 uTimeoutMS = RT_INDEFINITE_WAIT; 741 748 } … … 755 762 pszWaitMsg ? pszWaitMsg : "Waiting for credentials ..."); 756 763 if (RT_FAILURE(rc2)) /* Not critical. */ 757 pam_vbox_error(hPAM, "pam_ sm_authenticate: error setting waiting information message, rc=%Rrc\n", rc2);764 pam_vbox_error(hPAM, "pam_vbox_authenticate: error setting waiting information message, rc=%Rrc\n", rc2); 758 765 759 766 if (RT_SUCCESS(rc)) … … 765 772 { 766 773 rc = pam_vbox_wait_for_creds(hPAM, uClientId, uTimeoutMS); 767 if ( RT_SUCCESS(rc))774 if (rc == VERR_TIMEOUT) 768 775 { 769 /* Waiting for credentials succeeded, try getting those ... */ 770 rc = pam_vbox_check_creds(hPAM); 771 if (RT_FAILURE(rc)) 772 pam_vbox_error(hPAM, "pam_sm_authenticate: no credentials given, even when waited for it, rc=%Rrc\n", rc); 773 } 774 else if (rc == VERR_TIMEOUT) 775 { 776 pam_vbox_log(hPAM, "pam_sm_authenticate: no credentials given within time\n"); 776 pam_vbox_log(hPAM, "pam_vbox_authenticate: no credentials given within time\n"); 777 777 778 778 rc2 = pam_vbox_read_prop(hPAM, uClientId, … … 788 788 else if (rc == VERR_CANCELLED) 789 789 { 790 pam_vbox_log(hPAM, "pam_ sm_authenticate: waiting aborted\n");790 pam_vbox_log(hPAM, "pam_vbox_authenticate: waiting aborted\n"); 791 791 792 792 rc2 = pam_vbox_read_prop(hPAM, uClientId,
Note:
See TracChangeset
for help on using the changeset viewer.