Author: des
Date: Thu Nov 19 05:44:41 2020
New Revision: 367831
URL: https://svnweb.freebsd.org/changeset/base/367831
Log:
Merge upstream r948: fix race condition in openpam_ttyconv(3).
Modified:
vendor/openpam/dist/CREDITS
vendor/openpam/dist/lib/libpam/openpam_ttyconv.c
Modified: vendor/openpam/dist/CREDITS
==============================================================================
--- vendor/openpam/dist/CREDITS Thu Nov 19 04:28:39 2020 (r367830)
+++ vendor/openpam/dist/CREDITS Thu Nov 19 05:44:41 2020 (r367831)
@@ -18,6 +18,7 @@ ideas:
Ankita Pal <[email protected]>
Baptiste Daroussin <[email protected]>
Brian Fundakowski Feldman <[email protected]>
+ Brooks Davis <[email protected]>
Christos Zoulas <[email protected]>
Daniel Richard G. <[email protected]>
Darren J. Moffat <[email protected]>
Modified: vendor/openpam/dist/lib/libpam/openpam_ttyconv.c
==============================================================================
--- vendor/openpam/dist/lib/libpam/openpam_ttyconv.c Thu Nov 19 04:28:39
2020 (r367830)
+++ vendor/openpam/dist/lib/libpam/openpam_ttyconv.c Thu Nov 19 05:44:41
2020 (r367831)
@@ -94,12 +94,6 @@ prompt_tty(int ifd, int ofd, const char *message, char
int pos, ret;
char ch;
- /* write prompt */
- if (write(ofd, message, strlen(message)) < 0) {
- openpam_log(PAM_LOG_ERROR, "write(): %m");
- return (-1);
- }
-
/* turn echo off if requested */
slflag = 0; /* prevent bogus uninitialized variable warning */
if (!echo) {
@@ -113,6 +107,12 @@ prompt_tty(int ifd, int ofd, const char *message, char
openpam_log(PAM_LOG_ERROR, "tcsetattr(): %m");
return (-1);
}
+ }
+
+ /* write prompt */
+ if (write(ofd, message, strlen(message)) < 0) {
+ openpam_log(PAM_LOG_ERROR, "write(): %m");
+ return (-1);
}
/* install signal handlers */
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"