Changeset 34558 in vbox for trunk/src/VBox/HostServices/auth/pam
- Timestamp:
- Dec 1, 2010 10:56:44 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 68349
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/auth/pam/VBoxAuthPAM.c
r33185 r34558 147 147 }; 148 148 149 static int vrdpauth_pam_init(void)149 static int auth_pam_init(void) 150 150 { 151 151 SymMap *iter; … … 155 155 if (!gpvLibPam) 156 156 { 157 debug_printf(" vrdpauth_pam_init: dlopen %s failed\n", VRDP_PAM_LIB);157 debug_printf("auth_pam_init: dlopen %s failed\n", VRDP_PAM_LIB); 158 158 return PAM_SYSTEM_ERR; 159 159 } … … 167 167 if (pv == NULL) 168 168 { 169 debug_printf(" vrdpauth_pam_init: dlsym %s failed\n", iter->pszName);169 debug_printf("auth_pam_init: dlsym %s failed\n", iter->pszName); 170 170 171 171 dlclose(gpvLibPam); … … 183 183 } 184 184 185 static void vrdpauth_pam_close(void)185 static void auth_pam_close(void) 186 186 { 187 187 if (gpvLibPam) … … 194 194 } 195 195 #else 196 static int vrdpauth_pam_init(void)196 static int auth_pam_init(void) 197 197 { 198 198 return PAM_SUCCESS; 199 199 } 200 200 201 static void vrdpauth_pam_close(void)201 static void auth_pam_close(void) 202 202 { 203 203 return; … … 205 205 #endif /* VRDP_PAM_DLLOAD */ 206 206 207 static const char * vrdpauth_get_pam_service (void)207 static const char *auth_get_pam_service (void) 208 208 { 209 209 const char *service = getenv (VRDP_AUTH_PAM_SERVICE_NAME_ENV); … … 273 273 } 274 274 275 /* The VRDPAuthentry point must be visible. */275 /* The entry point must be visible. */ 276 276 #if defined(_MSC_VER) || defined(__OS2__) 277 277 # define DECLEXPORT(type) __declspec(dllexport) type … … 285 285 286 286 /* prototype to prevent gcc warning */ 287 DECLEXPORT( VRDPAuthResult) VRDPAUTHCALL VRDPAuth (PVRDPAUTHUUID pUuid,288 VRDPAuthGuestJudgement guestJudgement,289 290 291 292 DECLEXPORT( VRDPAuthResult) VRDPAUTHCALL VRDPAuth (PVRDPAUTHUUID pUuid,293 VRDPAuthGuestJudgement guestJudgement,294 295 296 297 { 298 VRDPAuthResult result = VRDPAuthAccessDenied;287 DECLEXPORT(AuthResult) AUTHCALL VRDPAuth (PAUTHUUID pUuid, 288 AuthGuestJudgement guestJudgement, 289 const char *szUser, 290 const char *szPassword, 291 const char *szDomain); 292 DECLEXPORT(AuthResult) AUTHCALL VRDPAuth (PAUTHUUID pUuid, 293 AuthGuestJudgement guestJudgement, 294 const char *szUser, 295 const char *szPassword, 296 const char *szDomain) 297 { 298 AuthResult result = AuthResultAccessDenied; 299 299 300 300 int rc; … … 313 313 pam_conversation.appdata_ptr = &ctx; 314 314 315 rc = vrdpauth_pam_init ();315 rc = auth_pam_init (); 316 316 317 317 if (rc == PAM_SUCCESS) … … 319 319 debug_printf("init ok\n"); 320 320 321 rc = fn_pam_start( vrdpauth_get_pam_service (), szUser, &pam_conversation, &pam_handle);321 rc = fn_pam_start(auth_get_pam_service (), szUser, &pam_conversation, &pam_handle); 322 322 323 323 if (rc == PAM_SUCCESS) … … 344 344 debug_printf("access granted\n"); 345 345 346 result = VRDPAuthAccessGranted;346 result = AuthResultAccessGranted; 347 347 } 348 348 else … … 363 363 } 364 364 365 vrdpauth_pam_close ();366 367 debug_printf(" vrdpauth_pam_close completed\n");365 auth_pam_close (); 366 367 debug_printf("auth_pam_close completed\n"); 368 368 } 369 369 else 370 370 { 371 debug_printf(" vrdpauth_pam_init failed %d\n", rc);371 debug_printf("auth_pam_init failed %d\n", rc); 372 372 } 373 373 … … 376 376 377 377 /* Verify the function prototype. */ 378 static P VRDPAUTHENTRY gpfnAuthEntry = VRDPAuth;378 static PAUTHENTRY gpfnAuthEntry = VRDPAuth;
Note:
See TracChangeset
for help on using the changeset viewer.