Changeset 86824 in vbox for trunk/src/VBox/Additions/common/pam/pam_vbox.cpp
- Timestamp:
- Nov 6, 2020 1:00:51 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/pam/pam_vbox.cpp
r82968 r86824 40 40 #include <iprt/assert.h> 41 41 #include <iprt/buildconfig.h> 42 #include <iprt/err.h> 42 43 #include <iprt/env.h> 43 44 #include <iprt/initterm.h> … … 51 52 52 53 #include <VBox/log.h> 53 #ifdef VBOX_WITH_GUEST_PROPS 54 # include <VBox/HostServices/GuestPropertySvc.h> 55 #endif 54 #include <VBox/HostServices/GuestPropertySvc.h> 56 55 57 56 #define VBOX_MODULE_NAME "pam_vbox" … … 382 381 } 383 382 384 385 #ifdef VBOX_WITH_GUEST_PROPS386 383 /** 387 384 * Reads a guest property. … … 550 547 return rc; 551 548 } 552 #endif553 549 554 550 /** … … 570 566 uint64_t u64StartMS = RTTimeMilliTS(); 571 567 572 #ifdef VBOX_WITH_GUEST_PROPS573 568 uint32_t uClientID = 0; 574 569 rc = VbglR3GuestPropConnect(&uClientID); … … 580 575 { 581 576 pam_vbox_log(pUserData->hPAM, "pam_vbox_wait_thread: clientID=%u\n", uClientID); 582 #endif 577 583 578 for (;;) 584 579 { 585 #ifdef VBOX_WITH_GUEST_PROPS 580 586 581 if (uClientID) 587 582 { … … 619 614 } 620 615 } 621 #endif 616 622 617 if ( RT_SUCCESS(rc) 623 618 || rc == VERR_TIMEOUT) … … 633 628 /* No credentials found, but try next round (if there's 634 629 * time left for) ... */ 635 #ifndef VBOX_WITH_GUEST_PROPS636 630 RTThreadSleep(500); /* Wait 500 ms. */ 637 #endif638 631 } 639 632 else … … 654 647 } 655 648 } 656 #ifdef VBOX_WITH_GUEST_PROPS657 649 } 658 650 VbglR3GuestPropDisconnect(uClientID); 659 #endif660 651 661 652 /* Save result. */ … … 668 659 return rc; 669 660 } 670 671 661 672 662 /** … … 706 696 } 707 697 708 709 698 DECLEXPORT(int) pam_sm_authenticate(pam_handle_t *hPAM, int iFlags, int argc, const char **argv) 710 699 { … … 727 716 bool fFallback = true; 728 717 729 #ifdef VBOX_WITH_GUEST_PROPS730 718 uint32_t uClientId; 731 719 rc = VbglR3GuestPropConnect(&uClientId); … … 816 804 VbglR3GuestPropDisconnect(uClientId); 817 805 } 818 #endif /* VBOX_WITH_GUEST_PROPS */819 806 820 807 if (fFallback)
Note:
See TracChangeset
for help on using the changeset viewer.