From: Frank Lichtenheld Date: Wed, 18 Feb 2026 21:47:06 +0000 (+0100) Subject: auth-pam: fix discards 'const' qualifier from pointer target type X-Git-Tag: v2.7.1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fd42e6d1da93655d97aeb32f549d684728d3fbd;p=thirdparty%2Fopenvpn.git auth-pam: fix discards 'const' qualifier from pointer target type strstr now returns const char*. Change-Id: I632368451923116e0a169ddb5b6e86a8f8486afc Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1543 Message-Id: <20260218214712.27119-1-gert@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg35728.html Signed-off-by: Gert Doering (cherry picked from commit eeaedd13628e27225c8893c2d8bdf5381fc33ba9) --- diff --git a/src/plugins/auth-pam/utils.c b/src/plugins/auth-pam/utils.c index d7b544a12..a4d2d0b07 100644 --- a/src/plugins/auth-pam/utils.c +++ b/src/plugins/auth-pam/utils.c @@ -66,12 +66,11 @@ searchandreplace(const char *tosearch, const char *searchfor, const char *replac /* state: all parameters are valid */ const char *searching = tosearch; - char *scratch; char temp[templen + 1]; temp[0] = 0; - scratch = strstr(searching, searchfor); + const char *scratch = strstr(searching, searchfor); if (!scratch) { return strdup(tosearch);