[prev in list] [next in list] [prev in thread] [next in thread]
List: openswan-cvs
Subject: [Openswan CVS] xauth.c 1.41.4.3 1.41.4.4
From: paul () vault ! xelerance ! com (Paul Wouters)
Date: 2007-09-05 23:02:22
Message-ID: 20070905230222.8440EBEE7E () xelerance ! com
[Download RAW message or body]
Update
of /projects/xelerance/master/openswan-2/programs/pluto
In directory vault.xelerance.com:/tmp/cvs-serv13779
Modified Files:
Tag: v2_4_X
xauth.c
Log Message:
backport of xauth space in name patch
(git 05f21656f41b40f4b5bb50e6712b90193b209535)
Index: xauth.c
===================================================================
RCS file: /projects/xelerance/master/openswan-2/programs/pluto/xauth.c,v
retrieving revision 1.41.4.3
retrieving revision 1.41.4.4
diff -Lprograms/pluto/xauth.c -Lprograms/pluto/xauth.c -u -r1.41.4.3 -r1.41.4.4
--- programs/pluto/xauth.c
+++ programs/pluto/xauth.c
@@ -1806,10 +1806,11 @@
loglog(RC_LOG_SERIOUS, "XAUTH username prompt failed.");
return STF_FAIL;
}
- /* trip any trailing white space */
+ /* replace the first newline character with a string-terminating \0 */
{
- char *u = xauth_username;
- strsep(&u, " \n\t");
+ char* cptr = memchr(xauth_username, '\n', sizeof(xauth_username));
+ if (cptr)
+ *cptr = '\0';
}
out_raw(xauth_username, strlen(xauth_username)
,&attrval, "XAUTH username");
@@ -1835,11 +1836,11 @@
return STF_FAIL;
}
- /* trip any trailing white space */
+ /* replace the first newline character with a string-terminating \0. */
{
- char *u = xauth_password;
-
- strsep(&u, " \n\t");
+ char* cptr = memchr(xauth_password, '\n', sizeof(xauth_password));
+ if (cptr)
+ cptr = '\0';
}
out_raw(xauth_password, strlen(xauth_password)
,&attrval, "XAUTH password");
@@ -2273,6 +2274,10 @@
* $Id$
*
* $Log$
+ * Revision 1.41.4.4 2007/09/05 23:02:19 paul
+ * backport of xauth space in name patch
+ * (git 05f21656f41b40f4b5bb50e6712b90193b209535)
+ *
* Revision 1.41.4.3 2005/07/26 02:11:23 ken
* Pullin from HEAD:
* Split Aggressive mode into ikev1_aggr.c
_______________________________________________
Cvs mailing list
Cvs@openswan.org
http://lists.openswan.org/mailman/listinfo/cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic