iliaa Mon Dec 6 19:34:33 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src NEWS
/php-src/ext/snmp snmp.c
Log:
MFh: Fixed bug #30995 (snmp extension does not build with net-snmp 5.2).
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.762&r2=1.1247.2.763&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.762 php-src/NEWS:1.1247.2.763
--- php-src/NEWS:1.1247.2.762 Mon Dec 6 18:31:57 2004
+++ php-src/NEWS Mon Dec 6 19:34:32 2004
@@ -1,7 +1,8 @@
PHP 4 NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Nov 2004, Version 4.3.10
-- Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag).
+- Fixed bug #30995 (snmp extension does not build with net-snmp 5.2). (Ilia)
+- Fixed bug #30990 (allow popen() on *NIX to accept 'b' flag). (Ilia)
23 Nov 2004, Version 4.3.10RC1
- Added the %F modifier to *printf to render a non-locale-aware representation
http://cvs.php.net/diff.php/php-src/ext/snmp/snmp.c?r1=1.70.2.14&r2=1.70.2.15&ty=u
Index: php-src/ext/snmp/snmp.c
diff -u php-src/ext/snmp/snmp.c:1.70.2.14 php-src/ext/snmp/snmp.c:1.70.2.15
--- php-src/ext/snmp/snmp.c:1.70.2.14 Tue Feb 3 09:44:17 2004
+++ php-src/ext/snmp/snmp.c Mon Dec 6 19:34:33 2004
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: snmp.c,v 1.70.2.14 2004/02/03 14:44:17 iliaa Exp $ */
+/* $Id: snmp.c,v 1.70.2.15 2004/12/07 00:34:33 iliaa Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -769,7 +769,21 @@
s->securityPrivProtoLen = OIDSIZE(usmDESPrivProtocol);
return (0);
#ifdef HAVE_AES
- } else if (!strcasecmp(prot, "AES128")) {
+ } else if (!strcasecmp(prot, "AES128")
+#ifdef SNMP_VALIDATE_ERR
+/*
+* In Net-SNMP before 5.2, the following symbols exist:
+* usmAES128PrivProtocol, usmAES192PrivProtocol, usmAES256PrivProtocol
+* In an effort to be more standards-compliant, 5.2 removed the last two.
+* As of 5.2, the symbols are:
+* usmAESPrivProtocol, usmAES128PrivProtocol
+*
+* As we want this extension to compile on both versions, we use the latter
+* symbol on purpose, as it's defined to be the same as the former.
+*/
+ || !strcasecmp(prot, "AES")) {
+#else
+ ) {
s->securityPrivProto = usmAES128PrivProtocol;
s->securityPrivProtoLen =
OIDSIZE(usmAES128PrivProtocol);
return (0);
@@ -782,6 +796,7 @@
s->securityPrivProtoLen =
OIDSIZE(usmAES256PrivProtocol);
return (0);
#endif
+#endif
} else if (strlen(prot)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid
privacy protocol: %s", prot);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php