diff options
author | des <des@FreeBSD.org> | 2002-04-15 06:32:54 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-04-15 06:32:54 +0000 |
commit | bd0bbd9f7beb24d5eefac58e66363eab80b2938c (patch) | |
tree | db7b74e65c3f3045e5fb0cc9606ac25203aac388 /contrib/openpam/lib | |
parent | c9b90a6e8f5e826f77a92b42506fd554ca3254d2 (diff) | |
download | FreeBSD-src-bd0bbd9f7beb24d5eefac58e66363eab80b2938c.zip FreeBSD-src-bd0bbd9f7beb24d5eefac58e66363eab80b2938c.tar.gz |
Print newline after error and info messages (perforce change 9750)
Diffstat (limited to 'contrib/openpam/lib')
-rw-r--r-- | contrib/openpam/lib/openpam_ttyconv.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/openpam/lib/openpam_ttyconv.c b/contrib/openpam/lib/openpam_ttyconv.c index 1cef0ec..fc02405 100644 --- a/contrib/openpam/lib/openpam_ttyconv.c +++ b/contrib/openpam/lib/openpam_ttyconv.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#9 $ + * $P4: //depot/projects/openpam/lib/openpam_ttyconv.c#10 $ */ #include <sys/types.h> @@ -160,9 +160,15 @@ openpam_ttyconv(int n, break; case PAM_ERROR_MSG: fputs(msg[i]->msg, stderr); + if (strlen(msg[i]->msg) > 0 && + msg[i]->msg[strlen(msg[i]->msg) - 1] != '\n') + fputc('\n', stderr); break; case PAM_TEXT_INFO: fputs(msg[i]->msg, stdout); + if (strlen(msg[i]->msg) > 0 && + msg[i]->msg[strlen(msg[i]->msg) - 1] != '\n') + fputc('\n', stdout); break; default: goto fail; |