VirtualBox

Ignore:
Timestamp:
Nov 6, 2020 1:00:51 PM (4 years ago)
Author:
vboxsync
Message:

Additions/pam: For the PAM module guest properties (VBOX_WITH_GUEST_PROPS) are mandatory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/pam/pam_vbox.cpp

    r82968 r86824  
    4040#include <iprt/assert.h>
    4141#include <iprt/buildconfig.h>
     42#include <iprt/err.h>
    4243#include <iprt/env.h>
    4344#include <iprt/initterm.h>
     
    5152
    5253#include <VBox/log.h>
    53 #ifdef VBOX_WITH_GUEST_PROPS
    54 # include <VBox/HostServices/GuestPropertySvc.h>
    55 #endif
     54#include <VBox/HostServices/GuestPropertySvc.h>
    5655
    5756#define VBOX_MODULE_NAME                    "pam_vbox"
     
    382381}
    383382
    384 
    385 #ifdef VBOX_WITH_GUEST_PROPS
    386383/**
    387384 * Reads a guest property.
     
    550547    return rc;
    551548}
    552 #endif
    553549
    554550/**
     
    570566    uint64_t u64StartMS = RTTimeMilliTS();
    571567
    572 #ifdef VBOX_WITH_GUEST_PROPS
    573568    uint32_t uClientID = 0;
    574569    rc = VbglR3GuestPropConnect(&uClientID);
     
    580575    {
    581576        pam_vbox_log(pUserData->hPAM, "pam_vbox_wait_thread: clientID=%u\n", uClientID);
    582 #endif
     577
    583578        for (;;)
    584579        {
    585 #ifdef VBOX_WITH_GUEST_PROPS
     580
    586581            if (uClientID)
    587582            {
     
    619614                }
    620615            }
    621 #endif
     616
    622617            if (   RT_SUCCESS(rc)
    623618                || rc == VERR_TIMEOUT)
     
    633628                    /* No credentials found, but try next round (if there's
    634629                     * time left for) ... */
    635 #ifndef VBOX_WITH_GUEST_PROPS
    636630                    RTThreadSleep(500); /* Wait 500 ms. */
    637 #endif
    638631                }
    639632                else
     
    654647            }
    655648        }
    656 #ifdef VBOX_WITH_GUEST_PROPS
    657649    }
    658650    VbglR3GuestPropDisconnect(uClientID);
    659 #endif
    660651
    661652    /* Save result. */
     
    668659    return rc;
    669660}
    670 
    671661
    672662/**
     
    706696}
    707697
    708 
    709698DECLEXPORT(int) pam_sm_authenticate(pam_handle_t *hPAM, int iFlags, int argc, const char **argv)
    710699{
     
    727716    bool fFallback = true;
    728717
    729 #ifdef VBOX_WITH_GUEST_PROPS
    730718    uint32_t uClientId;
    731719    rc = VbglR3GuestPropConnect(&uClientId);
     
    816804        VbglR3GuestPropDisconnect(uClientId);
    817805    }
    818 #endif /* VBOX_WITH_GUEST_PROPS */
    819806
    820807    if (fFallback)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette