[Pkg-wmaker-commits] [wmbiff] 26/77: use chomp to remove the newline from ssh-askpass output

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 03:01:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to tag wmbiff_0_4_0
in repository wmbiff.

commit 612cade79e7f5f4e7830d7d1dca4a15929f3f3ee
Author: bluehal <bluehal>
Date:   Mon Apr 15 01:26:50 2002 +0000

    use chomp to remove the newline from ssh-askpass output
---
 wmbiff/passwordMgr.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/wmbiff/passwordMgr.c b/wmbiff/passwordMgr.c
index 96d273f..7c19314 100644
--- a/wmbiff/passwordMgr.c
+++ b/wmbiff/passwordMgr.c
@@ -23,6 +23,7 @@
 
 #include "passwordMgr.h"
 #include "Client.h"
+#include "charutil.h"			/* chomp */
 #include <unistd.h>
 #include <sys/types.h>
 #include <stdlib.h>
@@ -106,7 +107,6 @@ const char *passwordFor(const char *username,
 		if (permissions_ok(pc, pc->askpass)) {
 			char buf[255];
 			FILE *fp;
-			int l;
 			int exit_status;
 			strcpy(p->user, username);
 			strcpy(p->server, servername);
@@ -141,10 +141,7 @@ const char *passwordFor(const char *username,
 				}
 			}
 
-			/* chomp; */
-			l = strlen(p->password) - 1;
-			if (p->password[l] == '\n')
-				p->password[l] = '\0';
+			chomp(p->password);
 			p->next = pass_list;
 			pass_list = p;
 			return (p->password);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git



More information about the Pkg-wmaker-commits mailing list