[Fedora-directory-commits] esc/src/app/xpcom rhCoolKey.cpp,1.5,1.6
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xpcom
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30317
Modified Files:
rhCoolKey.cpp
Log Message:
Add time stamp to log files and add method to issue log message from script.
Index: rhCoolKey.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhCoolKey.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- rhCoolKey.cpp 9 Feb 2007 21:36:47 -0000 1.5
+++ rhCoolKey.cpp 24 Feb 2007 01:59:50 -0000 1.6
@@ -43,6 +43,7 @@
#include "content/nsCopySupport.h"
#include <vector>
#include <string>
+#include <time.h>
#define STRINGIFY(x) #x
@@ -90,7 +91,6 @@
static PRLogModuleInfo *coolKeyLog = PR_NewLogModule("coolKey");
-
rhCoolKey *single = NULL;
class CoolKeyShutdownObserver : public nsIObserver
@@ -106,9 +106,8 @@
CoolKeyShutdownObserver::~CoolKeyShutdownObserver()
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyShutdownObserver::~CoolKeyShutdownObserver \n"));
-
-
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyShutdownObserver::~CoolKeyShutdownObserver \n",GetTStamp(tBuff,56)));
}
NS_IMETHODIMP
@@ -116,26 +115,19 @@
const char *aTopic,
const PRUnichar *someData)
{
- if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID))
- {
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("CoolKeyShutdownObserver::Observe shutting down"));
-
- if(single)
- {
- single->ShutDownInstance();
-
- }
-
+ char tBuff[56];
+ if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID))
+ {
+ PR_LOG(coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyShutdownObserver::Observe shutting down",GetTStamp(tBuff,56)));
+ if(single)
+ {
+ single->ShutDownInstance();
+ }
}
return NS_OK;
}
-
-
-
-
unsigned int
ASCCalcBase64DecodedLength(const char *aBase64Str)
{
@@ -178,30 +170,30 @@
rhCoolKey::rhCoolKey()
:mJsNotify(nsnull),mProxy(nsnull)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::rhCoolKey: %p \n",this));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::rhCoolKey: %p \n",GetTStamp(tBuff,56),this));
+
+ if(!single)
+ {
+ single = this;
+
+ }
+ else
+ {
+ return;
+ }
+
+ #ifdef XP_WIN32
+ mCSPListener = nsnull;
+ #endif
- if(!single)
- {
- single = this;
-
- }
- else
- {
- return;
- }
-
- #ifdef XP_WIN32
- mCSPListener = nsnull;
- #endif
-
- PRBool res = InitInstance();
-
- if(res == PR_FALSE)
- {
- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("ESC InitInstance failed,exiting. CoolKey instance %p\n",coolKey_instance));
+ PRBool res = InitInstance();
- exit(1);
- }
+ if(res == PR_FALSE)
+ {
+ PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s ESC InitInstance failed,exiting. CoolKey instance %p\n",GetTStamp(tBuff,56),coolKey_instance));
+ exit(1);
+ }
/* member initializers and constructor code */
}
@@ -210,17 +202,18 @@
{
/* destructor code */
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::~rhCoolKey: %p \n",this));
-
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::~rhCoolKey: %p \n",GetTStamp(tBuff,56),this));
}
void rhCoolKey::ShutDownInstance()
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::ShutDownInstance. %p \n",this));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ShutDownInstance. %p \n",GetTStamp(tBuff,56),this));
if (mProxy)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::ShutDownInstance: About to dereference Proxy Object. Proxy %p \n",mProxy));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ShutDownInstance: About to dereference Proxy Object. Proxy %p \n",GetTStamp(tBuff,56),mProxy));
CoolKeyUnregisterListener(mProxy);
@@ -291,17 +284,13 @@
}
-
-
const char *rhCoolKey::doGetCoolKeyConfigValue(const char *aName )
{
-
if(!aName)
{
return NULL;
}
-
nsCOMPtr<nsIPrefBranch> pref;
char * prefValue = NULL;;
pref = do_GetService("@mozilla.org/preferences-service;1");
@@ -311,30 +300,25 @@
return NULL;
}
-
pref->GetCharPref(aName, &prefValue);
-
return (const char *) prefValue;
-
-
}
PRBool rhCoolKey::InitInstance()
{
+ char tBuff[56];
PRBool ret = PR_TRUE;
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::InitInstance %p \n",this));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::InitInstance %p \n",GetTStamp(tBuff,56),this));
char *path = (char *) GRE_GetXPCOMPath();
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GREPath %s \n",path));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GREPath %s \n",GetTStamp(tBuff,56),path));
char xpcom_path[512];
-
-
char *lib_name = XPCOM_LIB_NAME ;
#ifdef XP_WIN32
@@ -344,15 +328,13 @@
sprintf(xpcom_path,"%s/%s",path,lib_name);
#endif
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::xpcom_path %s \n",xpcom_path));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::xpcom_path %s \n",GetTStamp(tBuff,56),xpcom_path));
XPCOMGlueStartup(xpcom_path);
nssComponent
= do_GetService(PSM_COMPONENT_CONTRACTID);
-
-
CoolKeySetCallbacks(Dispatch,Reference, Release,doGetCoolKeyConfigValue ,doSetCoolKeyConfigValue);
mProxy = CreateProxyObject();
@@ -360,14 +342,12 @@
if(mProxy)
{
CoolKeyRegisterListener(mProxy);
-
}
else
{
- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("Can't create Proxy Object for ESC. \n"));
+ PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s Can't create Proxy Object for ESC. \n",GetTStamp(tBuff,56)));
}
-
#ifdef XP_WIN32
const char *doCapi = NULL;
@@ -381,7 +361,6 @@
if(mCSPListener)
{
AddNotifyKeyListener(mCSPListener);
-
}
}
@@ -420,7 +399,7 @@
observerService->AddObserver(observer, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE);
} else {
- PR_LOG(coolKeyLog,PR_LOG_ERROR,("Could not get an observer service. We will leak on shutdown."));
+ PR_LOG(coolKeyLog,PR_LOG_ERROR,("%s Could not get an observer service. We will leak on shutdown.",GetTStamp(tBuff,56)));
}
return ret;
@@ -429,10 +408,10 @@
rhICoolKey* rhCoolKey::CreateProxyObject()
{
-
+ char tBuff[56];
rhICoolKey *proxyObject = NULL;
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::CreateProxyObject: \n"));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::CreateProxyObject: \n",GetTStamp(tBuff,56)));
nsCOMPtr<nsIProxyObjectManager> manager =
do_GetService(NS_XPCOMPROXY_CONTRACTID);
@@ -442,7 +421,7 @@
manager->GetProxyForObject(NS_UI_THREAD_EVENTQ, NS_GET_IID(rhICoolKey), this, PROXY_SYNC | PROXY_ALWAYS, (void**)&proxyObject);
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::CreateProxyObject: original: %p proxy %p \n",this,proxyObject));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::CreateProxyObject: original: %p proxy %p \n",GetTStamp(tBuff,56),this,proxyObject));
return proxyObject;
@@ -450,36 +429,36 @@
CoolKeyNode* rhCoolKey::GetCoolKeyInfo(unsigned long aKeyType, const char * aKeyID)
{
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyInfo: gASCAvailableKeys %p looking for key %s type %d \n",GetTStamp(tBuff,56),&gASCAvailableKeys,aKeyID,aKeyType));
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyInfo: gASCAvailableKeys %p looking for key %s type %d \n",&gASCAvailableKeys,aKeyID,aKeyType));
-
- std::list<CoolKeyNode*>::const_iterator it;
- for(it=gASCAvailableKeys.begin(); it!=gASCAvailableKeys.end(); ++it) {
+ std::list<CoolKeyNode*>::const_iterator it;
+ for(it=gASCAvailableKeys.begin(); it!=gASCAvailableKeys.end(); ++it) {
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyInfo: current key %s type %d, looking for key %s type %d \n",(*it)->mKeyID.get(),(*it)->mKeyType,aKeyID,aKeyType));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyInfo: current key %s type %d, looking for key %s type %d \n",GetTStamp(tBuff,56),(*it)->mKeyID.get(),(*it)->mKeyType,aKeyID,aKeyType));
- if ((*it)->mKeyType == aKeyType && !strcmp((*it)->mKeyID.get(), aKeyID))
- return *it;
- }
+ if ((*it)->mKeyType == aKeyType && !strcmp((*it)->mKeyID.get(), aKeyID))
+ return *it;
+ }
- return 0;
+ return 0;
}
// Internal methods
PRBool rhCoolKey::ASCCoolKeyIsAvailable(unsigned long aKeyType, char * aKeyID)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::ASCCoolKeyIsAvailable type %d id %s \n",aKeyType,aKeyID));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ASCCoolKeyIsAvailable type %d id %s \n",GetTStamp(tBuff,56),aKeyType,aKeyID));
return GetCoolKeyInfo(aKeyType, aKeyID) ? PR_TRUE : PR_FALSE;
}
-
HRESULT rhCoolKey::ASCGetAvailableCoolKeyAt(unsigned long aIndex,
unsigned long *aKeyType,
nsEmbedCString *aKeyID)
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::ASCGetAvailableCoolKeyAt: index %d type %d id %s \n",aIndex,aKeyType,aKeyID));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ASCGetAvailableCoolKeyAt: index %d type %d id %s \n",GetTStamp(tBuff,56),aIndex,aKeyType,aKeyID));
if (!aKeyType || !aKeyID)
return E_FAIL;
@@ -504,9 +483,9 @@
int rhCoolKey::ASCGetNumAvailableCoolKeys(void)
{
-
+ char tBuff[56];
int size = (int) gASCAvailableKeys.size();
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::ASCGetNumAvailableCoolKeys %d \n",size));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ASCGetNumAvailableCoolKeys %d \n",GetTStamp(tBuff,56),size));
return size;
}
@@ -519,52 +498,49 @@
rhIKeyNotify* rhCoolKey::GetNotifyKeyListener(rhIKeyNotify *listener){
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetNotifyKeyListener: %p size %d \n",listener,gNotifyListeners.size() ));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: %p size %d \n",GetTStamp(tBuff,56),listener,gNotifyListeners.size() ));
- std::list<nsCOMPtr<rhIKeyNotify> >::const_iterator it;
- for(it=gNotifyListeners.begin(); it!=gNotifyListeners.end(); ++it) {
+ std::list<nsCOMPtr<rhIKeyNotify> >::const_iterator it;
+ for(it=gNotifyListeners.begin(); it!=gNotifyListeners.end(); ++it) {
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetNotifyKeyListener: cur %p looking for %p \n",(*it).get(),listener));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: cur %p looking for %p \n",GetTStamp(tBuff,56),(*it).get(),listener));
- if((*it) == listener)
- {
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetNotifyKeyListener: looking for %p returning %p \n",listener,(*it).get()));
- return (*it);
- }
- }
+ if((*it) == listener)
+ {
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: looking for %p returning %p \n",GetTStamp(tBuff,56),listener,(*it).get()));
+ return (*it);
+ }
+ }
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetNotifyKeyListener: looking for %p returning NULL. \n",listener));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: looking for %p returning NULL. \n",GetTStamp(tBuff,56),listener));
return nsnull;
}
-
void rhCoolKey::AddNotifyKeyListener(rhIKeyNotify *listener)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::AddNotifyKeyListener: %p \n",listener));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::AddNotifyKeyListener: %p \n",GetTStamp(tBuff,56),listener));
if(GetNotifyKeyListener(listener ))
{
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::AddNotifyKeyListener: %p listener already in list. \n",GetTStamp(tBuff,56),listener));
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::AddNotifyKeyListener: %p listener already in list. \n",listener));
-
-
return ;
-
}
gNotifyListeners.push_back(listener);
-
}
void rhCoolKey::RemoveNotifyKeyListener(rhIKeyNotify *listener)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RemoveNotifyKeyListener: %p \n",listener));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RemoveNotifyKeyListener: %p \n",GetTStamp(tBuff,56),listener));
if(!GetNotifyKeyListener(listener ))
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RemoveNotifyKeyListener: %p trying to remove listener not in list \n",listener));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RemoveNotifyKeyListener: %p trying to remove listener not in list \n",GetTStamp(tBuff,56),listener));
return ;
}
@@ -576,7 +552,8 @@
void rhCoolKey::ClearNotifyKeyList()
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::ClearNotifyKeyList: \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ClearNotifyKeyList: \n",GetTStamp(tBuff,56)));
while (gNotifyListeners.size() > 0) {
rhIKeyNotify * node = (gNotifyListeners.front()).get();
@@ -590,34 +567,31 @@
void rhCoolKey::InsertKeyIntoAvailableList(unsigned long aKeyType, const char * aKeyID,CoolKeyStatus aStatus)
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::InsertKeyIntoAvailableList: \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::InsertKeyIntoAvailableList: \n",GetTStamp(tBuff,56)));
if (ASCCoolKeyIsAvailable(aKeyType, (char *)aKeyID))
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::InsertKeyIntoAvailableList: Key Not Available \n"));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::InsertKeyIntoAvailableList: Key Not Available \n",GetTStamp(tBuff,56)));
return;
-
}
-
CoolKeyNode *node = new CoolKeyNode(aKeyType, aKeyID, aStatus);
if (!node)
{
- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("Can't create new CoolKey Data Structure. \n"));
+ PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s Can't create new CoolKey Data Structure. \n",GetTStamp(tBuff,56)));
return;
}
-
gASCAvailableKeys.push_back(node);
}
void rhCoolKey::RemoveKeyFromAvailableList(unsigned long aKeyType, const char * aKeyID)
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RemoveKeyFromAvailableList type %d id %s \n",aKeyType,aKeyID));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RemoveKeyFromAvailableList type %d id %s \n",GetTStamp(tBuff,56),aKeyType,aKeyID));
CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
if (!node)
@@ -629,7 +603,8 @@
void rhCoolKey::ClearAvailableList()
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::ClearAvailableList \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ClearAvailableList \n",GetTStamp(tBuff,56)));
while (gASCAvailableKeys.size() > 0) {
CoolKeyNode *node = gASCAvailableKeys.front();
delete node;
@@ -639,28 +614,29 @@
HRESULT rhCoolKey::ASCSetCoolKeyPin(unsigned long aKeyType, const char * aKeyID, const char * aPin)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::ASCSetCoolKeyPin type %d id %s pin %s \n",aKeyType,aKeyID,aPin));
- CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
- if (!node)
- return E_FAIL;
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ASCSetCoolKeyPin type %d id %s pin %s \n",GetTStamp(tBuff,56),aKeyType,aKeyID,aPin));
+ CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
+ if (!node)
+ return E_FAIL;
- node->mPin = aPin;
- return S_OK;
+ node->mPin = aPin;
+ return S_OK;
}
// Interface method implementations
NS_IMETHODIMP rhCoolKey::RhNotifyKeyStateChange(PRUint32 aKeyType,const char *aKeyID, PRUint32 aKeyState, PRUint32 aData,const char* strData)
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhNotifyKeyStateChange: id: %s type: %d state %d data: %d \n",aKeyID,aKeyType, aKeyState,aData));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhNotifyKeyStateChange: id: %s type: %d state %d data: %d \n",GetTStamp(tBuff,56),aKeyID,aKeyType, aKeyState,aData));
CoolKeyNode tempKey(aKeyType, aKeyID,(CoolKeyStatus) aKeyState);
CoolKeyNode *node = NULL;
AutoCoolKey key(aKeyType, aKeyID);
- switch (aKeyState)
+ switch (aKeyState)
{
case eCKState_KeyInserted:
{
@@ -671,14 +647,14 @@
if (CoolKeyIsEnrolled(&key))
keyStatus = eAKS_Available; else if (CoolKeyHasApplet(&key)) keyStatus = eAKS_Uninitialized;
- PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("Key Inserted. ID %s \n",aKeyID));
- InsertKeyIntoAvailableList(tempKey.mKeyType,aKeyID ,(CoolKeyStatus) keyStatus);
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Key Inserted. ID %s \n",GetTStamp(tBuff,56),aKeyID));
+ InsertKeyIntoAvailableList(tempKey.mKeyType,aKeyID ,(CoolKeyStatus) keyStatus);
break;
}
case eCKState_KeyRemoved:
- PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("Key Removed. ID %s \n",aKeyID));
- RemoveKeyFromAvailableList(tempKey.mKeyType, aKeyID);
- break;
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Key Removed. ID %s \n",GetTStamp(tBuff,56),aKeyID));
+ RemoveKeyFromAvailableList(tempKey.mKeyType, aKeyID);
+ break;
case eCKState_EnrollmentComplete:
case eCKState_EnrollmentError:
case eCKState_PINResetComplete:
@@ -688,8 +664,7 @@
case eCKState_BlinkComplete:
case eCKState_BlinkError:
case eCKState_OperationCancelled:
-{
-
+ {
node = GetCoolKeyInfo(tempKey.mKeyType, aKeyID);
if (node) {
@@ -700,7 +675,7 @@
node->mStatus = eAKS_Uninitialized;
}
break;
- }
+ }
case eCKState_EnrollmentStart:
case eCKState_PINResetStart:
case eCKState_FormatStart:
@@ -716,8 +691,7 @@
((rhIKeyNotify *) (*it))->RhNotifyKeyStateChange(aKeyType,aKeyID,aKeyState,aData,strData);
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhNotifyKeyStateChange after call to RhNotifyKeyStateChange listener: %p",(*it).get()));
-
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhNotifyKeyStateChange after call to RhNotifyKeyStateChange listener: %p",GetTStamp(tBuff,56),(*it).get()));
}
@@ -726,26 +700,25 @@
NS_IMETHODIMP rhCoolKey::RhCoolKeyUnSetNotifyCallback(rhIKeyNotify *jsNotify)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: input %p this %p \n",jsNotify,this));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: input %p this %p \n",GetTStamp(tBuff,56),jsNotify,this));
RemoveNotifyKeyListener(jsNotify);
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: removed listener, size now %d \n",GetNotifyKeyListenerListSize()));
-
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: removed listener, size now %d \n",GetTStamp(tBuff,56),GetNotifyKeyListenerListSize()));
if(GetNotifyKeyListenerListSize() == 0)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: input %p this %p Listener size 0. \n",jsNotify,this));
-
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: input %p this %p Listener size 0. \n",GetTStamp(tBuff,56),jsNotify,this));
}
- return NS_OK;
+ return NS_OK;
}
NS_IMETHODIMP rhCoolKey::RhCoolKeySetNotifyCallback(rhIKeyNotify *jsNotify)
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhCoolKeySetNotifyCallback Object: %p this %p\n",jsNotify,this));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeySetNotifyCallback Object: %p this %p\n",GetTStamp(tBuff,56),jsNotify,this));
AddNotifyKeyListener(jsNotify);
@@ -753,16 +726,29 @@
}
-NS_IMETHODIMP rhCoolKey::BlinkCoolKey(PRUint32 aKeyType, const char *aKeyID, PRUint32 aRate, PRUint32 aDuration)
+/* void CoolKeyLogMsg (in unsigned long aLogLevel, in string aMessage); */
+NS_IMETHODIMP rhCoolKey::CoolKeyLogMsg(PRUint32 aLogLevel, const char *aMessage)
{
+ char tBuff[56];
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhBlinkCoolKey thread: %p \n",PR_GetCurrentThread()));
+ if(aMessage && ((PRLogModuleLevel) aLogLevel >= PR_LOG_NONE && aLogLevel <= PR_LOG_MAX))
+ {
+ PR_LOG( coolKeyLog, (PRLogModuleLevel) aLogLevel, ("%s %s",GetTStamp(tBuff,56),aMessage));
+ }
+
+ return NS_OK;
+}
+
+NS_IMETHODIMP rhCoolKey::BlinkCoolKey(PRUint32 aKeyType, const char *aKeyID, PRUint32 aRate, PRUint32 aDuration)
+{
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhBlinkCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
if (!node)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhBlinkCoolKey: GetCoolKeyInfo failed. \n"));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhBlinkCoolKey: GetCoolKeyInfo failed. \n",GetTStamp(tBuff,56)));
return NS_ERROR_FAILURE;
}
@@ -789,7 +775,8 @@
NS_IMETHODIMP rhCoolKey::EnrollCoolKey(PRUint32 aKeyType, const char *aKeyID, const char *aEnrollmentType, const char *aScreenName, const char *aPin, const char *aScreenNamePWord, const char *aTokenCode)
{
- PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("Attempting to Enroll Key ,ID: %s \n",aKeyID));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("%s Attempting to Enroll Key ,ID: %s \n",GetTStamp(tBuff,56),aKeyID));
CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
@@ -806,7 +793,6 @@
AutoCoolKey key(aKeyType, aKeyID);
HRESULT hres = CoolKeyEnrollToken(&key, aEnrollmentType, aScreenName, aPin,aScreenNamePWord,aTokenCode);
-
if (hres == S_OK)
{
node->mStatus = eAKS_EnrollmentInProgress;
@@ -821,14 +807,14 @@
NS_IMETHODIMP rhCoolKey::ResetCoolKeyPIN(PRUint32 aKeyType, const char *aKeyID, const char *aScreenName, const char *aPIN, const char *aScreenNamePwd)
{
- PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("Attempting to Reset Key PIN, ID: %s \n",aKeyID));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("%s Attempting to Reset Key PIN, ID: %s \n",GetTStamp(tBuff,56),aKeyID));
CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
if (!node)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhResetCoolKeyPIN no node: thread: %p \n",PR_GetCurrentThread()));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhResetCoolKeyPIN no node: thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
return NS_ERROR_FAILURE;
-
}
// Prevent multiple windows from trying to reset the pin for the same
@@ -842,16 +828,14 @@
if (node->mStatus != eAKS_Available)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhResetCoolKeyPIN thread: token unavailable %p \n",PR_GetCurrentThread()));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhResetCoolKeyPIN thread: token unavailable %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
return NS_ERROR_FAILURE;
-
}
AutoCoolKey key(aKeyType, aKeyID);
HRESULT hres = CoolKeyResetTokenPIN(&key, aScreenName, aPIN,aScreenNamePwd);
-
if (hres == S_OK)
{
node->mStatus = eAKS_PINResetInProgress;
@@ -865,7 +849,8 @@
NS_IMETHODIMP rhCoolKey::RenewCoolKey(PRUint32 aKeyType, const char *aKeyID)
{
- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("rhCoolKey::RhRenewCoolKey (not implemented) thread: %p \n",PR_GetCurrentThread()));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s rhCoolKey::RhRenewCoolKey (not implemented) thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
return NS_ERROR_NOT_IMPLEMENTED;
}
@@ -873,8 +858,8 @@
NS_IMETHODIMP rhCoolKey::FormatCoolKey(PRUint32 aKeyType, const char *aKeyID, const char *aEnrollmentType, const char *aScreenName, const char *aPIN, const char *aScreenNamePWord, const char *aTokenCode)
{
-
- PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("Attempting to Format Key, ID: %s. ",aKeyID));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("%s Attempting to Format Key, ID: %s. ",GetTStamp(tBuff,56),aKeyID));
CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
if (!node)
@@ -916,14 +901,13 @@
NS_IMETHODIMP rhCoolKey::CancelCoolKeyOperation(PRUint32 aKeyType, const char *aKeyID)
{
-
+ char tBuff[56];
CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
if (!node)
return NS_ERROR_FAILURE;
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhCancelCoolKeyOperation type %d id %s status %d: \n",aKeyType,aKeyID,node->mStatus));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCancelCoolKeyOperation type %d id %s status %d: \n",GetTStamp(tBuff,56),aKeyType,aKeyID,node->mStatus));
// If the key isn't busy, then there's nothing to do.
@@ -948,7 +932,7 @@
/* void GetCoolKeyCertNicknames (in unsigned long aKeyType, in string aKeyID, out PRUint32 count, [array, size_is (count), retval] out string str); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyCertNicknames(PRUint32 aKeyType, const char *aKeyID, PRUint32 *count, char ***str)
{
-
+ char tBuff[56];
if(!aKeyID || !count)
{
return NS_ERROR_FAILURE;
@@ -962,13 +946,11 @@
if(res != S_OK)
{
return NS_OK;
-
}
char **array = NULL;
int num = nicknames.size();
-
array = (char **) nsMemory::Alloc((sizeof(char *) *num));
if(!array)
@@ -982,7 +964,7 @@
{
char *tName = (char *) (*i).c_str();
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyCertNicknames name %s \n",tName));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyCertNicknames name %s \n",GetTStamp(tBuff,56),tName));
array[j] = NULL;
if(tName)
@@ -1004,8 +986,8 @@
NS_IMETHODIMP rhCoolKey::GetAvailableCoolKeys(PRUint32 *count, char ***str)
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhGetAvailableCoolKeys thread: %p \n",PR_GetCurrentThread()));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetAvailableCoolKeys thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
if(!count || !str)
{
@@ -1016,7 +998,7 @@
long numKeys = ASCGetNumAvailableCoolKeys();
- PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("Attempting to get number of keys. Value: %d \n",numKeys));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Attempting to get number of keys. Value: %d \n",GetTStamp(tBuff,56),numKeys));
if(numKeys == 0)
{
@@ -1065,7 +1047,8 @@
NS_IMETHODIMP rhCoolKey::GetCoolKeyStatus(PRUint32 aKeyType, const char *aKeyID, PRUint32 *_retval)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhGetCoolKeyStatus thread: %p \n",PR_GetCurrentThread()));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyStatus thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
if(node)
@@ -1075,10 +1058,9 @@
else
{
*_retval = eAKS_Unavailable;
-
}
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhGetCoolKeyStatus retval: %d \n",*_retval));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyStatus retval: %d \n",GetTStamp(tBuff,56),*_retval));
return NS_OK;
}
@@ -1089,13 +1071,14 @@
NS_IMETHODIMP rhCoolKey::GetCoolKeyIsReallyCoolKey(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyIsReallyCoolKey thread: %p \n",PR_GetCurrentThread()));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyIsReallyCoolKey thread: %p \n",GetTStamp(tBuff,56),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));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyIsReallyCoolKey isCool: %d \n",GetTStamp(tBuff,56),(int) isCool));
*_retval= isCool;
return NS_OK;
}
@@ -1107,8 +1090,8 @@
/* 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()));
+ char tBuff[56];
+ PR_LOG(coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyAppletVer thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
AutoCoolKey key(aKeyType, aKeyID);
@@ -1117,15 +1100,14 @@
*_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)
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhCoolKeyIsEnrolled thread: %p \n",PR_GetCurrentThread()));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyIsEnrolled thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
if (ASCCoolKeyIsAvailable(aKeyType, (char *) aKeyID)) {
if (aKeyID) {
@@ -1144,16 +1126,14 @@
/* string GetCoolKeyCertInfo (in unsigned long aKeyType, in string aKeyID, in string aCertNickname); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyCertInfo(PRUint32 aKeyType, const char *aKeyID, const char *aCertNickname, char **aCertInfo)
{
-
+ char tBuff[56];
string certInfo = "";
*aCertInfo = NULL;
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyCertInfo thread: %p \n",PR_GetCurrentThread()));
-
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyCertInfo thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
AutoCoolKey key(aKeyType, aKeyID);
-
HRESULT res = CoolKeyGetCertInfo(&key,(char *) aCertNickname, certInfo);
if(res == S_OK)
@@ -1169,12 +1149,13 @@
/* string GetCoolKeyATR (in unsigned long aKeyType, in string aKeyID); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyATR(PRUint32 aKeyType, const char *aKeyID, char **_retval)
- {
- *_retval = NULL;
+{
+ char tBuff[56];
+ *_retval = NULL;
AutoCoolKey key(aKeyType, aKeyID);
char atr[128];
HRESULT res = CoolKeyGetATR(&key, (char *)&atr,sizeof(atr));
- PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("Attempting to get the key's ATR: Key: %s, ATR %s. \n",aKeyID, (char *) atr));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Attempting to get the key's ATR: Key: %s, ATR %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) atr));
if(res == S_OK)
{
char *temp = (char *) nsMemory::Clone(atr,sizeof(char) * strlen((char *)atr) + 1);
@@ -1184,8 +1165,8 @@
}
/* string GetCoolKeyIssuerInfo (in unsigned long aKeyType, in string aKeyID); */ NS_IMETHODIMP rhCoolKey::GetCoolKeyIssuerInfo(PRUint32 aKeyType, const char *aKeyID, char **_retval)
- {
-
+{
+ char tBuff[56];
*_retval = NULL;
AutoCoolKey key(aKeyType, aKeyID);
@@ -1194,7 +1175,7 @@
HRESULT res = CoolKeyGetIssuerInfo(&key, (char *)&issuerInfo,256);
- PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("Attempting to get the key's Issuer: Key: %s, Issuer %s. \n",aKeyID, (char *) issuerInfo));
+ PR_LOG( coolKeyLog, PR_LOG_ALWAYS, ("%s Attempting to get the key's Issuer: Key: %s, Issuer %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) issuerInfo));
if(res == S_OK)
{
@@ -1204,14 +1185,13 @@
}
return NS_OK;
- }
-
+}
/* void rhGetCoolKeyPolicy (in unsigned long aKeyType, in string aKeyID, out string policy); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyPolicy(PRUint32 aKeyType, const char *aKeyID, char **policy)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhGetCoolKeyPolicy thread: %p \n",PR_GetCurrentThread()));
-
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyPolicy thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
if (!aKeyID) {
return NS_ERROR_FAILURE;
@@ -1223,14 +1203,14 @@
AutoCoolKey key(aKeyType, aKeyID);
HRESULT hres = CoolKeyGetPolicy(&key, policyChar, MAX_STR_LEN);
- PR_LOG(coolKeyLog,PR_LOG_DEBUG,("rhCoolKey::RhGetCoolKeyPolicy hres: %d \n",hres));
+ PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyPolicy hres: %d \n",GetTStamp(tBuff,56),hres));
if (hres == E_FAIL)
{
return NS_ERROR_FAILURE;
}
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhGetCoolKeyPolicy policy: %s \n",policyChar));
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyPolicy policy: %s \n",GetTStamp(tBuff,56),policyChar));
char *temp = (char *) nsMemory::Clone(policyChar,sizeof(char) * strlen(policyChar) + 1);
@@ -1242,6 +1222,7 @@
/* string GetCoolKeyIssuedTo (in unsigned long aKeyType, in string aKeyID); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyIssuedTo(PRUint32 aKeyType, const char *aKeyID, char **issuedTo)
{
+ char tBuff[56];
if (!aKeyID) {
return NS_ERROR_FAILURE;
}
@@ -1256,13 +1237,12 @@
CoolKeyGetIssuedTo(&key, (char *) buff, bufLength);
-
if(!buff[0])
{
return NS_OK;
}
- PR_LOG(coolKeyLog,PR_LOG_DEBUG,("rhCoolKey::RhGetCoolKeyGetIssuedTo %s \n",(char *) buff));
+ PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetIssuedTo %s \n",GetTStamp(tBuff,56),(char *) buff));
char *temp = (char *) nsMemory::Clone(buff,sizeof(char) * strlen(buff) + 1);
@@ -1274,7 +1254,8 @@
/* boolean SetCoolKeyConfigValue (in string aName, in string aValue); */
NS_IMETHODIMP rhCoolKey::SetCoolKeyConfigValue(const char *aName, const char *aValue, PRBool *_retval)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::SetCoolKeyConfigValue thread: %p \n",PR_GetCurrentThread()));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::SetCoolKeyConfigValue thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
if(!aName || !aValue)
{
*_retval = 0;
@@ -1289,7 +1270,8 @@
/* string GetCoolKeyConfigValue (in string aName); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyConfigValue(const char *aName, char **_retval)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyConfigValue thread: %p \n",PR_GetCurrentThread()));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyConfigValue thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
if(!aName)
{
@@ -1306,8 +1288,8 @@
NS_IMETHODIMP rhCoolKey::GetCoolKeyRequiresAuthentication(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval)
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhCoolKeyRequiresAuthentication thread: %p \n",PR_GetCurrentThread()));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyRequiresAuthentication thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
PRBool requiresAuth = PR_FALSE;
*_retval = PR_TRUE;
@@ -1326,7 +1308,8 @@
NS_IMETHODIMP rhCoolKey::GetCoolKeyIsAuthenticated(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhGetCoolKeyIsAuthenticated thread: %p \n",PR_GetCurrentThread()));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyIsAuthenticated thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
PRBool isAuthed = PR_FALSE;
*_retval = PR_TRUE;
@@ -1345,22 +1328,23 @@
NS_IMETHODIMP rhCoolKey::AuthenticateCoolKey(PRUint32 aKeyType, const char *aKeyID, const char *aPIN, PRBool *_retval)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::RhAuthenticateCoolKey thread: %p \n",PR_GetCurrentThread()));
- *_retval = PR_FALSE;
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhAuthenticateCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread()));
+ *_retval = PR_FALSE;
- if(!aKeyID || !aPIN)
- {
- return NS_ERROR_FAILURE;
- }
+ if(!aKeyID || !aPIN)
+ {
+ return NS_ERROR_FAILURE;
+ }
- AutoCoolKey key(aKeyType, aKeyID);
+ AutoCoolKey key(aKeyType, aKeyID);
- PRBool didAuth = CoolKeyAuthenticate(&key, aPIN);
+ PRBool didAuth = CoolKeyAuthenticate(&key, aPIN);
- if (didAuth)
- ASCSetCoolKeyPin(aKeyType, aKeyID, aPIN);
+ if (didAuth)
+ ASCSetCoolKeyPin(aKeyType, aKeyID, aPIN);
- *_retval = PR_TRUE;
+ *_retval = PR_TRUE;
return NS_OK;
}
@@ -1369,8 +1353,8 @@
NS_IMETHODIMP rhCoolKey::SetCoolKeyDataValue(PRUint32 aKeyType, const char *aKeyID, const char *name, const char *value)
{
-
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::SetCoolKeyDataValue \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::SetCoolKeyDataValue \n",GetTStamp(tBuff,56)));
CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID);
if (!node)
@@ -1381,13 +1365,13 @@
CoolKeySetDataValue(&key,name, value);
return NS_OK;
-
}
/* string GetCoolKeyVersion (); */
NS_IMETHODIMP rhCoolKey::GetCoolKeyVersion(char **_retval)
{
- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::GetCoolKeyVersion \n"));
+ char tBuff[56];
+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyVersion \n",GetTStamp(tBuff,56)));
char *version = GETSTRING(ESC_VERSION);
@@ -1532,7 +1516,8 @@
NS_IMETHODIMP_(nsrefcnt)
rhCoolKeyModule::AddRef(void)
{
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKeyModule::AddRef \n"));
+char tBuff[56];
+PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::AddRef \n",GetTStamp(tBuff,56)));
++mRefCnt;
return mRefCnt;
}
@@ -1541,10 +1526,12 @@
NS_IMETHODIMP_(nsrefcnt)
rhCoolKeyModule::Release(void)
{
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKeyModule::Release \n"));
+char tBuff[56];
+PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::Release : mRefCnt %d \n",GetTStamp(tBuff,56),mRefCnt - 1));
--mRefCnt;
if (mRefCnt == 0) {
mRefCnt = 1; /* stabilize */
+PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::Release deleting Module \n",GetTStamp(tBuff,56)));
delete this;
return 0;
}
@@ -1555,7 +1542,8 @@
NS_IMETHODIMP
rhCoolKeyModule::QueryInterface(REFNSIID aIID, void** aInstancePtr)
{
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKeyModule::QueryInterface \n"));
+char tBuff[56];
+PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::QueryInterface \n",GetTStamp(tBuff,56)));
if ( !aInstancePtr )
return NS_ERROR_NULL_POINTER;
@@ -1588,8 +1576,8 @@
const nsIID& aIID,
void** result)
{
-
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKeyModule::GetClassObject \n"));
+char tBuff[56];
+PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::GetClassObject \n",GetTStamp(tBuff,56)));
if (!kCoolKeyCID.Equals(aClass))
return NS_ERROR_FACTORY_NOT_REGISTERED;
@@ -1618,9 +1606,10 @@
const char* componentType)
{
+char tBuff[54];
nsIComponentRegistrar* compReg = nsnull;
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKeyModule::RegisterSelf \n"));
+PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::RegisterSelf \n",GetTStamp(tBuff,56)));
nsresult rv = aCompMgr->QueryInterface(kIComponentRegistrarIID, (void**)&compReg);
if (NS_FAILED(rv))
return rv;
@@ -1642,8 +1631,8 @@
nsIFile* aPath,
const char* registryLocation)
{
-
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKeyModule::UnregisterSelf \n"));
+char tBuff[56];
+PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::UnregisterSelf \n",GetTStamp(tBuff,56)));
nsIComponentRegistrar* compReg = nsnull;
nsresult rv = aCompMgr->QueryInterface(kIComponentRegistrarIID, (void**)&compReg);
@@ -1673,7 +1662,8 @@
{
nsresult rv = NS_OK;
-PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKeyModule::NSGetModule \n"));
+char tBuff[56];
+PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKeyModule::NSGetModule \n",GetTStamp(tBuff,56)));
// Create and initialize the module instance
rhCoolKeyModule *m = new rhCoolKeyModule();
@@ -1688,5 +1678,3 @@
}
return rv;
}
-
-
17 years, 2 months
[Fedora-directory-commits] esc/src/app/xpcom rhICoolKey.idl, 1.4, 1.5
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/xpcom
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30243
Modified Files:
rhICoolKey.idl
Log Message:
Add method to pass log message contents from script to be logged in the native code.
Index: rhICoolKey.idl
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xpcom/rhICoolKey.idl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- rhICoolKey.idl 9 Feb 2007 21:37:33 -0000 1.4
+++ rhICoolKey.idl 24 Feb 2007 01:58:30 -0000 1.5
@@ -31,6 +31,8 @@
void rhCoolKeySetNotifyCallback(in rhIKeyNotify jsNotify);
void rhCoolKeyUnSetNotifyCallback(in rhIKeyNotify jsNotify);
+
+ void CoolKeyLogMsg(in unsigned long aLogLevel, in string aMessage);
void BlinkCoolKey(in unsigned long aKeyType, in string aKeyID,in unsigned long aRate,in unsigned long aDuration);
17 years, 2 months
[Fedora-directory-commits] esc/src/app/daemon escd.cpp,1.2,1.3
by Doctor Conrad
Author: jmagne
Update of /cvs/dirsec/esc/src/app/daemon
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30207
Modified Files:
escd.cpp
Log Message:
Add time stamp to log messages.
Index: escd.cpp
===================================================================
RCS file: /cvs/dirsec/esc/src/app/daemon/escd.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- escd.cpp 25 Oct 2006 03:56:57 -0000 1.2
+++ escd.cpp 24 Feb 2007 01:57:21 -0000 1.3
@@ -50,20 +50,21 @@
void ESC_D::cleanup()
{
+ char tBuff[56];
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, ("%s Daemon: ! Command is already running. \n",GetTStamp(tBuff,56)));
}
- PR_LOG( escDLog, PR_LOG_ERROR, ("Daemon: Attempting to shut down. \n"));
+ PR_LOG( escDLog, PR_LOG_ERROR, ("%s Daemon: Attempting to shut down. \n",GetTStamp(tBuff,56)));
CoolKeyShutdown();
- PR_LOG( escDLog, PR_LOG_ERROR, ("Daemon: Past CoolKeyShutdown \n"));
+ PR_LOG( escDLog, PR_LOG_ERROR, ("%s Daemon: Past CoolKeyShutdown \n",GetTStamp(tBuff,56)));
PR_DestroyLock(mDataLock);
@@ -73,13 +74,14 @@
HRESULT ESC_D::init(int argc, char **argv)
{
+ char tBuff[56];
HRESULT result = S_OK;
- PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: Nmber of args! %d \n",argc));
+ PR_LOG( escDLog, PR_LOG_DEBUG, ("%s Daemon: Nmber of args! %d \n",GetTStamp(tBuff,56),argc));
for(int i = 0; i < argc ; i++)
- PR_LOG( escDLog, PR_LOG_DEBUG, ("Argv[%d]: %s \n",i,argv[i]));
+ PR_LOG( escDLog, PR_LOG_DEBUG, ("%s Argv[%d]: %s \n",GetTStamp(tBuff,56),i,argv[i]));
if(argc != CORRECT_NUM_ARGS)
{
@@ -89,7 +91,7 @@
mDataLock = PR_NewLock();
if (!mDataLock)
{
- PR_LOG( escDLog, PR_LOG_ERROR, ("Cannot create mutex for ESCD! \n"));
+ PR_LOG( escDLog, PR_LOG_ERROR, ("%s Cannot create mutex for ESCD! \n",GetTStamp(tBuff,56)));
return E_FAIL;
}
@@ -131,7 +133,7 @@
{
keyInsertedCommand = value;
- PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: keyInsertedCommand: %s. \n",keyInsertedCommand.c_str()));
+ PR_LOG( escDLog, PR_LOG_DEBUG, ("%s Daemon: keyInsertedCommand: %s. \n",GetTStamp(tBuff,56),keyInsertedCommand.c_str()));
}
}
@@ -139,12 +141,12 @@
vector<string>::iterator n1, v1;
v1 = arg2Tokens.begin();
- PR_LOG(escDLog, PR_LOG_ALWAYS, ("Daemon: got v1 \n"));
+ PR_LOG(escDLog, PR_LOG_ALWAYS, ("%s Daemon: got v1 \n",GetTStamp(tBuff,56)));
if(n1 != arg2Tokens.end())
{
n1 = v1++;
- PR_LOG(escDLog, PR_LOG_ALWAYS, ("Daemon: got n1... \n"));
+ PR_LOG(escDLog, PR_LOG_ALWAYS, ("%s Daemon: got n1... \n",GetTStamp(tBuff,56)));
string name1 = "";
string value1 = "";
@@ -157,7 +159,7 @@
if(name1 == ON_SIGNAL_CMD && value1.size())
{
onSignalCommand = value1;
- PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: onSignalCommand: %s. \n",onSignalCommand.c_str()));
+ PR_LOG( escDLog, PR_LOG_DEBUG, ("%s Daemon: onSignalCommand: %s. \n",GetTStamp(tBuff,56),onSignalCommand.c_str()));
}
}
@@ -196,12 +198,13 @@
unsigned long data, const char *strData
)
{
+ char tBuff[56];
HRESULT result = S_OK;
if(keyState == eCKState_KeyInserted)
{
- PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Key Inserted: keyID: %s. \n",keyID));
+ PR_LOG( escDLog, PR_LOG_ALWAYS, ("%s Daemon: Key Inserted: keyID: %s. \n",GetTStamp(tBuff,56),keyID));
string fullCommand="";
string space = " " ;
@@ -214,7 +217,7 @@
if(keyState == eCKState_KeyRemoved)
{
- PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Key Removed: keyID: %s. \n",keyID));
+ PR_LOG( escDLog, PR_LOG_ALWAYS, ("%s Daemon: Key Removed: keyID: %s. \n",GetTStamp(tBuff,56),keyID));
}
@@ -252,9 +255,10 @@
HRESULT ESC_D::launchCommand(string &command)
{
+ char tBuff[56];
const char *shell = SHELL;
- PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: About to launch command: %s. \n",command.c_str()));
+ PR_LOG( escDLog, PR_LOG_ALWAYS, ("%s Daemon: About to launch command: %s. \n",GetTStamp(tBuff,56),command.c_str()));
int already = 0;
@@ -267,7 +271,7 @@
if(already)
{
- PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: About to launch command: Command already running.. \n")) ;
+ PR_LOG( escDLog, PR_LOG_DEBUG, ("%s Daemon: About to launch command: Command already running.. \n",GetTStamp(tBuff,56))) ;
return E_FAIL;
}
@@ -303,7 +307,7 @@
commandAlreadyLaunched = 0;
- PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: Child command has exited.. \n")) ;
+ PR_LOG( escDLog, PR_LOG_DEBUG, ("%s Daemon: Child command has exited.. \n",GetTStamp(tBuff,56))) ;
PR_Unlock(mDataLock);
@@ -317,7 +321,8 @@
int ESC_D::xIOErrorHandler(Display *display)
{
- PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: XIOErrorHandler! We are finished.\n"));
+ char tBuff[56];
+ PR_LOG( escDLog, PR_LOG_ALWAYS, ("%s Daemon: XIOErrorHandler! We are finished.\n",GetTStamp(tBuff,56)));
if(single)
single->cleanup();
@@ -328,11 +333,11 @@
void ESC_D::signalHandler(int signal)
{
-
+ char tBuff[56];
string fullCommand="";
string space = " " ;
- PR_LOG( escDLog, PR_LOG_DEBUG, ("Daemon: signalHandler: signal: %d.. \n",signal));
+ PR_LOG( escDLog, PR_LOG_DEBUG, ("%s Daemon: signalHandler: signal: %d.. \n",GetTStamp(tBuff,56),signal));
switch(signal)
{
@@ -357,7 +362,7 @@
int main(int argc, char **argv)
{
-
+ char tBuff[56];
pid_t pid;
// Fork off the parent process
@@ -369,7 +374,7 @@
exit(0);
}
- PR_LOG(escDLog, PR_LOG_ALWAYS, ("Daemon: Initializing Daemon... \n"));
+ PR_LOG(escDLog, PR_LOG_ALWAYS, ("%s Daemon: Initializing Daemon... \n",GetTStamp(tBuff,56)));
umask(0);
@@ -379,7 +384,7 @@
if(result == E_FAIL)
{
- PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Error initializing, exiting.. \n"));
+ PR_LOG( escDLog, PR_LOG_ALWAYS, ("%s Daemon: Error initializing, exiting.. \n",GetTStamp(tBuff,56)));
exit(1);
}
@@ -387,7 +392,7 @@
if(hresult == E_FAIL)
{
- PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Error initializing CoolKey System, this will result in problems recognizing Smart Cards! \n"));
+ PR_LOG( escDLog, PR_LOG_ALWAYS, ("%s Daemon: Error initializing CoolKey System, this will result in problems recognizing Smart Cards! \n",GetTStamp(tBuff,56)));
}
@@ -400,13 +405,13 @@
if(!display)
{
- PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Error Obtaining X Display! \n"));
+ PR_LOG( escDLog, PR_LOG_ALWAYS, ("%s Daemon: Error Obtaining X Display! \n",GetTStamp(tBuff,56)));
}
- PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: Attempted XOpenDisplay: %p \n",display));
+ PR_LOG( escDLog, PR_LOG_ALWAYS, ("%s Daemon: Attempted XOpenDisplay: %p \n",GetTStamp(tBuff,56),display));
while ("looping forever") XNextEvent(display,&event);
- PR_LOG( escDLog, PR_LOG_ALWAYS, ("Daemon: main exiting.. \n") );
+ PR_LOG( escDLog, PR_LOG_ALWAYS, ("%s Daemon: main exiting.. \n",GetTStamp(tBuff,56)) );
XCloseDisplay (display);
17 years, 2 months
[Fedora-directory-commits] ldapserver configure.ac, 1.22, 1.23 aclocal.m4, 1.22, 1.23 configure, 1.31, 1.32 missing, 1.17, 1.18 install-sh, 1.17, 1.18 depcomp, 1.17, 1.18 compile, 1.17, 1.18 config.sub, 1.16, 1.17 config.guess, 1.16, 1.17 Makefile.in, 1.34, 1.35
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30858/ldapserver
Modified Files:
configure.ac aclocal.m4 configure missing install-sh depcomp
compile config.sub config.guess Makefile.in
Log Message:
Resolves: bug 229077
Bug Description: Rename fedora-ds to fedora-ds-base (The package breaks
an previous installation of the Fedora DS!!)
Reviewed by: nhosoi, dgilmore (Thanks!)
Fix Description: As it turns out, only the spec file will have to change. It is ok that we have a package named pkgname-base that uses paths like /etc/pkgname and service pkgname. So this diff has been revised to simply bump the version in the code to differentiate it from the previously withdrawn fedora-ds in Fedora Extras.
Platforms tested: RHEL4, FC6
Flag Day: No.
Doc impact: No.
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure.ac,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- configure.ac 22 Feb 2007 23:59:13 -0000 1.22
+++ configure.ac 23 Feb 2007 19:40:51 -0000 1.23
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
# This version is the version returned by ns-slapd -v
-AC_INIT([fedora-ds], [1.1.0a1], [http://bugzilla.redhat.com/])
+AC_INIT([fedora-ds], [1.1.0a2], [http://bugzilla.redhat.com/])
# AC_CONFIG_HEADER must be called right after AC_INIT.
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 foreign subdir-objects])
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- configure 22 Feb 2007 23:59:13 -0000 1.31
+++ configure 23 Feb 2007 19:40:52 -0000 1.32
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for fedora-ds 1.1.0a1.
+# Generated by GNU Autoconf 2.59 for fedora-ds 1.1.0a2.
#
# Report bugs to <http://bugzilla.redhat.com/>.
#
@@ -423,8 +423,8 @@
# Identity of this package.
PACKAGE_NAME='fedora-ds'
PACKAGE_TARNAME='fedora-ds'
-PACKAGE_VERSION='1.1.0a1'
-PACKAGE_STRING='fedora-ds 1.1.0a1'
+PACKAGE_VERSION='1.1.0a2'
+PACKAGE_STRING='fedora-ds 1.1.0a2'
PACKAGE_BUGREPORT='http://bugzilla.redhat.com/'
# Factoring default headers for most tests.
@@ -954,7 +954,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures fedora-ds 1.1.0a1 to adapt to many kinds of systems.
+\`configure' configures fedora-ds 1.1.0a2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1020,7 +1020,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of fedora-ds 1.1.0a1:";;
+ short | recursive ) echo "Configuration of fedora-ds 1.1.0a2:";;
esac
cat <<\_ACEOF
@@ -1197,7 +1197,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-fedora-ds configure 1.1.0a1
+fedora-ds configure 1.1.0a2
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1211,7 +1211,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by fedora-ds $as_me 1.1.0a1, which was
+It was created by fedora-ds $as_me 1.1.0a2, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1857,7 +1857,7 @@
# Define the identity of the package.
PACKAGE='fedora-ds'
- VERSION='1.1.0a1'
+ VERSION='1.1.0a2'
cat >>confdefs.h <<_ACEOF
@@ -25510,7 +25510,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by fedora-ds $as_me 1.1.0a1, which was
+This file was extended by fedora-ds $as_me 1.1.0a2, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -25573,7 +25573,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-fedora-ds config.status 1.1.0a1
+fedora-ds config.status 1.1.0a2
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17 years, 2 months
[Fedora-directory-commits] ldapserver/ldap/admin/src create_instance.c, 1.46, 1.47
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25228/ldapserver/ldap/admin/src
Modified Files:
create_instance.c
Log Message:
Resolves: bug 229825
Bug Description: aci with bogus uid= dn created by ds_newinst
Reviewed by: nhosoi (Thanks!)
Fix Description: Unknown to me until just now, PL_strdup(NULL) will return "" - the empty string. The code in config_suitespot() expects that empty or unused fields are NULL. The solution is to create a create_instance_strdup() wrapper around PL_strdup() and use that in cases where the argument may be NULL. I checked create_instance.c. Every other place where PL_strdup is used, the argument is checked for NULL first. So these are the only places affected. Instance creation works fine after this change and does not create the offending aci.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no
Index: create_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- create_instance.c 23 Feb 2007 04:10:50 -0000 1.46
+++ create_instance.c 23 Feb 2007 18:40:27 -0000 1.47
@@ -338,6 +338,7 @@
char *create_instance_concatenate(char *, char *, int);
int create_instance_mkdir(char *, int);
char *create_instance_mkdir_p(char *, char *, int, struct passwd *);
+static char *create_instance_strdup(const char *);
#if defined( SOLARIS )
/*
@@ -1311,6 +1312,16 @@
return 1;
}
+static char *create_instance_strdup(const char *s)
+{
+ char *result = NULL;
+ if (s) {
+ result = PL_strdup(s);
+ }
+
+ return result;
+}
+
#if defined( SOLARIS )
/*
* Solaris 9+ specific installation
@@ -4063,23 +4074,23 @@
memset( &query_vars, 0, sizeof(query_vars) );
if (!cf->use_existing_user_ds)
- query_vars.suffix = PL_strdup( cf->suffix );
- query_vars.ssAdmID = PL_strdup( cf->cfg_sspt_uid );
- query_vars.ssAdmPW1 = PL_strdup( cf->cfg_sspt_uidpw );
- query_vars.ssAdmPW2 = PL_strdup( cf->cfg_sspt_uidpw );
- query_vars.rootDN = PL_strdup( cf->rootdn );
- query_vars.rootPW = PL_strdup( cf->rootpw );
- query_vars.admin_domain = PL_strdup( cf->admin_domain );
- query_vars.netscaperoot = PL_strdup( cf->netscaperoot );
- query_vars.testconfig = PL_strdup( cf->testconfig );
- query_vars.consumerDN = PL_strdup(cf->consumerdn);
- query_vars.consumerPW = PL_strdup(cf->consumerhashedpw);
+ query_vars.suffix = create_instance_strdup( cf->suffix );
+ query_vars.ssAdmID = create_instance_strdup( cf->cfg_sspt_uid );
+ query_vars.ssAdmPW1 = create_instance_strdup( cf->cfg_sspt_uidpw );
+ query_vars.ssAdmPW2 = create_instance_strdup( cf->cfg_sspt_uidpw );
+ query_vars.rootDN = create_instance_strdup( cf->rootdn );
+ query_vars.rootPW = create_instance_strdup( cf->rootpw );
+ query_vars.admin_domain = create_instance_strdup( cf->admin_domain );
+ query_vars.netscaperoot = create_instance_strdup( cf->netscaperoot );
+ query_vars.testconfig = create_instance_strdup( cf->testconfig );
+ query_vars.consumerDN = create_instance_strdup(cf->consumerdn);
+ query_vars.consumerPW = create_instance_strdup(cf->consumerhashedpw);
if (cf->cfg_sspt && !strcmp(cf->cfg_sspt, "1"))
query_vars.cfg_sspt = 1;
else
query_vars.cfg_sspt = 0;
- query_vars.config_admin_uid = PL_strdup(cf->cfg_sspt_uid);
+ query_vars.config_admin_uid = create_instance_strdup(cf->cfg_sspt_uid);
memset(&slapd_conf, 0, sizeof(SLAPD_CONFIG));
if (sroot)
17 years, 2 months
[Fedora-directory-commits] ldapserver/ldap/admin/src create_instance.c, 1.45, 1.46
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4944
Modified Files:
create_instance.c
Log Message:
Need to terminate dna plugin config entry with a newline
Index: create_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- create_instance.c 22 Feb 2007 23:59:13 -0000 1.45
+++ create_instance.c 23 Feb 2007 04:10:50 -0000 1.46
@@ -3236,6 +3236,7 @@
fprintf(f, "nsslapd-plugintype: preoperation\n");
fprintf(f, "nsslapd-pluginenabled: off\n");
fprintf(f, "nsslapd-pluginPath: %s/libdna-plugin%s\n", cf->plugin_dir, shared_lib);
+ fprintf(f, "\n");
#endif /* ENABLE_DNA */
fprintf(f, "dn: cn=ldbm database,cn=plugins,cn=config\n");
17 years, 2 months
[Fedora-directory-commits] ldapserver/ldap/admin/src create_instance.c, 1.44, 1.45
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15253/ldapserver/ldap/admin/src
Modified Files:
create_instance.c
Log Message:
Resolves: bug 229691
Bug Description: Add enable switches for optional/experimental features
Reviewed by: nkinder, nhosoi, prowley (Thanks!)
Fix Description: Added --enable-pam-passthru, --enable-dna, and --enable-ldapi. They are all on by default and must be explicitly disabled (--disable-pam-passthru). These all cause ENABLE_xxx to be defined for C code so that we can enclose the code in #ifdef ENABLE_PAM_PASSTHRU blocks, for example. For the first two, these also cause the plugins to be built - so that if you specify --disable-pam-passthru, the plugin code will not be built at all. I discovered a nifty autoconf macro called AS_HELP_STRING - this nicely formats the help messages output by configure --help. I don't know if it's worth going through all of our m4 code to use this, but I went ahead and fixed configure.ac. Create instance will now add plugin configuration entries (but disabled) for pam passthru and dna if the corresponding ENABLE_ macros are defined. I also fixed a bug with passthru (not pam passthru) - the plugin configuration entry was not being added.
Platforms tested: RHEL4, FC6
Flag Day: no
Doc impact: no
Index: create_instance.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- create_instance.c 9 Feb 2007 22:33:58 -0000 1.44
+++ create_instance.c 22 Feb 2007 23:59:13 -0000 1.45
@@ -3149,7 +3149,8 @@
#endif
/* enable pass thru authentication */
- if (cf->use_existing_config_ds || cf->use_existing_user_ds)
+ if ((cf->use_existing_config_ds && cf->config_ldap_url) ||
+ (cf->use_existing_user_ds && cf->user_ldap_url))
{
LDAPURLDesc *desc = 0;
char *url = cf->use_existing_config_ds ? cf->config_ldap_url :
@@ -3195,7 +3196,7 @@
fprintf(f, "\n");
}
-#ifdef BUILD_PAM_PASSTHRU
+#ifdef ENABLE_PAM_PASSTHRU
#if !defined( XP_WIN32 )
/* PAM Pass Through Auth plugin - off by default */
fprintf(f, "dn: cn=PAM Pass Through Auth,cn=plugins,cn=config\n");
@@ -3215,13 +3216,27 @@
fprintf(f, "pamExcludeSuffix: %s\n", cf->netscaperoot);
}
fprintf(f, "pamExcludeSuffix: cn=config\n");
- fprintf(f, "pamMapMethod: RDN\n");
+ fprintf(f, "pamIDMapMethod: RDN\n");
+ fprintf(f, "pamIDAttr: notUsedWithRDNMethod\n");
fprintf(f, "pamFallback: FALSE\n");
fprintf(f, "pamSecure: TRUE\n");
fprintf(f, "pamService: ldapserver\n");
fprintf(f, "\n");
#endif /* NO PAM FOR WINDOWS */
-#endif /* BUILD_PAM_PASSTHRU */
+#endif /* ENABLE_PAM_PASSTHRU */
+
+#ifdef ENABLE_DNA
+ fprintf(f, "dn: cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config\n");
+ fprintf(f, "objectclass: top\n");
+ fprintf(f, "objectclass: nsSlapdPlugin\n");
+ fprintf(f, "objectclass: extensibleObject\n");
+ fprintf(f, "objectclass: nsContainer\n");
+ fprintf(f, "cn: Distributed Numeric Assignment Plugin\n");
+ fprintf(f, "nsslapd-plugininitfunc: dna_init\n");
+ fprintf(f, "nsslapd-plugintype: preoperation\n");
+ fprintf(f, "nsslapd-pluginenabled: off\n");
+ fprintf(f, "nsslapd-pluginPath: %s/libdna-plugin%s\n", cf->plugin_dir, shared_lib);
+#endif /* ENABLE_DNA */
fprintf(f, "dn: cn=ldbm database,cn=plugins,cn=config\n");
fprintf(f, "objectclass: top\n");
17 years, 2 months
[Fedora-directory-commits] ldapserver Makefile.am, 1.29, 1.30 Makefile.in, 1.33, 1.34 config.h.in, 1.4, 1.5 configure, 1.30, 1.31 configure.ac, 1.21, 1.22 aclocal.m4, 1.21, 1.22 missing, 1.16, 1.17 install-sh, 1.16, 1.17 depcomp, 1.16, 1.17 compile, 1.16, 1.17 config.sub, 1.15, 1.16 config.guess, 1.15, 1.16
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15253/ldapserver
Modified Files:
Makefile.am Makefile.in config.h.in configure configure.ac
aclocal.m4 missing install-sh depcomp compile config.sub
config.guess
Log Message:
Resolves: bug 229691
Bug Description: Add enable switches for optional/experimental features
Reviewed by: nkinder, nhosoi, prowley (Thanks!)
Fix Description: Added --enable-pam-passthru, --enable-dna, and --enable-ldapi. They are all on by default and must be explicitly disabled (--disable-pam-passthru). These all cause ENABLE_xxx to be defined for C code so that we can enclose the code in #ifdef ENABLE_PAM_PASSTHRU blocks, for example. For the first two, these also cause the plugins to be built - so that if you specify --disable-pam-passthru, the plugin code will not be built at all. I discovered a nifty autoconf macro called AS_HELP_STRING - this nicely formats the help messages output by configure --help. I don't know if it's worth going through all of our m4 code to use this, but I went ahead and fixed configure.ac. Create instance will now add plugin configuration entries (but disabled) for pam passthru and dna if the corresponding ENABLE_ macros are defined. I also fixed a bug with passthru (not pam passthru) - the plugin configuration entry was not being added.
Platforms tested: RHEL4, FC6
Flag Day: no
Doc impact: no
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- Makefile.am 22 Feb 2007 19:29:47 -0000 1.29
+++ Makefile.am 22 Feb 2007 23:59:13 -0000 1.30
@@ -85,13 +85,21 @@
server_LTLIBRARIES = libslapd.la libds_admin.la libns-dshttpd.la
+# this is how to add optional plugins
+if enable_pam_passthru
+LIBPAM_PASSTHRU_PLUGIN = libpam-passthru-plugin.la
+endif
+if enable_dna
+LIBDNA_PLUGIN = libdna-plugin.la
+endif
+
serverplugin_LTLIBRARIES = libacl-plugin.la libattr-unique-plugin.la \
libback-ldbm.la libchainingdb-plugin.la libcos-plugin.la libdes-plugin.la \
- libdistrib-plugin.la libdna-plugin.la libhttp-client-plugin.la libcollation-plugin.la \
- libpam-passthru-plugin.la libpassthru-plugin.la libpresence-plugin.la \
+ libdistrib-plugin.la libhttp-client-plugin.la libcollation-plugin.la \
+ libpassthru-plugin.la libpresence-plugin.la \
libpwdstorage-plugin.la libreferint-plugin.la libreplication-plugin.la \
libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la libsyntax-plugin.la \
- libviews-plugin.la
+ libviews-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN)
nodist_property_DATA = ns-slapd.properties
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- Makefile.in 22 Feb 2007 19:29:47 -0000 1.33
+++ Makefile.in 22 Feb 2007 23:59:13 -0000 1.34
@@ -237,6 +237,7 @@
am_libdna_plugin_la_OBJECTS = \
ldap/servers/plugins/dna/libdna_plugin_la-dna.lo
libdna_plugin_la_OBJECTS = $(am_libdna_plugin_la_OBJECTS)
+@enable_dna_TRUE@am_libdna_plugin_la_rpath = -rpath $(serverplugindir)
libds_admin_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
am_libds_admin_la_OBJECTS = \
@@ -330,6 +331,8 @@
ldap/servers/plugins/pam_passthru/libpam_passthru_plugin_la-pam_ptpreop.lo
libpam_passthru_plugin_la_OBJECTS = \
$(am_libpam_passthru_plugin_la_OBJECTS)
+@enable_pam_passthru_TRUE@am_libpam_passthru_plugin_la_rpath = -rpath \
+@enable_pam_passthru_TRUE@ $(serverplugindir)
libpassthru_plugin_la_LIBADD =
am_libpassthru_plugin_la_OBJECTS = \
ldap/servers/plugins/passthru/libpassthru_plugin_la-ptbind.lo \
@@ -877,6 +880,10 @@
db_libdir = @db_libdir@
db_libver = @db_libver@
debug_defs = @debug_defs@
+enable_dna_FALSE = @enable_dna_FALSE@
+enable_dna_TRUE = @enable_dna_TRUE@
+enable_pam_passthru_FALSE = @enable_pam_passthru_FALSE@
+enable_pam_passthru_TRUE = @enable_pam_passthru_TRUE@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
@@ -979,13 +986,17 @@
CLEANFILES = dirver.h dberrstrs.h ns-slapd.properties
taskdir = $(datadir)@scripttemplatedir@
server_LTLIBRARIES = libslapd.la libds_admin.la libns-dshttpd.la
+
+# this is how to add optional plugins
+@enable_pam_passthru_TRUE@LIBPAM_PASSTHRU_PLUGIN = libpam-passthru-plugin.la
+@enable_dna_TRUE@LIBDNA_PLUGIN = libdna-plugin.la
serverplugin_LTLIBRARIES = libacl-plugin.la libattr-unique-plugin.la \
libback-ldbm.la libchainingdb-plugin.la libcos-plugin.la libdes-plugin.la \
- libdistrib-plugin.la libdna-plugin.la libhttp-client-plugin.la libcollation-plugin.la \
- libpam-passthru-plugin.la libpassthru-plugin.la libpresence-plugin.la \
+ libdistrib-plugin.la libhttp-client-plugin.la libcollation-plugin.la \
+ libpassthru-plugin.la libpresence-plugin.la \
libpwdstorage-plugin.la libreferint-plugin.la libreplication-plugin.la \
libretrocl-plugin.la libroles-plugin.la libstatechange-plugin.la libsyntax-plugin.la \
- libviews-plugin.la
+ libviews-plugin.la $(LIBPAM_PASSTHRU_PLUGIN) $(LIBDNA_PLUGIN)
nodist_property_DATA = ns-slapd.properties
noinst_LIBRARIES = libavl.a libldaputil.a
@@ -2415,7 +2426,7 @@
ldap/servers/plugins/dna/$(am__dirstamp) \
ldap/servers/plugins/dna/$(DEPDIR)/$(am__dirstamp)
libdna-plugin.la: $(libdna_plugin_la_OBJECTS) $(libdna_plugin_la_DEPENDENCIES)
- $(LINK) -rpath $(serverplugindir) $(libdna_plugin_la_LDFLAGS) $(libdna_plugin_la_OBJECTS) $(libdna_plugin_la_LIBADD) $(LIBS)
+ $(LINK) $(am_libdna_plugin_la_rpath) $(libdna_plugin_la_LDFLAGS) $(libdna_plugin_la_OBJECTS) $(libdna_plugin_la_LIBADD) $(LIBS)
ldap/admin/lib/$(am__dirstamp):
@$(mkdir_p) ldap/admin/lib
@: > ldap/admin/lib/$(am__dirstamp)
@@ -2678,7 +2689,7 @@
ldap/servers/plugins/pam_passthru/$(am__dirstamp) \
ldap/servers/plugins/pam_passthru/$(DEPDIR)/$(am__dirstamp)
libpam-passthru-plugin.la: $(libpam_passthru_plugin_la_OBJECTS) $(libpam_passthru_plugin_la_DEPENDENCIES)
- $(LINK) -rpath $(serverplugindir) $(libpam_passthru_plugin_la_LDFLAGS) $(libpam_passthru_plugin_la_OBJECTS) $(libpam_passthru_plugin_la_LIBADD) $(LIBS)
+ $(LINK) $(am_libpam_passthru_plugin_la_rpath) $(libpam_passthru_plugin_la_LDFLAGS) $(libpam_passthru_plugin_la_OBJECTS) $(libpam_passthru_plugin_la_LIBADD) $(LIBS)
ldap/servers/plugins/passthru/$(am__dirstamp):
@$(mkdir_p) ldap/servers/plugins/passthru
@: > ldap/servers/plugins/passthru/$(am__dirstamp)
Index: config.h.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/config.h.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- config.h.in 19 Feb 2007 23:55:04 -0000 1.4
+++ config.h.in 22 Feb 2007 23:59:13 -0000 1.5
@@ -12,6 +12,15 @@
/* cpu type sparc */
#undef CPU_sparc
+/* enable the dna plugin */
+#undef ENABLE_DNA
+
+/* enable ldapi support in the server */
+#undef ENABLE_LDAPI
+
+/* enable the pam passthru auth plugin */
+#undef ENABLE_PAM_PASSTHRU
+
/* Define to 1 if you have the <arpa/inet.h> header file. */
#undef HAVE_ARPA_INET_H
Index: configure
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- configure 19 Feb 2007 23:55:04 -0000 1.30
+++ configure 22 Feb 2007 23:59:13 -0000 1.31
@@ -465,7 +465,7 @@
#endif"
ac_default_prefix=/opt/$PACKAGE_NAME
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP!
P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CP!
P CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS debug_defs BUNDLE_TRUE BUNDLE_FALSE enable_pam_passthru_TRUE enable_pam_passthru_FALSE enable_dna_TRUE enable_dna_FALSE configdir sampledatadir propertydir schemadir serverdir serverplugindir scripttemplatedir instconfigdir WINNT_TRUE WINNT_FALSE LIBSOCKET LIBNSL LIBDL LIBCSTD LIBCRUN initdir HPUX_TRUE HPUX_FALSE SOLARIS_TRUE SOLARIS_FALSE PKG_CONFIG ICU_CONFIG NETSNMP_CONFIG nspr_inc nspr_lib nspr_libdir nss_inc nss_lib nss_libdir ldapsdk_inc ldapsdk_lib ldapsdk_libdir ldapsdk_bindir db_inc db_incdir db_lib db_libdir db_bindir db_libver sasl_inc sasl_lib sasl_libdir svrcore_inc svrcore_lib icu_lib icu_inc icu_bin netsnmp_inc netsnmp_lib netsnmp_libdir netsnmp_link LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -1038,8 +1038,14 @@
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-debug Enable debug features
- --enable-bundle Enable bundled dependencies
+ --enable-debug Enable debug features (default: no)
+ --enable-bundle Enable bundled dependencies (default: no)
+ --enable-pam-passthru enable the PAM passthrough auth plugin (default:
+ yes)
+ --enable-dna enable the Distributed Numeric Assignment (DNA)
+ plugin (default: yes)
+ --enable-ldapi enable LDAP over unix domain socket (LDAPI) support
+ (default: yes)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1050,7 +1056,10 @@
--with-tags[=TAGS]
include additional configurations [automatic]
--with-fhs Use FHS layout
- --with-instconfigdir=/path Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_NAME)
+ --with-instconfigdir=/path
+ Base directory for instance specific writable
+ configuration directories (default
+ $sysconfdir/$PACKAGE_NAME)
--with-nspr=PATH Netscape Portable Runtime (NSPR) directory
--with-nspr-inc=PATH Netscape Portable Runtime (NSPR) include file directory
--with-nspr-lib=PATH Netscape Portable Runtime (NSPR) library directory
@@ -4299,7 +4308,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4302 "configure"' > conftest.$ac_ext
+ echo '#line 4311 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -5434,7 +5443,7 @@
# Provide some information about the compiler.
-echo "$as_me:5437:" \
+echo "$as_me:5446:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6497,11 +6506,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6500: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6509: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6504: \$? = $ac_status" >&5
+ echo "$as_me:6513: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6765,11 +6774,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6768: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6777: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6772: \$? = $ac_status" >&5
+ echo "$as_me:6781: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -6869,11 +6878,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6872: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6881: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:6876: \$? = $ac_status" >&5
+ echo "$as_me:6885: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -8338,7 +8347,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 8341 "configure"' > conftest.$ac_ext
+ echo '#line 8350 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -9235,7 +9244,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9238 "configure"
+#line 9247 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -9335,7 +9344,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 9338 "configure"
+#line 9347 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11678,11 +11687,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11681: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11690: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:11685: \$? = $ac_status" >&5
+ echo "$as_me:11694: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -11782,11 +11791,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:11785: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:11794: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:11789: \$? = $ac_status" >&5
+ echo "$as_me:11798: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -12318,7 +12327,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 12321 "configure"' > conftest.$ac_ext
+ echo '#line 12330 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -13376,11 +13385,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13379: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13388: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:13383: \$? = $ac_status" >&5
+ echo "$as_me:13392: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -13480,11 +13489,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:13483: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:13492: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:13487: \$? = $ac_status" >&5
+ echo "$as_me:13496: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -14929,7 +14938,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 14932 "configure"' > conftest.$ac_ext
+ echo '#line 14941 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -15707,11 +15716,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15710: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15719: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15714: \$? = $ac_status" >&5
+ echo "$as_me:15723: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -15975,11 +15984,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:15978: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:15987: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:15982: \$? = $ac_status" >&5
+ echo "$as_me:15991: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -16079,11 +16088,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:16082: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:16091: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:16086: \$? = $ac_status" >&5
+ echo "$as_me:16095: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -17548,7 +17557,7 @@
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
- echo '#line 17551 "configure"' > conftest.$ac_ext
+ echo '#line 17560 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -22906,6 +22915,97 @@
fi
+# these enables are for optional or experimental features
+if test -z "$enable_pam_passthru" ; then
+ enable_pam_passthru=yes # if not set on cmdline, set default
+fi
+echo "$as_me:$LINENO: checking for --enable-pam-passthru" >&5
+echo $ECHO_N "checking for --enable-pam-passthru... $ECHO_C" >&6
+# Check whether --enable-pam-passthru or --disable-pam-passthru was given.
+if test "${enable_pam_passthru+set}" = set; then
+ enableval="$enable_pam_passthru"
+
+fi;
+if test "$enable_pam_passthru" = yes ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_PAM_PASSTHRU 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if test "$enable_pam_passthru" = "yes"; then
+ enable_pam_passthru_TRUE=
+ enable_pam_passthru_FALSE='#'
+else
+ enable_pam_passthru_TRUE='#'
+ enable_pam_passthru_FALSE=
+fi
+
+
+if test -z "$enable_dna" ; then
+ enable_dna=yes # if not set on cmdline, set default
+fi
+echo "$as_me:$LINENO: checking for --enable-dna" >&5
+echo $ECHO_N "checking for --enable-dna... $ECHO_C" >&6
+# Check whether --enable-dna or --disable-dna was given.
+if test "${enable_dna+set}" = set; then
+ enableval="$enable_dna"
+
+fi;
+if test "$enable_dna" = yes ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_DNA 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+if test "$enable_dna" = "yes"; then
+ enable_dna_TRUE=
+ enable_dna_FALSE='#'
+else
+ enable_dna_TRUE='#'
+ enable_dna_FALSE=
+fi
+
+
+if test -z "$enable_ldapi" ; then
+ enable_ldapi=yes # if not set on cmdline, set default
+fi
+echo "$as_me:$LINENO: checking for --enable-ldapi" >&5
+echo $ECHO_N "checking for --enable-ldapi... $ECHO_C" >&6
+# Check whether --enable-ldapi or --disable-ldapi was given.
+if test "${enable_ldapi+set}" = set; then
+ enableval="$enable_ldapi"
+
+fi;
+if test "$enable_ldapi" = yes ; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_LDAPI 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# the default prefix - override with --prefix or --with-fhs
# BEGIN COPYRIGHT BLOCK
@@ -22990,9 +23090,6 @@
-{ echo "$as_me:$LINENO: checking for instconfigdir..." >&5
-echo "$as_me: checking for instconfigdir..." >&6;}
-
# check for --with-instconfigdir
echo "$as_me:$LINENO: checking for --with-instconfigdir" >&5
echo $ECHO_N "checking for --with-instconfigdir... $ECHO_C" >&6
@@ -25107,6 +25204,20 @@
Usually this means the macro was only invoked conditionally." >&2;}
{ (exit 1); exit 1; }; }
fi
+if test -z "${enable_pam_passthru_TRUE}" && test -z "${enable_pam_passthru_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"enable_pam_passthru\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"enable_pam_passthru\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+if test -z "${enable_dna_TRUE}" && test -z "${enable_dna_FALSE}"; then
+ { { echo "$as_me:$LINENO: error: conditional \"enable_dna\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"enable_dna\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+ { (exit 1); exit 1; }; }
+fi
if test -z "${WINNT_TRUE}" && test -z "${WINNT_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"WINNT\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -25733,6 +25844,10 @@
s,@debug_defs@,$debug_defs,;t t
s,@BUNDLE_TRUE@,$BUNDLE_TRUE,;t t
s,@BUNDLE_FALSE@,$BUNDLE_FALSE,;t t
+s,@enable_pam_passthru_TRUE@,$enable_pam_passthru_TRUE,;t t
+s,@enable_pam_passthru_FALSE@,$enable_pam_passthru_FALSE,;t t
+s,@enable_dna_TRUE@,$enable_dna_TRUE,;t t
+s,@enable_dna_FALSE@,$enable_dna_FALSE,;t t
s,@configdir@,$configdir,;t t
s,@sampledatadir@,$sampledatadir,;t t
s,@propertydir@,$propertydir,;t t
Index: configure.ac
===================================================================
RCS file: /cvs/dirsec/ldapserver/configure.ac,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- configure.ac 19 Feb 2007 23:55:04 -0000 1.21
+++ configure.ac 22 Feb 2007 23:59:13 -0000 1.22
@@ -51,7 +51,7 @@
AC_CHECK_FUNCS([setrlimit endpwent ftruncate getcwd gethostbyname inet_ntoa localtime_r memmove memset mkdir munmap putenv rmdir socket strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strstr strtol tzset])
AC_MSG_CHECKING(for --enable-debug)
-AC_ARG_ENABLE(debug, [ --enable-debug Enable debug features],
+AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [Enable debug features (default: no)]),
[
AC_MSG_RESULT(yes)
debug_defs="-DDEBUG -DMCC_DEBUG"
@@ -64,7 +64,7 @@
# Used for legacy style packaging where we bundle all of the dependencies.
AC_MSG_CHECKING(for --enable-bundle)
-AC_ARG_ENABLE(bundle, [ --enable-bundle Enable bundled dependencies],
+AC_ARG_ENABLE(bundle, AS_HELP_STRING([--enable-bundle], [Enable bundled dependencies (default: no)]),
[
AC_MSG_RESULT(yes)
bundle="1";
@@ -75,6 +75,52 @@
])
AM_CONDITIONAL(BUNDLE,test "$bundle" = "1")
+# these enables are for optional or experimental features
+if test -z "$enable_pam_passthru" ; then
+ enable_pam_passthru=yes # if not set on cmdline, set default
+fi
+AC_MSG_CHECKING(for --enable-pam-passthru)
+AC_ARG_ENABLE(pam-passthru,
+ AS_HELP_STRING([--enable-pam-passthru],
+ [enable the PAM passthrough auth plugin (default: yes)]))
+if test "$enable_pam_passthru" = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_PAM_PASSTHRU], [1], [enable the pam passthru auth plugin])
+else
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(enable_pam_passthru,test "$enable_pam_passthru" = "yes")
+
+if test -z "$enable_dna" ; then
+ enable_dna=yes # if not set on cmdline, set default
+fi
+AC_MSG_CHECKING(for --enable-dna)
+AC_ARG_ENABLE(dna,
+ AS_HELP_STRING([--enable-dna],
+ [enable the Distributed Numeric Assignment (DNA) plugin (default: yes)]))
+if test "$enable_dna" = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_DNA], [1], [enable the dna plugin])
+else
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(enable_dna,test "$enable_dna" = "yes")
+
+if test -z "$enable_ldapi" ; then
+ enable_ldapi=yes # if not set on cmdline, set default
+fi
+AC_MSG_CHECKING(for --enable-ldapi)
+AC_ARG_ENABLE(ldapi,
+ AS_HELP_STRING([--enable-ldapi],
+ [enable LDAP over unix domain socket (LDAPI) support (default: yes)]))
+if test "$enable_ldapi" = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([ENABLE_LDAPI], [1], [enable ldapi support in the server])
+else
+ AC_MSG_RESULT(no)
+fi
+
+# the default prefix - override with --prefix or --with-fhs
AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME])
m4_include(m4/fhs.m4)
@@ -115,11 +161,11 @@
AC_SUBST(serverplugindir)
AC_SUBST(scripttemplatedir)
-AC_CHECKING(for instconfigdir)
-
# check for --with-instconfigdir
AC_MSG_CHECKING(for --with-instconfigdir)
-AC_ARG_WITH(instconfigdir, [ --with-instconfigdir=/path Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_NAME)],
+AC_ARG_WITH(instconfigdir,
+ AS_HELP_STRING([--with-instconfigdir=/path],
+ [Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_NAME)]),
[
if test $withval = yes ; then
AC_ERROR([Please specify a full path with --with-instconfigdir])
17 years, 2 months
[Fedora-directory-commits] ldapserver Makefile.am, 1.28, 1.29 Makefile.in, 1.32, 1.33
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/ldapserver
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30306
Modified Files:
Makefile.am Makefile.in
Log Message:
Resolves: 229428
Summary: Fixed issue with specifying linker to use for ns-slapd.
Index: Makefile.am
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.am,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- Makefile.am 21 Feb 2007 17:44:13 -0000 1.28
+++ Makefile.am 22 Feb 2007 19:29:47 -0000 1.29
@@ -914,6 +914,8 @@
# some C++ shared libraries (such as icu).
if HPUX
ns_slapd_LINK = $(CXXLINK)
+else
+ns_slapd_LINK = $(LINK)
endif
#------------------------
Index: Makefile.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/Makefile.in,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- Makefile.in 21 Feb 2007 17:44:13 -0000 1.32
+++ Makefile.in 22 Feb 2007 19:29:47 -0000 1.33
@@ -1778,6 +1778,7 @@
ns_slapd_LDADD = libslapd.la libldaputil.a $(LDAPSDK_LINK) $(NSS_LINK) \
$(NSPR_LINK) $(SASL_LINK) $(SVRCORE_LINK) $(LIBNSL) $(LIBSOCKET)
+@HPUX_FALSE@ns_slapd_LINK = $(LINK)
# We need to link ns-slapd with the C++ compiler on HP-UX since we load
# some C++ shared libraries (such as icu).
@HPUX_TRUE@ns_slapd_LINK = $(CXXLINK)
17 years, 2 months
[Fedora-directory-commits] mod_nss nss_engine_pphrase.c,1.9,1.10
by Doctor Conrad
Author: rcritten
Update of /cvs/dirsec/mod_nss
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16875
Modified Files:
nss_engine_pphrase.c
Log Message:
229660
Log a warning on a malformed password file entry instead of dropping core.
Index: nss_engine_pphrase.c
===================================================================
RCS file: /cvs/dirsec/mod_nss/nss_engine_pphrase.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- nss_engine_pphrase.c 10 Jan 2007 20:56:00 -0000 1.9
+++ nss_engine_pphrase.c 22 Feb 2007 16:50:14 -0000 1.10
@@ -240,6 +240,11 @@
tmp--;
line[tmp+1] = '\0';
ptr = PL_strchr(line, ':');
+ if (ptr == NULL) {
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
+ "Malformed password entry for token %s. Format should be token:password", token_name);
+ continue;
+ }
for(tmp=1; ptr[tmp] == ' '; tmp++) {}
pwdstr = strdup(&(ptr[tmp]));
}
17 years, 2 months