Changeset 95147 in vbox for trunk/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
- Timestamp:
- May 31, 2022 3:19:40 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151641
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
r95007 r95147 392 392 } 393 393 394 /* As a last resort, try the TTY's name instead. */ 394 /** @todo Should we - distinguished from the login service - also set the hostname as PAM_TTY? 395 * The pam_access and pam_systemd talk about this. Similarly, SSH and cron use "ssh" and "cron" for PAM_TTY 396 * (see PAM_TTY_KLUDGE). */ 397 #ifdef IPRT_WITH_PAM_TTY_KLUDGE 395 398 if (RT_FAILURE(rc2)) 396 399 { 397 if (RTStrPrintf2(szTTY, sizeof(szTTY), "%s", ttyname(0)) <= 0) 400 if (!RTStrICmp(pszPamService, "access")) /* Access management needed? */ 401 { 402 int err = gethostname(szTTY, sizeof(szTTY)); 403 if (err == 0) 404 rc2 = VINF_SUCCESS; 405 } 406 } 407 #endif 408 /* As a last resort, try stdin's TTY name instead (if any). */ 409 if (RT_FAILURE(rc2)) 410 { 411 if (RTStrPrintf2(szTTY, sizeof(szTTY), "%s", ttyname(STDIN_FILENO)) > 0) 412 rc2 = VINF_SUCCESS; 413 else 398 414 rc2 = VERR_BUFFER_OVERFLOW; 399 415 }
Note:
See TracChangeset
for help on using the changeset viewer.