rpms/nspluginwrapper/devel nspluginwrapper-0.9.91.5-fork.patch, NONE, 1.1 nspluginwrapper.spec, 1.21, 1.22
Martin Stransky (stransky)
fedora-extras-commits at redhat.com
Mon Oct 15 09:33:28 UTC 2007
- Previous message (by thread): rpms/system-config-services/devel .cvsignore, 1.38, 1.39 sources, 1.48, 1.49 system-config-services.spec, 1.49, 1.50
- Next message (by thread): rpms/buildbot/devel .cvsignore, 1.3, 1.4 buildbot-no-shebang.patch, 1.1, 1.2 buildbot.spec, 1.4, 1.5 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: stransky
Update of /cvs/pkgs/rpms/nspluginwrapper/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13678
Modified Files:
nspluginwrapper.spec
Added Files:
nspluginwrapper-0.9.91.5-fork.patch
Log Message:
* Mon Oct 15 2007 Martin Stransky <stransky at redhat.com> 0.9.91.5-7
- added a fix for #281061 - gnash fails when wrapped, works when native
nspluginwrapper-0.9.91.5-fork.patch:
--- NEW FILE nspluginwrapper-0.9.91.5-fork.patch ---
diff -up nspluginwrapper-0.9.91.5/src/npw-viewer.c.old nspluginwrapper-0.9.91.5/src/npw-viewer.c
--- nspluginwrapper-0.9.91.5/src/npw-viewer.c.old 2007-10-15 10:56:37.000000000 +0200
+++ nspluginwrapper-0.9.91.5/src/npw-viewer.c 2007-10-15 11:18:57.000000000 +0200
@@ -64,6 +64,20 @@
// RPC global connections
rpc_connection_t *g_rpc_connection attribute_hidden = NULL;
+// Viewer orignal pid - check against incorrect plugins
+pid_t viewer_pid = 0;
+
+// Pid support routines
+void pid_set(void)
+{
+ viewer_pid = getpid();
+}
+
+int pid_check(void)
+{
+ return(viewer_pid == getpid());
+}
+
// Instance state information about the plugin
typedef struct _PluginInstance {
NPP instance;
@@ -542,6 +556,9 @@ static void
g_NPN_ForceRedraw(NPP instance)
{
D(bug("NPN_ForceRedraw instance=%p\n", instance));
+
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
UNIMPLEMENTED();
}
@@ -576,9 +593,11 @@ invoke_NPN_GetURL(NPP instance, const ch
static NPError
g_NPN_GetURL(NPP instance, const char *url, const char *target)
{
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
-
+
D(bug("NPN_GetURL instance=%p\n", instance));
NPError ret = invoke_NPN_GetURL(instance, url, target);
D(bug(" return: %d [%s]\n", ret, string_of_NPError(ret)));
@@ -616,6 +635,9 @@ invoke_NPN_GetURLNotify(NPP instance, co
static NPError
g_NPN_GetURLNotify(NPP instance, const char *url, const char *target, void *notifyData)
{
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
+
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
@@ -682,8 +704,11 @@ invoke_NPN_GetValue(NPP instance, NPNVar
static NPError
g_NPN_GetValue(NPP instance, NPNVariable variable, void *value)
-{
+{
D(bug("NPN_GetValue instance=%p, variable=%d [%08x]\n", instance, variable & 0xffff, variable));
+
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
switch (variable) {
case NPNVxDisplay:
@@ -737,6 +762,9 @@ static void
g_NPN_InvalidateRect(NPP instance, NPRect *invalidRect)
{
D(bug("NPN_InvalidateRect instance=%p\n", instance));
+
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
UNIMPLEMENTED();
}
@@ -746,6 +774,9 @@ static void
g_NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion)
{
D(bug("NPN_InvalidateRegion instance=%p\n", instance));
+
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
UNIMPLEMENTED();
}
@@ -809,6 +840,8 @@ invoke_NPN_PostURL(NPP instance, const c
static NPError
g_NPN_PostURL(NPP instance, const char *url, const char *target, uint32 len, const char *buf, NPBool file)
{
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
@@ -851,6 +884,9 @@ invoke_NPN_PostURLNotify(NPP instance, c
static NPError
g_NPN_PostURLNotify(NPP instance, const char *url, const char *target, uint32 len, const char *buf, NPBool file, void *notifyData)
{
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
+
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
@@ -865,6 +901,9 @@ static void
g_NPN_ReloadPlugins(NPBool reloadPages)
{
D(bug("NPN_ReloadPlugins reloadPages=%d\n", reloadPages));
+
+ if(!pid_check())
+ return;
UNIMPLEMENTED();
}
@@ -874,6 +913,9 @@ static JRIEnv *
g_NPN_GetJavaEnv(void)
{
D(bug("NPN_GetJavaEnv\n"));
+
+ if(!pid_check())
+ return NULL;
return NULL;
}
@@ -883,6 +925,9 @@ static jref
g_NPN_GetJavaPeer(NPP instance)
{
D(bug("NPN_GetJavaPeer instance=%p\n", instance));
+
+ if(!pid_check())
+ return NULL;
return NULL;
}
@@ -916,6 +961,8 @@ invoke_NPN_RequestRead(NPStream *stream,
static NPError
g_NPN_RequestRead(NPStream *stream, NPByteRange *rangeList)
{
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
if (stream == NULL || stream->ndata == NULL || rangeList == NULL)
return NPERR_INVALID_PARAM;
@@ -930,6 +977,9 @@ static NPError
g_NPN_SetValue(NPP instance, NPPVariable variable, void *value)
{
D(bug("NPN_SetValue instance=%p\n", instance));
+
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
UNIMPLEMENTED();
@@ -962,6 +1012,9 @@ invoke_NPN_Status(NPP instance, const ch
static void
g_NPN_Status(NPP instance, const char *message)
{
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
+
D(bug("NPN_Status instance=%p\n", instance));
invoke_NPN_Status(instance, message);
D(bug(" done\n"));
@@ -990,6 +1043,9 @@ invoke_NPN_UserAgent(void)
static const char *
g_NPN_UserAgent(NPP instance)
{
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
+
D(bug("NPN_UserAgent instance=%p\n", instance));
if (g_user_agent == NULL)
g_user_agent = invoke_NPN_UserAgent();
@@ -1072,6 +1128,8 @@ invoke_NPN_NewStream(NPP instance, NPMIM
static NPError
g_NPN_NewStream(NPP instance, NPMIMEType type, const char *target, NPStream **stream)
{
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
@@ -1117,6 +1175,9 @@ invoke_NPN_DestroyStream(NPP instance, N
static NPError
g_NPN_DestroyStream(NPP instance, NPStream *stream, NPError reason)
{
+ if(!pid_check())
+ return NPERR_INVALID_INSTANCE_ERROR;
+
if (instance == NULL)
return NPERR_INVALID_INSTANCE_ERROR;
@@ -1174,6 +1235,9 @@ invoke_NPN_Write(NPP instance, NPStream
static int32
g_NPN_Write(NPP instance, NPStream *stream, int32 len, void *buf)
{
+ if(!pid_check())
+ return -1;
+
if (instance == NULL)
return -1;
@@ -1210,6 +1274,8 @@ invoke_NPN_PushPopupsEnabledState(NPP in
static void
g_NPN_PushPopupsEnabledState(NPP instance, NPBool enabled)
{
+ if(!pid_check())
+ return;
if (instance == NULL)
return;
@@ -1241,6 +1307,8 @@ invoke_NPN_PopPopupsEnabledState(NPP ins
static void
g_NPN_PopPopupsEnabledState(NPP instance)
{
+ if(!pid_check())
+ return;
if (instance == NULL)
return;
@@ -1284,6 +1352,9 @@ invoke_NPN_CreateObject(NPP instance)
static NPObject *
g_NPN_CreateObject(NPP instance, NPClass *class)
{
+ if(!pid_check())
+ return NULL;
+
if (instance == NULL)
return NULL;
@@ -1324,6 +1395,9 @@ invoke_NPN_RetainObject(NPObject *npobj)
static NPObject *
g_NPN_RetainObject(NPObject *npobj)
{
+ if(!pid_check())
+ return NULL;
+
if (npobj == NULL)
return NULL;
@@ -1362,6 +1436,9 @@ invoke_NPN_ReleaseObject(NPObject *npobj
static void
g_NPN_ReleaseObject(NPObject *npobj)
{
+ if(!pid_check())
+ return;
+
if (npobj == NULL)
return;
@@ -1409,6 +1486,9 @@ static bool
g_NPN_Invoke(NPP instance, NPObject *npobj, NPIdentifier methodName,
const NPVariant *args, uint32_t argCount, NPVariant *result)
{
+ if(!pid_check())
+ return false;
+
if (!instance || !npobj || !npobj->_class || !npobj->_class->invoke)
return false;
@@ -1453,6 +1533,9 @@ static bool
g_NPN_InvokeDefault(NPP instance, NPObject *npobj,
const NPVariant *args, uint32_t argCount, NPVariant *result)
{
+ if(!pid_check())
+ return false;
+
if (!instance || !npobj || !npobj->_class || !npobj->_class->invokeDefault)
return false;
@@ -1495,6 +1578,9 @@ invoke_NPN_Evaluate(NPP instance, NPObje
static bool
g_NPN_Evaluate(NPP instance, NPObject *npobj, NPString *script, NPVariant *result)
{
+ if(!pid_check())
+ return false;
+
if (!instance || !npobj)
return false;
@@ -1542,6 +1628,9 @@ static bool
g_NPN_GetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName,
NPVariant *result)
{
+ if(!pid_check())
+ return false;
+
if (!instance || !npobj || !npobj->_class || !npobj->_class->getProperty)
return false;
@@ -1586,6 +1675,9 @@ static bool
g_NPN_SetProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName,
const NPVariant *value)
{
+ if(!pid_check())
+ return false;
+
if (!instance || !npobj || !npobj->_class || !npobj->_class->setProperty)
return false;
@@ -1627,6 +1719,9 @@ invoke_NPN_RemoveProperty(NPP instance,
static bool
g_NPN_RemoveProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName)
{
+ if(!pid_check())
+ return false;
+
if (!instance || !npobj || !npobj->_class || !npobj->_class->removeProperty)
return false;
@@ -1668,6 +1763,9 @@ invoke_NPN_HasProperty(NPP instance, NPO
static bool
g_NPN_HasProperty(NPP instance, NPObject *npobj, NPIdentifier propertyName)
{
+ if(!pid_check())
+ return false;
+
if (!instance || !npobj || !npobj->_class || !npobj->_class->hasProperty)
return false;
@@ -1709,6 +1807,9 @@ invoke_NPN_HasMethod(NPP instance, NPObj
static bool
g_NPN_HasMethod(NPP instance, NPObject *npobj, NPIdentifier methodName)
{
+ if(!pid_check())
+ return false;
+
if (!instance || !npobj || !npobj->_class || !npobj->_class->hasMethod)
return false;
@@ -1744,6 +1845,9 @@ invoke_NPN_SetException(NPObject *npobj,
static void
g_NPN_SetException(NPObject *npobj, const NPUTF8 *message)
{
+ if(!pid_check())
+ return;
+
D(bug("NPN_SetException npobj=%p, message='%s'\n", npobj, message));
invoke_NPN_SetException(npobj, message);
D(bug(" done\n"));
@@ -1805,6 +1909,8 @@ invoke_NPN_GetStringIdentifier(const NPU
static NPIdentifier
g_NPN_GetStringIdentifier(const NPUTF8 *name)
{
+ if(!pid_check())
+ return NULL;
if (name == NULL)
return NULL;
@@ -1854,6 +1960,9 @@ invoke_NPN_GetStringIdentifiers(const NP
static void
g_NPN_GetStringIdentifiers(const NPUTF8 **names, uint32_t nameCount, NPIdentifier *identifiers)
{
+ if(!pid_check())
+ return;
+
if (names == NULL)
return;
@@ -1895,6 +2004,9 @@ invoke_NPN_GetIntIdentifier(int32_t inti
static NPIdentifier
g_NPN_GetIntIdentifier(int32_t intid)
{
+ if(!pid_check())
+ return 0;
+
D(bug("NPN_GetIntIdentifier intid=%d\n", intid));
NPIdentifier ret = invoke_NPN_GetIntIdentifier(intid);
D(bug(" return: %p\n", ret));
@@ -1931,6 +2043,9 @@ invoke_NPN_IdentifierIsString(NPIdentifi
static bool
g_NPN_IdentifierIsString(NPIdentifier identifier)
{
+ if(!pid_check())
+ return false;
+
D(bug("NPN_IdentifierIsString identifier=%p\n", identifier));
bool ret = invoke_NPN_IdentifierIsString(identifier);
D(bug(" return: %d\n", ret));
@@ -1967,6 +2082,9 @@ invoke_NPN_UTF8FromIdentifier(NPIdentifi
static NPUTF8 *
g_NPN_UTF8FromIdentifier(NPIdentifier identifier)
{
+ if(!pid_check())
+ return NULL;
+
D(bug("NPN_UTF8FromIdentifier identifier=%p\n", identifier));
NPUTF8 *ret = invoke_NPN_UTF8FromIdentifier(identifier);
D(bug(" return: '%s'\n", ret));
@@ -2004,6 +2122,9 @@ invoke_NPN_IntFromIdentifier(NPIdentifie
static int32_t
g_NPN_IntFromIdentifier(NPIdentifier identifier)
{
+ if(!pid_check())
+ return 0;
+
D(bug("NPN_IntFromIdentifier identifier=%p\n", identifier));
int32_t ret = invoke_NPN_IntFromIdentifier(identifier);
D(bug(" return: %d\n", ret));
@@ -3008,6 +3129,9 @@ static int do_main(int argc, char **argv
}
D(bug(" Plugin connection: %s\n", connection_path));
+ pid_set();
+ D(bug(" Plugin viewer pid: %d\n", viewer_pid));
+
// Cleanup environment, the program may fork/exec a native shell
// script and having 32-bit libraries in LD_PRELOAD is not right,
// though not a fatal error
Index: nspluginwrapper.spec
===================================================================
RCS file: /cvs/pkgs/rpms/nspluginwrapper/devel/nspluginwrapper.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- nspluginwrapper.spec 10 Oct 2007 10:19:29 -0000 1.21
+++ nspluginwrapper.spec 15 Oct 2007 09:32:54 -0000 1.22
@@ -70,7 +70,7 @@
Summary: A compatibility layer for Netscape 4 plugins
Name: nspluginwrapper
Version: 0.9.91.5
-Release: 6%{?dist}
+Release: 7%{?dist}
Source0: %{name}-%{version}%{?svndate:-%{svndate}}.tar.bz2
Source1: %{plugin_config_name}.tar.gz
Source2: plugin-config.sh.in
@@ -80,6 +80,7 @@
Patch2: nspluginwrapper-0.9.91.5-rh.patch
Patch3: nspluginwrapper-0.9.91.4-config.patch
Patch4: nspluginwrapper-0.9.91.5-runtime-restart.patch
+Patch5: nspluginwrapper-0.9.91.5-fork.patch
License: GPL
Group: Networking/WWW
Url: http://gwenole.beauchesne.info/projects/nspluginwrapper/
@@ -112,6 +113,7 @@
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
# remove old/incompatibile stuff
rm -rf npapi
@@ -229,6 +231,9 @@
%{_sysconfdir}/sysconfig/%{name}
%changelog
+* Mon Oct 15 2007 Martin Stransky <stransky at redhat.com> 0.9.91.5-7
+- added a fix for #281061 - gnash fails when wrapped, works when native
+
* Wed Oct 10 2007 Martin Stransky <stransky at redhat.com> 0.9.91.5-6
- removed possibble deadlock during plugin restart
- Previous message (by thread): rpms/system-config-services/devel .cvsignore, 1.38, 1.39 sources, 1.48, 1.49 system-config-services.spec, 1.49, 1.50
- Next message (by thread): rpms/buildbot/devel .cvsignore, 1.3, 1.4 buildbot-no-shebang.patch, 1.1, 1.2 buildbot.spec, 1.4, 1.5 sources, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list