@@ -548,8 +548,9 @@ bool deleteToken(char* serial, char* token)
548548 bool rv = true ;
549549 std::string basedir = Configuration::i ()->getString (" directories.tokendir" , DEFAULT_TOKENDIR);
550550 std::string tokendir;
551+ int umask = Configuration::i ()->getInt (" objectstore.umask" , DEFAULT_UMASK);
551552
552- rv = findTokenDirectory (basedir, tokendir, serial, token);
553+ rv = findTokenDirectory (basedir, tokendir, umask, serial, token);
553554
554555 if (rv)
555556 {
@@ -634,7 +635,7 @@ void finalizeSoftHSM()
634635}
635636
636637// Find the token directory
637- bool findTokenDirectory (std::string basedir, std::string& tokendir, char * serial, char * label)
638+ bool findTokenDirectory (std::string basedir, std::string& tokendir, int umask, char * serial, char * label)
638639{
639640 if (serial == NULL && label == NULL )
640641 {
@@ -693,7 +694,7 @@ bool findTokenDirectory(std::string basedir, std::string& tokendir, char* serial
693694 memset (paddedTokenLabel, ' ' , sizeof (paddedTokenLabel));
694695
695696 // Create a token instance
696- ObjectStoreToken* token = ObjectStoreToken::accessToken (basedir, *i);
697+ ObjectStoreToken* token = ObjectStoreToken::accessToken (basedir, *i, umask );
697698
698699 if (!token->isValid ())
699700 {
0 commit comments