[Fedora-directory-commits] esc/src/app/xul/esc/chrome/content/esc advancedinfo.xul, NONE, 1.1
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26679
Added Files:
advancedinfo.xul
Log Message:
Latest updates.
--- NEW FILE advancedinfo.xul ---
<?xml version="1.0"?>
<?xml-stylesheet href="esc.css" type="text/css"?>
<!-- ***** BEGIN COPYRIGHT BLOCK *****
* This Program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; version 2 of the License.
*
* This Program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
***** END COPYRIGHT BLOCK ***** -->
<!DOCTYPE window SYSTEM "chrome://esc/locale/esc.dtd">
<window
class="escwindow"
id="esc-window"
onload="ShowAdvancedInfo();"
onunload="cleanup();"
title="&escTitle;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<stringbundle id="esc_strings" src="chrome://esc/locale/esc.properties"/>
<script src="AdvancedInfo.js"/>
<script src="ESC.js"/>
<script src="TRAY.js"/>
<grid class="logoBox">
<rows >
<row>
<image id="logoImage"/>
<spacer class="horSpacerShort"/>
<vbox>
<spacer flex="1"/>
<label value="&advancedInfoTitle;" class = "headLabelText"/>
<spacer flex="1"/>
</vbox>
</row>
</rows>
</grid>
<description class="messageText">
&diagnosticsMessage;
</description>
<groupbox flex = "1" >
<textbox id="advanced-info" flex="1" multiline="true" readonly="true" />
<!-- <iframe id="advanced-info" src="" flex="1" /> -->
</groupbox>
<hbox >
<spacer flex = "1"/>
<button id="copytocp" label = "©ToClipboard;" oncommand="DoCopyAdvancedInfoToClipBoard();"/>
<button id="closebtn" label="&closeNow;" oncommand="window.close();" />
</hbox>
</window>
17 years, 6 months
[Fedora-directory-commits] esc/src/app/xpcom Makefile.moz, 1.2, 1.3 rhCoolKey.cpp, 1.2, 1.3 rhICoolKey.idl, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xpcom
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26524
Modified Files:
Makefile.moz rhCoolKey.cpp rhICoolKey.idl
Log Message:
Latest updates.
Index: Makefile.moz
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/Makefile.moz,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile.moz 13 Sep 2006 17:50:07 -0000 1.2
+++ Makefile.moz 27 Sep 2006 17:22:20 -0000 1.3
@@ -103,6 +103,7 @@
install::
ifdef DESTDIR
$(NSINSTALL) $(DEPLOY_OBJDIR)/esc/* $(DESTDIR)
+ $(NSINSTALL) $(CORE_DIST)/bin/escd $(DESTDIR)
endif
all:: export libs
Index: rhCoolKey.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhCoolKey.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rhCoolKey.cpp 13 Sep 2006 17:50:07 -0000 1.2
+++ rhCoolKey.cpp 27 Sep 2006 17:22:20 -0000 1.3
@@ -39,6 +39,7 @@
#include "nsXPCOMGlue.h"
#include "prlink.h"
#include "nscore.h"
+#include "content/nsCopySupport.h"
#include <vector>
#include <string>
@@ -1066,6 +1067,43 @@
return NS_OK;
}
+
+/* boolean GetCoolKeyIsReallyCoolKey (in unsigned long aKeyType, in string aKeyID); */
+
+
+NS_IMETHODIMP rhCoolKey::GetCoolKeyIsReallyCoolKey(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval)
+{
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyIsReallyCoolKey thread: %p \n",PR_GetCurrentThread()));
+
+ if (ASCCoolKeyIsAvailable(aKeyType, (char *) aKeyID)) {
+ if (aKeyID) {
+ AutoCoolKey key(aKeyType, aKeyID);
+ PRBool isCool = CoolKeyIsReallyCoolKey(&key);
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyIsReallyCoolKey isCool: %d \n",(int) isCool));
+ *_retval= isCool;
+ return NS_OK;
+ }
+ }
+ *_retval = PR_FALSE;
+ return NS_OK;
+}
+
+/* long GetCoolKeyGetAppletVer (in unsigned long aKeyType, in string aKeyID, in boolean aIsMajor); */
+NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAppletVer(PRUint32 aKeyType, const char *aKeyID, PRBool aIsMajor, PRInt32 *_retval)
+{
+
+ PR_LOG(coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyAppletVer thread: %p \n",PR_GetCurrentThread()));
+
+ AutoCoolKey key(aKeyType, aKeyID);
+
+ int ver = CoolKeyGetAppletVer(&key, aIsMajor);
+
+ *_retval = ver;
+
+ return S_OK;
+
+}
+
/* boolean rhCoolKeyIsEnrolled (in unsigned long aKeyType, in string aKeyID); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyIsEnrolled(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval)
@@ -1094,6 +1132,9 @@
string certInfo = "";
*aCertInfo = NULL;
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyCertInfo thread: %p \n",PR_GetCurrentThread()));
+
+
AutoCoolKey key(aKeyType, aKeyID);
@@ -1317,7 +1358,7 @@
{
PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyVersion \n"));
- char *version = "1.0.0-10";
+ char *version = "1.0.0-16";
char *versionVal = (char *) nsMemory::Clone(version,sizeof(char) * strlen(version) + 1);
Index: rhICoolKey.idl
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhICoolKey.idl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rhICoolKey.idl 13 Sep 2006 17:50:07 -0000 1.2
+++ rhICoolKey.idl 27 Sep 2006 17:22:20 -0000 1.3
@@ -19,6 +19,7 @@
#include "rhIKeyNotify.idl"
#include "nsIObserver.idl"
+interface nsIDOMHTMLDocument;
[scriptable,uuid(ea54eee4-9548-4b63-b94d-c519ffc91d09)]
interface rhICoolKey: nsISupports
@@ -73,9 +74,15 @@
void SetCoolKeyDataValue(in unsigned long aKeyType,in string aKeyID,in string name,in string value);
boolean SetCoolKeyConfigValue(in string aName, in string aValue);
+
+ boolean GetCoolKeyIsReallyCoolKey(in unsigned long aKeyType, in string aKeyID);
+
+ long GetCoolKeyGetAppletVer(in unsigned long aKeyType, in string aKeyID , in boolean aIsMajor);
+
string GetCoolKeyConfigValue(in string aName);
string GetCoolKeyVersion();
+
};
17 years, 6 months
[Fedora-directory-commits] esc/src/app/xpcom/tray rhITray.idl, 1.2, 1.3 rhLinuxTray.cpp, 1.2, 1.3 rhMacTray.cpp, 1.2, 1.3 rhTray.cpp, 1.2, 1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xpcom/tray
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26495
Modified Files:
rhITray.idl rhLinuxTray.cpp rhMacTray.cpp rhTray.cpp
Log Message:
Latest updates.
Index: rhITray.idl
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/tray/rhITray.idl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rhITray.idl 13 Sep 2006 17:50:07 -0000 1.2
+++ rhITray.idl 27 Sep 2006 17:21:58 -0000 1.3
@@ -24,6 +24,8 @@
void setwindnotifycallback(in rhITrayWindNotify jsNotify);
void unsetwindnotifycallback(in rhITrayWindNotify jsNotify);
+ void setmenuitemtext(in unsigned long aIndex, in string aText);
+
};
Index: rhLinuxTray.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/tray/rhLinuxTray.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rhLinuxTray.cpp 13 Sep 2006 17:50:07 -0000 1.2
+++ rhLinuxTray.cpp 27 Sep 2006 17:21:58 -0000 1.3
@@ -269,7 +269,6 @@
mInitialized = 1;
- notify_icon_hide();
return S_OK;
}
@@ -421,18 +420,21 @@
if(event->button == 1)
{
+ PR_LOG( trayLog, PR_LOG_DEBUG, ("rhTray::IconCBProc Clicked!\n"));
+
+ NotifyTrayWindListeners(MENU_EVT,MENU_SHOW);
rhTray::ShowAllListeners();
return;
-
-
}
-
- if(mIconMenu)
+ if(event->button == 2 || event->button == 3)
{
- g_print("trying to create popup menu. \n");
- gtk_menu_popup(GTK_MENU(mIconMenu),
+
+ if(mIconMenu)
+ {
+ g_print("trying to create popup menu. \n");
+ gtk_menu_popup(GTK_MENU(mIconMenu),
NULL,
NULL,
NULL,
@@ -440,7 +442,8 @@
event->button,
event->time);
- }
+ }
+ }
}
@@ -586,6 +589,52 @@
}
+/* void setmenuitemtext (in unsigned long aIndex, in string aText); */
+NS_IMETHODIMP rhTray::Setmenuitemtext(PRUint32 aIndex, const char *aText)
+{
+
+ PR_LOG( trayLog, PR_LOG_DEBUG, ("rhTray::Setmenuitemtext: index: %d text %s. \n",aIndex,aText));
+
+ if(!aText)
+ return S_OK;
+
+ if(!mIconMenu)
+ return S_OK;
+
+ if(aIndex < 0 || aIndex > 10)
+ return S_OK;
+
+ GList *iterate = NULL;
+
+ GList* children = gtk_container_get_children (GTK_CONTAINER (mIconMenu));
+
+ unsigned int i = 0;
+ for (iterate = children; iterate; iterate=iterate->next)
+ {
+ PR_LOG( trayLog, PR_LOG_DEBUG, ("rhTray::Setmenuitemtext: index: %d \n",i));
+ if(aIndex == i)
+ {
+ PR_LOG( trayLog, PR_LOG_DEBUG, ("rhTray::Setmenuitemtext: About to reset text of item %p. \n",(void *) iterate->data));
+ if(iterate->data)
+ {
+ GtkWidget *label = gtk_bin_get_child(GTK_BIN(iterate->data));
+
+ if(label)
+ {
+
+ gtk_label_set_text(GTK_LABEL(label),aText);
+ }
+ }
+
+ break;
+ }
+
+ i++;
+ }
+
+ return S_OK;
+}
+
//rhTrayWindNotify methods
rhITrayWindNotify* rhTray::GetTrayWindNotifyListener(rhITrayWindNotify *listener)
@@ -719,15 +768,27 @@
return S_OK;
}
-
void rhTrayWindowListener::ShowWindow()
{
if(mWnd)
{
- gtk_widget_show(mWnd);
+ GtkWidget *widget = NULL;
+
+ widget = GTK_WIDGET(mWnd);
-
- gtk_window_deiconify(GTK_WINDOW(mWnd));
+ if(widget->window)
+ {
+ if(GTK_WIDGET_VISIBLE(mWnd))
+ {
+ gdk_window_show(widget->window);
+ gdk_window_raise(widget->window);
+
+ }
+ else
+ {
+ gtk_widget_show(widget);
+ }
+ }
PR_LOG( trayLog, PR_LOG_DEBUG, ("rhTrayWindowListener:: ShowWindow \n"));
}
Index: rhMacTray.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/tray/rhMacTray.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rhMacTray.cpp 13 Sep 2006 17:50:07 -0000 1.2
+++ rhMacTray.cpp 27 Sep 2006 17:21:58 -0000 1.3
@@ -503,6 +503,13 @@
}
+/* void setmenuitemtext (in unsigned long aIndex, in string aText); */
+NS_IMETHODIMP rhTray::Setmenuitemtext(PRUint32 aIndex, const char *aText)
+{
+ return S_OK;
+}
+
+
//rhTrayWindNotify methods
rhITrayWindNotify* rhTray::GetTrayWindNotifyListener(rhITrayWindNotify *listener)
Index: rhTray.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/tray/rhTray.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rhTray.cpp 13 Sep 2006 17:50:07 -0000 1.2
+++ rhTray.cpp 27 Sep 2006 17:21:58 -0000 1.3
@@ -641,6 +641,13 @@
}
+/* void setmenuitemtext (in unsigned long aIndex, in string aText); */
+NS_IMETHODIMP rhTray::Setmenuitemtext(PRUint32 aIndex, const char *aText)
+{
+ return S_OK;
+}
+
+
//rhTrayWindNotify methods
rhITrayWindNotify* rhTray::GetTrayWindNotifyListener(rhITrayWindNotify *listener)
17 years, 6 months
[Fedora-directory-commits] esc/rpm esc, NONE, 1.1 esc.desktop, NONE, 1.1 esc.spec, NONE, 1.1
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/rpm
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26292
Added Files:
esc esc.desktop esc.spec
Log Message:
Initial revision
--- NEW FILE esc ---
#!/bin/sh
ESC_PROFILE_BASE=~/.redhat/esc
ESC_LOG_FILE=esc.log
ESC_PATH=$LIBDIR/esc-1.0.0
ESC_BIN_PATH=/usr/bin
ESC_EXEC=esc
ESCD_EXEC=escd
ESC_BIN=$ESC_PATH/xulrunner/xulrunner-bin
ESCD_BIN=./$ESCD_EXEC
LAST_PROG_PID=0
SIGUSR1=10
FORCE_START_ESC=$1
XPTI_DAT=xpti.dat
COMPREG_DAT=compreg.dat
function isProgRunning {
userID=$(whoami)
isProgRunning=$(pgrep -U $userID -f $1)
if [ $isProgRunning ];
then
LAST_PROG_PID=$isProgRunning
return 0
fi
LAST_PROG_PID=0
return 1
}
function removeFile {
if [ -w $1 ]
then
rm -f $1
fi
}
export NSPR_LOG_MODULES=tray:2,coolKeyLib:2,coolKey:2,coolKeyNSS:2,coolKeySmart:2,coolKeyHandler:2,escDLog:5
if [ ! -d $ESC_PROFILE_BASE ]
then
mkdir -p $ESC_PROFILE_BASE
fi
export NSPR_LOG_FILE=$ESC_PROFILE_BASE/$ESC_LOG_FILE
cd $ESC_PATH
isProgRunning $ESC_BIN
if [ $LAST_PROG_PID -gt 0 ]
then
./$ESC_EXEC
exit 0
fi
if [ $FORCE_START_ESC ]
then
./$ESC_EXEC
exit 0
fi
isProgRunning $ESCD_BIN
if [ $LAST_PROG_PID -gt 0 ]
then
kill -$SIGUSR1 $LAST_PROG_PID
else
removeFile $ESC_PROFILE_BASE/*default/$XPTI_DAT
removeFile $ESC_PROFILE_BASE/*default/$COMPREG_DAT
./$ESCD_EXEC --key_Inserted=\"/usr/bin/esc\" --on_Signal=\"/usr/bin/esc\"
fi
exit 0
--- NEW FILE esc.desktop ---
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=Smart Card Manager
Comment=Enterprise Security Client Smart Card Manager
Categories=System;Application;SystemSetup;X-Red-Hat-Base;
Exec=esc
Icon=esc.png
--- NEW FILE esc.spec ---
Name: esc
Version: 1.0.0
Release: 16%{?dist}
Summary: Enterprise Security Client Smart Card Client
License: GPL
URL: http://directory.fedora.redhat.com/wiki/CoolKey
Group: Applications/Internet
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Patch1: firefox-1.5.0.1-dumpstack.patch
Patch2: xulrunner-1.8.0.1-coreconf.patch
Patch3: firefox-1.5-with-system-nss.patch
Patch4: firefox-1.1-nss-system-nspr.patch
Patch5: esc-1.0.0-xul-sys-nss-nspr.patch
Patch6: esc-1.0.0-ui-enhance.patch
Patch7: esc-1.0.0-notify-icon-fixes.patch
Patch8: esc-1.0.0-strings-fix.patch
Patch11: esc-1.0.0.strings-1-fix.patch
Patch12: esc-1.0.0-ui-enhance-1.patch
Patch13: esc-1.0.0-pw-reset-fix.patch
Patch14: esc-1.0.0-escd.patch
Patch15: esc-1.0.0-escd1.patch
Patch16: esc-1.0.0-escd2.patch
Patch17: esc-1.0.0-build-fix.patch
Patch18: esc-1.0.0-diag-fix.patch
BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1
BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel
BuildRequires: pango-devel libpng-devel pkgconfig zlib-devel
BuildRequires: nspr-devel nss-devel
BuildRequires: autoconf213 libX11-devel libXt-devel
BuildRequires: pcsc-lite-devel coolkey-devel
BuildRequires: desktop-file-utils zip binutils libnotify-devel
BuildRequires: dbus-devel
Requires: pcsc-lite ifd-egate coolkey nss nspr
Requires: zip dbus >= 0.90 libnotify >= 0.4.2
# 390 does not have coolkey or smartCards
# Xulrunner won't compile on ppc64 right now.
ExcludeArch: s390 s390x ppc64
# We can't allow the internal xulrunner to leak out
AutoReqProv: 0
#%define __prelink_undo_cmd %{nil}
%define escname %{name}-%{version}
%define escdir %{_libdir}/%{escname}
%define escbindir %{_bindir}
%define esc_chromepath chrome/content/esc
%define appdir applications
%define icondir %{_datadir}/icons/hicolor/48x48/apps
%define esc_vendor esc
%define autostartdir %{_sysconfdir}/xdg/autostart
%define pixmapdir %{_datadir}/pixmaps
%define docdir %{_defaultdocdir}/%{escname}
%define escappdir src/app/xpcom
Source0: %{escname}.tar.bz2
Source1: esc
Source2: esc.desktop
Source3: xulrunner-1.8.0.1-source.tar.bz2
%description
Enterprise Security Client allows the user to enroll and manage their
cryptographic smartcards.
%prep
%setup -q -c -n %{escname}
#patch esc to use system nss and nspr.
%patch5 -p1 -b .fix5
%patch6 -p1 -b .fix6
%patch7 -p1 -b .fix7
%patch8 -p1 -b .fix8
%patch11 -p1 -b .fix11
%patch12 -p1 -b .fix12
%patch13 -p1 -b .fix13
%patch14 -p1 -b .fix14
%patch15 -p1 -b .fix15
%patch16 -p1 -b .fix16
%patch17 -p1 -b .fix17
%patch18 -p1 -b .fix18
#Unpack xulrunner where esc expects it to be.
%setup -T -D -a 3 -n %{escname}/esc/dist/src
#Perform the patching of xulrunner
cd mozilla
%patch1 -p1 -b .fix1
%patch2 -p1 -b .fix2
%patch3 -p1 -b .fix3
%patch4 -p1 -b .fix4
%build
%ifarch x86_64 ppc64 ia64
USE_64=1
export USE_64
%endif
# last setup call moved the current directory
cd ../..
make BUILD_OPT=1 HAVE_LIB_NOTIFY=1
%install
cd ../../src/app/xpcom
mkdir -p $RPM_BUILD_ROOT/%{escbindir}
mkdir -p $RPM_BUILD_ROOT/%{icondir}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{appdir}
mkdir -p $RPM_BUILD_ROOT/%{autostartdir}
mkdir -p $RPM_BUILD_ROOT/%{pixmapdir}
mkdir -p $RPM_BUILD_ROOT/%{docdir}
sed -e 's;\$LIBDIR;'%{_libdir}';g' %{SOURCE1} > $RPM_BUILD_ROOT/%{escbindir}/%{name}
chmod 755 $RPM_BUILD_ROOT/%{escbindir}/esc
mkdir -p $RPM_BUILD_ROOT/%{escdir}
%ifarch x86_64 ppc64 ia64
USE_64=1
export USE_64
%endif
make BUILD_OPT=1 install DESTDIR=$RPM_BUILD_ROOT/%{escdir}
rm -rf $RPM_BUILD_ROOT/%{escdir}/usr
cd ../../../dist/*OPT*/esc_build/esc
cp %{esc_chromepath}/esc.png $RPM_BUILD_ROOT/%{icondir}
ln -s $RPMBUILD_ROOT%{icondir}/esc.png $RPM_BUILD_ROOT/%{pixmapdir}/esc.png
cp %{SOURCE2} $RPM_BUILD_ROOT/%{_datadir}/%{appdir}
cp %{SOURCE2} $RPM_BUILD_ROOT/%{autostartdir}
cd %{_builddir}
cp %{escname}/esc/LICENSE $RPM_BUILD_ROOT/%{docdir}
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{escdir}/esc
%{escdir}/escd
%{escbindir}/esc
%{escdir}/application.ini
%{escdir}/chrome/chrome.manifest
%{escdir}/chrome/content
%{escdir}/chrome/locale
%{escdir}/chrome/icons/default
%{escdir}/components
%{escdir}/defaults/preferences/esc-prefs.js
%{escdir}/xulrunner
%{icondir}/esc.png
%{pixmapdir}/esc.png
%{autostartdir}/esc.desktop
%{_datadir}/%{appdir}/esc.desktop
%doc %{docdir}/LICENSE
%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
%{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi
%changelog
* Fri Sep 22 2006 Jack Magne <jmagne(a)redhat.com>= 1.0.0-15
- Fix to the build version
* Fri Sep 22 2006 Jack Magne <jmagne(a)redhat.com>= 1.0.0-14
- Fix to compile error in daemon
* Fri Sep 22 2006 Jack Magne <jmagne(a)redhat.com>- 1.0.0-13
- Fix to include the new esc daemon.
* Sat Sep 16 2006 Jack Magne <jmagne(a)redhat.com>- 1.0.0-12
- Fix for Password Reset and minor UI revision.
* Fri Sep 15 2006 Jack Magne <jmagne(a)redhat.com>- 1.0.0-11
- Further UI enhancement bug fixes
* Thu Sep 7 2006 Jack Magne <jmagne(a)redhat.com>- 1.0.0-10
- Further strings revisions.
* Wed Aug 30 2006 Jack Magne <jmagne(a)redhat.com>- 1.0.0-9
- Revision of the strings used in ESC.
* Sat Aug 27 2006 Jack Magne <jmagne(a)redhat.com>- 1.0.0-8
- Fixes to get libnotify working properly on FC6 systems.
* Tue Aug 22 2006 Jack Magne <jmagne(a)redhat.com> - 1.0.0-7
- Fix for bug #203211, use of system NSS and NSPR for
- Xulrunner ,addressing the problem running on 64 bit.
- Overwriting 5 and 6 due to important bug #203211.
* Fri Aug 18 2006 Jack Magne <jmagne(a)redhat.com> - 1.0.0-6
- Correct problem with Patch #6
* Tue Aug 17 2006 Jack Magne <jmagne(a)redhat.com> - 1.0.0-5
- Build ESC's xulrunner component using system nss and nspr
- Build process creates run script based on {_libdir} variable,
accounting for differences on 64 bit machines.
- UI enhancements
* Tue Aug 1 2006 Matthias Clasen <mclasen(a)redhat.com> - 1.0.0-4
- Don't auto-generate requires either
* Mon Jul 31 2006 Matthias Clasen <mclasen(a)redhat.com> - 1.0.0-3
- Don't provide mozilla libraries
* Fri Jul 28 2006 Ray Strode <rstrode(a)redhat.com> - 1.0.0-2
- remove bogus gtk+ requires (and some others that will
be automatic)
* Tue Jun 13 2006 Jack Magne <jmagne(a)redhat.com> - 1.0.0-1
- Initial revision for fedora
17 years, 6 months
[Fedora-directory-commits] esc/src/app/daemon escd.cpp, NONE, 1.1 escd.h, NONE, 1.1 Makefile, NONE, 1.1 manifest.mn, NONE, 1.1
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/daemon
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25849
Added Files:
escd.cpp escd.h Makefile manifest.mn
Log Message:
Initial revision.
--- NEW FILE escd.cpp ---
/** BEGIN COPYRIGHT BLOCK
* This Program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; version 2 of the License.
*
* This Program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
* END COPYRIGHT BLOCK **/
#define FORCE_PR_LOG 1
#include "escd.h"
#include <stdio.h>
#include <unistd.h>
#include <prlog.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include "pk11func.h"
#define SHELL "/bin/sh"
#define CORRECT_NUM_ARGS 3
static PRLogModuleInfo *escDLog = PR_NewLogModule("escDLog");
string ESC_D::keyInsertedCommand("");
string ESC_D::onSignalCommand("");
int ESC_D::commandAlreadyLaunched = 0;
string signalCommandArg = "forceStartESC";
ESC_D *ESC_D::single = NULL;
ESC_D::ESC_D()
{
single = this;
mDataLock = NULL;
}
void ESC_D::cleanup()
{
int already = 0;
PR_Lock(mDataLock);
already = commandAlreadyLaunched;
PR_Unlock(mDataLock);
if(already)
{
PR_LOG( escDLog, PR_LOG_ERROR, ("Daemon: ! Command is already running. \n"));
}
PR_LOG( escDLog, PR_LOG_ERROR, ("Daemon: Attempting to shut down. \n"));
CoolKeyShutdown();
PR_LOG( escDLog, PR_LOG_ERROR, ("Daemon: Past CoolKeyShutdown \n"));
PR_DestroyLock(mDataLock);
if(single)
delete single;
exit(0);
}
HRESULT ESC_D::init(int argc, char **argv)
{
HRESULT result = S_OK;
PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: Nmber of args! %d \n",argc));
for(int i = 0; i < argc ; i++)
PR_LOG( escDLog, PR_LOG_DEBUG, ("Argv[%d]: %s \n",i,argv[i]));
if(argc != CORRECT_NUM_ARGS)
{
return E_FAIL;
}
mDataLock = PR_NewLock();
if (!mDataLock)
{
PR_LOG( escDLog, PR_LOG_ERROR, ("Cannot create mutex for ESCD! \n"));
return E_FAIL;
}
vector<string> arg1Tokens;
vector<string> arg2Tokens;
string argument1 = "";
string argument2 = "";
string delim = "=";
vector<string>::iterator n, v;
argument1 = argv[1];
argument2 = argv[2];
TokenizeArgument(argument1,arg1Tokens,delim);
TokenizeArgument(argument2,arg2Tokens,delim);
v = arg1Tokens.begin();
if( v != arg1Tokens.end())
{
n = v++;
string name = "";
string value = "";
if(n != arg1Tokens.end())
name = (*n);
if(v != arg1Tokens.end())
value = (*v);
if(name == KEY_INSERTED_CMD && value.size())
{
keyInsertedCommand = value;
PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: keyInsertedCommand: %s. \n",keyInsertedCommand.c_str()));
}
}
vector<string>::iterator n1, v1;
v1 = arg2Tokens.begin();
PR_LOG(escDLog, PR_LOG_ALWAYS, ("Daemon: got v1 \n"));
if(n1 != arg2Tokens.end())
{
n1 = v1++;
PR_LOG(escDLog, PR_LOG_ALWAYS, ("Daemon: got n1... \n"));
string name1 = "";
string value1 = "";
if(n1 != arg2Tokens.end())
name1 = (*n1);
if(v1 != arg2Tokens.end())
value1 = (*v1);
if(name1 == ON_SIGNAL_CMD && value1.size())
{
onSignalCommand = value1;
PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: onSignalCommand: %s. \n",onSignalCommand.c_str()));
}
}
CoolKeySetCallbacks(Dispatch,Reference, Release,NULL ,NULL);
CoolKeyRegisterListener((CoolKeyListener *) this);
struct sigaction sigESCD;
/* install the signal handler */
sigemptyset(&(sigESCD.sa_mask));
sigaddset(&(sigESCD.sa_mask),SIGUSR1);
sigaddset(&(sigESCD.sa_mask),SIGTERM);
pthread_sigmask(SIG_UNBLOCK,&(sigESCD.sa_mask),NULL);
sigESCD.sa_handler = ESC_D::signalHandler;
sigESCD.sa_flags = 0;
sigaction(SIGUSR1,&sigESCD,NULL);
sigaction(SIGTERM,&sigESCD,NULL);
// Install the XWindows IO Error Handler
XSetIOErrorHandler(ESC_D::xIOErrorHandler);
result = S_OK;
return result;
}
HRESULT ESC_D::Dispatch( CoolKeyListener *listener,
unsigned long keyType, const char *keyID, unsigned long keyState,
unsigned long data, const char *strData
)
{
HRESULT result = S_OK;
if(keyState == eCKState_KeyInserted)
{
PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Key Inserted: keyID: %s. \n",keyID));
string fullCommand="";
string space = " " ;
fullCommand = keyInsertedCommand + space + "keyInserted";
if(single)
single->launchCommand(fullCommand);
}
if(keyState == eCKState_KeyRemoved)
{
PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Key Removed: keyID: %s. \n",keyID));
}
return result;
}
HRESULT ESC_D::Reference(CoolKeyListener *listener )
{
return S_OK;
}
HRESULT ESC_D::Release( CoolKeyListener *listener )
{
return S_OK;
}
void ESC_D::TokenizeArgument(const string& str,
vector<string>& tokens,
const string& delimiters )
{
string::size_type lastPos = str.find_first_not_of(delimiters, 0);
string::size_type pos = str.find_first_of(delimiters, lastPos);
while (string::npos != pos || string::npos != lastPos)
{
// Found a token, add it to the vector.
tokens.push_back(str.substr(lastPos, pos - lastPos));
// Skip delimiters. Note the "not_of"
lastPos = str.find_first_not_of(delimiters, pos);
// Find next "non-delimiter"
pos = str.find_first_of(delimiters, lastPos);
}
}
HRESULT ESC_D::launchCommand(string &command)
{
const char *shell = SHELL;
PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: About to launch command: %s. \n",command.c_str()));
int already = 0;
PR_Lock(mDataLock);
already = commandAlreadyLaunched;
PR_Unlock(mDataLock);
if(already)
{
PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: About to launch command: Command already running.. \n")) ;
return E_FAIL;
}
if(!command.size())
{
return E_FAIL;
}
int status;
pid_t pid;
PR_Lock(mDataLock);
commandAlreadyLaunched = 1;
PR_Unlock(mDataLock);
pid = fork ();
if (pid == 0)
{
execl (shell, shell, "-c", command.c_str(), NULL);
_exit (EXIT_FAILURE);
}
else if (pid < 0)
status = -1;
else
{
if (waitpid (pid, &status, 0) != pid)
status = -1;
}
PR_Lock(mDataLock);
commandAlreadyLaunched = 0;
PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: Child command has exited.. \n")) ;
PR_Unlock(mDataLock);
if(status == -1)
return E_FAIL;
return S_OK;
}
int ESC_D::xIOErrorHandler(Display *display)
{
PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: XIOErrorHandler! We are finished.\n"));
if(single)
single->cleanup();
return 1;
}
void ESC_D::signalHandler(int signal)
{
string fullCommand="";
string space = " " ;
PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: signalHandler: signal: %d.. \n",signal));
switch(signal)
{
case SIGUSR1:
fullCommand = onSignalCommand + space + signalCommandArg;
if(single)
{
single->launchCommand(fullCommand);
}
break;
case SIGTERM:
if(single)
single->cleanup();
break;
}
}
int main(int argc, char **argv)
{
pid_t pid;
// Fork off the parent process
pid = fork();
if (pid < 0) {
exit(1);
}
if (pid > 0) {
exit(0);
}
PR_LOG(escDLog, PR_LOG_ALWAYS, ("Daemon: Initializing Daemon... \n"));
umask(0);
ESC_D daemon;
HRESULT result = daemon.init(argc,argv);
if(result == E_FAIL)
{
PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Error initializing, exiting.. \n"));
exit(1);
}
int hresult = CoolKeyInit("./");
if(hresult == E_FAIL)
{
PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Error initializing CoolKey System, this will result in problems recognizing Smart Cards! \n"));
}
//Now become an XWindows program so we can die on user logout
Display *display;
XEvent event;
display = XOpenDisplay(NULL);
if(!display)
{
PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Error Obtaining X Display! \n"));
}
PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Attempted XOpenDisplay: %p \n",display));
while ("looping forever") XNextEvent(display,&event);
PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: main exiting.. \n") );
XCloseDisplay (display);
return 0;
}
--- NEW FILE escd.h ---
/** BEGIN COPYRIGHT BLOCK
* This Program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; version 2 of the License.
*
* This Program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with
* this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
* Place, Suite 330, Boston, MA 02111-1307 USA.
*
* Copyright (C) 2005 Red Hat, Inc.
* All rights reserved.
* END COPYRIGHT BLOCK **/
#ifndef ESC_D_H
#define ESC_D_H
#include <string>
#include <vector>
#include <signal.h>
#include "prlock.h"
#include <X11/Xlib.h>
using namespace std;
#include "CoolKey.h"
#define KEY_INSERTED_CMD "--key_Inserted"
#define ON_SIGNAL_CMD "--on_Signal"
class ESC_D
{
public:
ESC_D();
HRESULT init(int argc, char **argv);
void cleanup();
static string keyInsertedCommand;
static string onSignalCommand;
static void signalHandler(int signal);
static int xIOErrorHandler(Display *display);
static ESC_D *single;
PRLock *mDataLock;
HRESULT launchCommand(string &command);
private:
void TokenizeArgument(const string& str,
vector<string>& tokens,
const string& delimiters = " ");
static HRESULT Dispatch( CoolKeyListener *listener,
unsigned long keyType, const char *keyID, unsigned long keyState,
unsigned long data, const char *strData
);
static HRESULT Reference(CoolKeyListener *listener );
static HRESULT Release(CoolKeyListener *listener );
static int commandAlreadyLaunched;
};
#endif
--- NEW FILE Makefile ---
#! gmake
#
# ***** BEGIN COPYRIGHT BLOCK *****
# This Program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; version 2 of the License.
#
# This Program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
#
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
# ***** END COPYRIGHT BLOCK *****
#######################################################################
# (1) Include initial platform-independent assignments (MANDATORY). #
#######################################################################
include manifest.mn
#######################################################################
# (2) Include "global" configuration information. (OPTIONAL) #
#######################################################################
include $(CORE_DEPTH)/coreconf/config.mk
#######################################################################
# (3) Include "component" configuration information. (OPTIONAL) #
#######################################################################
#######################################################################
# (4) Include "local" platform-dependent assignments (OPTIONAL). #
#######################################################################
#######################################################################
# (5) Execute "global" rules. (OPTIONAL) #
#######################################################################
include $(CORE_DEPTH)/coreconf/rules.mk
#######################################################################
# (6) Execute "component" rules. (OPTIONAL) #
#######################################################################
#######################################################################
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
--- NEW FILE manifest.mn ---
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; version 2 of the License.
#
# This Program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
#
# Copyright (C) 2005 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
CORE_DEPTH = ../../..
CORE_DIST= $(CORE_DEPTH)/dist/
SYS_INC= /usr/include
ifndef MOZ_OFFSET
MOZ_OFFSET = mozilla-1.7.13
endif
DEFINES += -I$(SYS_INC)/nspr4 -I$(SYS_INC)/nss3 -I$(SYS_INC)/$(MOZ_OFFSET)/nspr -I$(SYS_INC)/$(MOZ_OFFSET)/nss
CPPFLAGS += $(DEFINES) -g
LDFLAGS += -lstdc++ -L$(CORE_DIST)/$(OBJDIR)/lib -lnss3 -lnspr4 -lssl3 -lckyapplet -lX11
LDFLAGS += -lckymanager -lhttpchunked
# MODULE public and private header directories are implicitly REQUIRED.
CPPSRCS = \
escd.cpp \
$(NULL)
# The MODULE is always implicitly required.
# Listing it here in REQUIRES makes it appear twice in the cc command line.
REQUIRES = ckymanager nss nspr NssHttpClient
PROGRAM = escd
17 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd sasl_io.c, 1.7, 1.8
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9744
Modified Files:
sasl_io.c
Log Message:
208058 - Copy decrypted SASL data starting from buffer offset instead of always copying from the beginning of the buffer.
Index: sasl_io.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/sasl_io.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sasl_io.c 17 Aug 2006 15:33:03 -0000 1.7
+++ sasl_io.c 26 Sep 2006 22:08:17 -0000 1.8
@@ -314,7 +314,8 @@
if (bytes_to_return > count) {
bytes_to_return = count;
}
- memcpy(buffer, sp->decrypted_buffer, bytes_to_return);
+ /* Copy data from the decrypted buffer starting at the offset */
+ memcpy(buffer, sp->decrypted_buffer + sp->decrypted_buffer_offset, bytes_to_return);
if (bytes_in_buffer == bytes_to_return) {
sp->decrypted_buffer_offset = 0;
sp->decrypted_buffer_count = 0;
17 years, 6 months
[Fedora-directory-commits] ldapserver/ldap/servers/slapd connection.c, 1.11, 1.12
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/slapd
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5432
Modified Files:
connection.c
Log Message:
[206724] Processed: Replacing PR_SetNetAddr with PRLDAP_SET_PORT for IPv6 support
comment#5: Fixed a stupid copy and paste bug...
Index: connection.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/connection.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- connection.c 15 Sep 2006 22:45:11 -0000 1.11
+++ connection.c 24 Sep 2006 00:30:50 -0000 1.12
@@ -281,7 +281,7 @@
/*
* get destination address (server IP address this client connected to)
*/
- slapi_ch_free( (void**)&conn->cin_addr ); /* just to be conservative */
+ slapi_ch_free( (void**)&conn->cin_destaddr ); /* just to be conservative */
if ( conn->c_prfd != NULL ) {
conn->cin_destaddr = (PRNetAddr *) slapi_ch_malloc( sizeof( PRNetAddr ) );
memset( conn->cin_destaddr, 0, sizeof( PRNetAddr ));
17 years, 6 months
[Fedora-directory-commits] ldapserver component_versions.mk, 1.50, 1.51
by Doctor Conrad
Author: nhosoi
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7479
Modified Files:
component_versions.mk
Log Message:
Upgraded NSPR_RELDATE to v4.6.3-dstest.
This upgrade is made from 1) v4.6.2 -> v4.6.3 and 2) applying a new ipv6.patch
from [mozilla 34843].
Index: component_versions.mk
===================================================================
RCS file: /cvs/dirsec/ldapserver/component_versions.mk,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- component_versions.mk 15 Sep 2006 18:16:15 -0000 1.50
+++ component_versions.mk 22 Sep 2006 20:16:27 -0000 1.51
@@ -52,7 +52,7 @@
# naming scheme.
# NSPR
ifndef NSPR_RELDATE
- NSPR_RELDATE = v4.6.2-dstest
+ NSPR_RELDATE = v4.6.3-dstest
endif
# SECURITY (NSS) LIBRARY
17 years, 6 months