Changeset 38548 in vbox for trunk/src/VBox/Additions/common/pam/pam_vbox.cpp
- Timestamp:
- Aug 26, 2011 1:25:29 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/pam/pam_vbox.cpp
r38545 r38548 84 84 * Write to system log. 85 85 * 86 * @param pszBuf Buffer to write to the log (NULL-terminated)86 * @param pszBuf Buffer to write to the log (NULL-terminated) 87 87 */ 88 88 static void pam_vbox_writesyslog(char *pszBuf) … … 101 101 * Displays an error message. 102 102 * 103 * @param pszFormat The message text.104 * @param ... Format arguments.103 * @param pszFormat The message text. 104 * @param ... Format arguments. 105 105 */ 106 106 static void pam_vbox_error(pam_handle_t *hPAM, const char *pszFormat, ...) … … 122 122 * Displays a debug message. 123 123 * 124 * @param pszFormat The message text.125 * @param ... Format arguments.124 * @param pszFormat The message text. 125 * @param ... Format arguments. 126 126 */ 127 127 static void pam_vbox_log(pam_handle_t *hPAM, const char *pszFormat, ...) … … 146 146 147 147 148 /** 149 * Sets a message using PAM's conversation function. 150 * 151 * @return IPRT status code. 152 * @param hPAM PAM handle. 153 * @param iStyle Style of message (0 = Information, 1 = Prompt 154 * echo off, 2 = Prompt echo on, 3 = Error). 155 * @param pszText Message text to set. 156 */ 148 157 static int vbox_set_msg(pam_handle_t *hPAM, int iStyle, const char *pszText) 149 158 { … … 201 210 202 211 212 /** 213 * Initializes pam_vbox. 214 * 215 * @return IPRT status code. 216 * @param hPAM PAM handle. 217 */ 203 218 static int pam_vbox_init(pam_handle_t *hPAM) 204 219 { … … 265 280 266 281 282 /** 283 * Shuts down pam_vbox. 284 * 285 * @return IPRT status code. 286 * @param hPAM PAM handle. 287 */ 267 288 static void pam_vbox_shutdown(pam_handle_t *hPAM) 268 289 { … … 271 292 272 293 294 /** 295 * Checks for credentials provided by the host / HGCM. 296 * 297 * @return IPRT status code. VERR_NOT_FOUND if no credentials are available, 298 * VINF_SUCCESS on successful retrieval or another IPRT error. 299 * @param hPAM PAM handle. 300 */ 273 301 static int pam_vbox_check_creds(pam_handle_t *hPAM) 274 302 { … … 335 363 336 364 #ifdef VBOX_WITH_GUEST_PROPS 365 /** 366 * Reads a guest property. 367 * 368 * @return IPRT status code. 369 * @param hPAM PAM handle. 370 * @param uClientID Guest property service client ID. 371 * @param pszKey Key (name) of guest property to read. 372 * @param fReadOnly Indicates whether this key needs to be 373 * checked if it only can be read (and *not* written) 374 * by the guest. 375 * @param pszValue Buffer where to store the key's value. 376 * @param cbValue Size of buffer (in bytes). 377 */ 337 378 static int pam_vbox_read_prop(pam_handle_t *hPAM, uint32_t uClientID, 338 379 const char *pszKey, bool fReadOnly, … … 428 469 429 470 471 /** 472 * Waits for a guest property to be changed. 473 * 474 * @return IPRT status code. 475 * @param hPAM PAM handle. 476 * @param uClientID Guest property service client ID. 477 * @param pszKey Key (name) of guest property to wait for. 478 * @param uTimeoutMS Timeout (in ms) to wait for the change. Specify 479 * RT_INDEFINITE_WAIT to wait indefinitly. 480 */ 430 481 static int pam_vbox_wait_prop(pam_handle_t *hPAM, uint32_t uClientID, 431 482 const char *pszKey, uint32_t uTimeoutMS) … … 477 528 478 529 530 /** 531 * Thread function waiting for credentials to arrive. 532 * 533 * @return IPRT status code. 534 * @param ThreadSelf Thread struct to this thread. 535 * @param pvUser Pointer to a PAMVBOXTHREAD structure providing 536 * required data used / set by the thread. 537 */ 479 538 static DECLCALLBACK(int) pam_vbox_wait_thread(RTTHREAD ThreadSelf, void *pvUser) 480 539 { … … 586 645 587 646 647 /** 648 * Waits for credentials to arrive by creating and waiting for a thread. 649 * 650 * @return IPRT status code. 651 * @param hPAM PAM handle. 652 * @param uClientID Guest property service client ID. 653 * @param pszKey Key (name) of guest property to wait for. 654 * @param uTimeoutMS Timeout (in ms) to wait for the change. Specify 655 * RT_INDEFINITE_WAIT to wait indefinitly. 656 */ 588 657 static int pam_vbox_wait_for_creds(pam_handle_t *hPAM, uint32_t uClientID, uint32_t uTimeoutMS) 589 658 { … … 600 669 pam_vbox_log(hPAM, "pam_vbox_wait_for_creds: Waiting for credentials (%dms) ...\n", uTimeoutMS); 601 670 /* Wait for thread to initialize. */ 671 /** @todo We can do something else here in the meantime later. */ 602 672 rc = RTThreadUserWait(threadWait, RT_INDEFINITE_WAIT); 603 673 if (RT_SUCCESS(rc)) … … 612 682 613 683 614 /**615 * Performs authentication within the PAM framework.616 *617 * @todo618 */619 684 DECLEXPORT(int) pam_sm_authenticate(pam_handle_t *hPAM, int iFlags, 620 685 int argc, const char **argv) … … 760 825 761 826 762 /**763 * Modifies / deletes user credentials764 *765 * @todo766 */767 827 DECLEXPORT(int) pam_sm_setcred(pam_handle_t *hPAM, int iFlags, int argc, const char **argv) 768 828 {
Note:
See TracChangeset
for help on using the changeset viewer.