---
 usr/include/pkcs11/pkcs11err.h     |    2 -
 usr/lib/pkcs11/common/log.c        |    2 +-
 usr/sbin/pkcsconf/pkcsconf.c       |   54 ++++++++++++++++++------------------
 usr/sbin/pkcsslotd/err.c           |    2 +-
 usr/sbin/pkcsslotd/err.h           |    2 -
 usr/sbin/pkcsslotd/garbage_linux.c |    2 +-
 usr/sbin/pkcsslotd/odm.h           |    1 -
 usr/sbin/pkcsslotd/pkcsslotd.h     |    2 +-
 usr/sbin/pkcsslotd/slotmgr.c       |    2 +
 9 files changed, 33 insertions(+), 36 deletions(-)

diff --git a/usr/include/pkcs11/pkcs11err.h b/usr/include/pkcs11/pkcs11err.h
index 70afa55..4274031 100644
--- a/usr/include/pkcs11/pkcs11err.h
+++ b/usr/include/pkcs11/pkcs11err.h
@@ -356,8 +356,6 @@ typedef struct _ConstInfo {
 
 
 
-const unsigned char *ConstName         ( pConstInfo pInfoArray, unsigned int 
InfoArraySize, unsigned int ConstValue );
-
 #ifdef _DAE_H
   const unsigned char *DAEConst        ( unsigned int Val );
 #endif /* _DAE_H */
diff --git a/usr/lib/pkcs11/common/log.c b/usr/lib/pkcs11/common/log.c
index cc27995..451073c 100644
--- a/usr/lib/pkcs11/common/log.c
+++ b/usr/lib/pkcs11/common/log.c
@@ -327,7 +327,7 @@ char  lfname[1024];
 #else
 extern int  debugfile;
 #endif
-pthread_mutex_t  lmtx=PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t  lmtx=PTHREAD_MUTEX_INITIALIZER;
 
 static int enabled=0;
 static int logging=0;
diff --git a/usr/sbin/pkcsconf/pkcsconf.c b/usr/sbin/pkcsconf/pkcsconf.c
index 2f07c13..a3bd617 100644
--- a/usr/sbin/pkcsconf/pkcsconf.c
+++ b/usr/sbin/pkcsconf/pkcsconf.c
@@ -307,7 +307,7 @@
 #include "p11util.h"
 
 #define MSG_SET MS_PKCSINIT
-nl_catd catd;
+static nl_catd catd;
 #define PKCSINIT_MSG(n,s) catgets(catd,MSG_SET,n,s)
 
 #define LEEDS_DEFAULT_PIN "87654321"
@@ -331,27 +331,27 @@ nl_catd catd;
 #define CFG_SHARED_MEM     0x1000
 #define CFG_LIST_SLOT      0x2000
 
-CK_RV init(void);
-void usage(char *);
-int echo(int);
-int get_pin(CK_CHAR **);
-CK_RV cleanup(void);
-CK_RV display_pkcs11_info(void);
-CK_RV get_slot_list(void);
-CK_RV display_slot_info(int);
-CK_RV display_token_info(int);
-CK_RV display_mechanism_info(int);
-CK_RV init_token(int, CK_CHAR_PTR);
-CK_RV init_user_pin(int, CK_CHAR_PTR, CK_CHAR_PTR);
-CK_RV list_slot(int);
-CK_RV set_user_pin(int, CK_USER_TYPE, CK_CHAR_PTR, CK_CHAR_PTR);
-
-void * dllPtr;
-CK_FUNCTION_LIST_PTR  FunctionPtr = NULL;
-CK_SLOT_ID_PTR        SlotList = NULL;
-CK_ULONG              SlotCount = 0;
-Slot_Mgr_Shr_t *      shmp = NULL;
-int in_slot;
+static CK_RV init(void);
+static void usage(char *);
+static int echo(int);
+static int get_pin(CK_CHAR **);
+static CK_RV cleanup(void);
+static CK_RV display_pkcs11_info(void);
+static CK_RV get_slot_list(void);
+static CK_RV display_slot_info(int);
+static CK_RV display_token_info(int);
+static CK_RV display_mechanism_info(int);
+static CK_RV init_token(int, CK_CHAR_PTR);
+static CK_RV init_user_pin(int, CK_CHAR_PTR, CK_CHAR_PTR);
+static CK_RV list_slot(int);
+static CK_RV set_user_pin(int, CK_USER_TYPE, CK_CHAR_PTR, CK_CHAR_PTR);
+
+static void * dllPtr;
+static CK_FUNCTION_LIST_PTR  FunctionPtr = NULL;
+static CK_SLOT_ID_PTR        SlotList = NULL;
+static CK_ULONG              SlotCount = 0;
+static Slot_Mgr_Shr_t *      shmp = NULL;
+static int in_slot;
 
 int
 main(int argc, char *argv[]){
@@ -826,7 +826,7 @@ get_slot_list(){
    return CKR_OK;
 }
 
-void
+static void
 display_mechanism_name(CK_MECHANISM_TYPE mech)
 {
        CK_ULONG i;
@@ -838,7 +838,7 @@ display_mechanism_name(CK_MECHANISM_TYPE mech)
        }
 }
 
-void
+static void
 display_mechanism_flags(CK_FLAGS flags)
 {
        CK_ULONG i, firsties = 1;
@@ -917,7 +917,7 @@ display_mechanism_info(int slot_id){
     return CKR_OK;
 }
 
-void
+static void
 print_slot_info(int slot_id, CK_SLOT_INFO *SlotInfo)
 {
       /* Display the slot information */
@@ -1011,7 +1011,7 @@ list_slot(int slot_id){
     return CKR_OK;
 }
 
-void
+static void
 print_token_info(int slot_id, CK_TOKEN_INFO *TokenInfo)
 {
       /* Display the token information */
@@ -1079,7 +1079,7 @@ print_token_info(int slot_id, CK_TOKEN_INFO *TokenInfo)
       printf(PKCSINIT_MSG(TIME, "\tTime: %.16s\n"), TokenInfo->utcTime);
 }
 
-CK_RV
+static CK_RV
 display_token_info(int slot_id)
 {
    CK_RV          rc;         // Return Code
diff --git a/usr/sbin/pkcsslotd/err.c b/usr/sbin/pkcsslotd/err.c
index 1ba9f18..f804d0a 100644
--- a/usr/sbin/pkcsslotd/err.c
+++ b/usr/sbin/pkcsslotd/err.c
@@ -980,7 +980,7 @@ static const ConstInfo PkcsResponseSeverityInfo[] = {
 static const unsigned int PkcsResponseSeveritySize = ( 
sizeof(PkcsResponseSeverityInfo) / sizeof(PkcsResponseSeverityInfo[0]) );
 
 
-const unsigned char *ConstName( pConstInfo pInfoArray, unsigned int 
InfoArraySize, unsigned int ConstValue ) {
+static const unsigned char *ConstName( pConstInfo pInfoArray, unsigned int 
InfoArraySize, unsigned int ConstValue ) {
 
   unsigned int i;
   unsigned const char *retval = NULL;
diff --git a/usr/sbin/pkcsslotd/err.h b/usr/sbin/pkcsslotd/err.h
index 488a06e..c474091 100644
--- a/usr/sbin/pkcsslotd/err.h
+++ b/usr/sbin/pkcsslotd/err.h
@@ -357,8 +357,6 @@ typedef const ConstInfo *pConstInfo;
 
 
 
-const unsigned char *ConstName         ( pConstInfo pInfoArray, unsigned int 
InfoArraySize, unsigned int ConstValue );
-
 #ifdef _DAE_H
   const unsigned char *DAEConst        ( unsigned int Val );
 #endif /* _DAE_H */
diff --git a/usr/sbin/pkcsslotd/garbage_linux.c 
b/usr/sbin/pkcsslotd/garbage_linux.c
index cc6d4a6..97cae9d 100644
--- a/usr/sbin/pkcsslotd/garbage_linux.c
+++ b/usr/sbin/pkcsslotd/garbage_linux.c
@@ -312,7 +312,7 @@ BOOL                IsValidProcessEntry     ( pid_t pid,   
time_t RegTime );
 
 int                 Stat2Proc               ( int pid, proc_t *p );
 
- pthread_t    GCThread;                /* Garbage Collection thread's handle */
+static pthread_t    GCThread;                /* Garbage Collection thread's 
handle */
 static BOOL         ThreadRunning = FALSE;   /* If we're already running or 
not */
 
 #if THREADED
diff --git a/usr/sbin/pkcsslotd/odm.h b/usr/sbin/pkcsslotd/odm.h
index 12d49fd..e8d8e9a 100644
--- a/usr/sbin/pkcsslotd/odm.h
+++ b/usr/sbin/pkcsslotd/odm.h
@@ -320,7 +320,6 @@ typedef const ConstInfo *pConstInfo;
  *********************/
 
 const unsigned char        *ODMConst( unsigned int Val );
-const unsigned char        *ConstName( pConstInfo pInfoArray, unsigned int 
InfoArraySize, unsigned int ConstValue );
 
 
 
diff --git a/usr/sbin/pkcsslotd/pkcsslotd.h b/usr/sbin/pkcsslotd/pkcsslotd.h
index f3a70cf..3fc032c 100644
--- a/usr/sbin/pkcsslotd/pkcsslotd.h
+++ b/usr/sbin/pkcsslotd/pkcsslotd.h
@@ -372,7 +372,7 @@
 
 
 #define MSG_SET MS_SLOTD
-nl_catd catd;
+extern nl_catd catd;
 #define SLOTD_MSG(n,s) catgets(catd,MSG_SET,n,s)
 
 
diff --git a/usr/sbin/pkcsslotd/slotmgr.c b/usr/sbin/pkcsslotd/slotmgr.c
index 334ead6..73daefd 100644
--- a/usr/sbin/pkcsslotd/slotmgr.c
+++ b/usr/sbin/pkcsslotd/slotmgr.c
@@ -308,6 +308,8 @@
 extern BOOL               Daemon;
 extern BOOL               IveDaemonized;
 
+nl_catd catd;
+
 #if !(THREADED)
 extern void *GCMain ( void *Ptr);
 #endif
-- 
1.7.5.rc1


------------------------------------------------------------------------------
Fulfilling the Lean Software Promise
Lean software platforms are now widely adopted and the benefits have been 
demonstrated beyond question. Learn why your peers are replacing JEE 
containers with lightweight application servers - and what you can gain 
from the move. http://p.sf.net/sfu/vmware-sfemails
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to