Release of changes from Samsung private repository.
authorMariusz Domanski <m.domanski@samsung.com>
Tue, 8 Jan 2013 17:01:54 +0000 (18:01 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Thu, 10 Jan 2013 08:38:51 +0000 (09:38 +0100)
* Fixed Prevent defects

Change-Id: I3468cf2754656c7f0b4a3cc619fcfdd1c758d2e6

ace/engine/parser.cpp
packaging/security-server.spec
src/main.cpp
src/security-srv/server/security-server-password.c

index 26cd5cc..fa9ae36 100644 (file)
@@ -574,7 +574,7 @@ ExtendedEffect Parser::convertToEffect(xmlChar *effect)
         Assert(false && "Effect is Error");
         return ExtendedEffect();
     }
-    return ExtendedEffect(Inapplicable);
+    //return ExtendedEffect(Inapplicable); //unreachable statement
 }
 
 Attribute::Match Parser::convertToMatchFunction(xmlChar * func)
@@ -594,7 +594,6 @@ Attribute::Match Parser::convertToMatchFunction(xmlChar * func)
         LogError("[ERROR] match function value is NULL");
         return Attribute::Match::Error;
     }
-    Assert(false);
 }
 
 void Parser::handleAttr(xmlTextReaderPtr reader)
index d522c97..00d4afa 100644 (file)
@@ -1,7 +1,7 @@
 #sbs-git:slp/pkgs/s/security-server security-server 0.0.37
 Name:       security-server
 Summary:    Security server and utilities
-Version:    0.0.59
+Version:    0.0.61
 Release:    1
 Group:      TO_BE/FILLED_IN
 License:    Apache License, Version 2.0
index 52ef54c..c605ac7 100644 (file)
@@ -56,7 +56,11 @@ int main(int argc, char* argv[])
     auto retVal = daemon.execute();
 
     daemon.shutdown();
-    instance.Release();
+    try {
+        instance.Release();
+    } catch (const DPL::SingleInstance::Exception::LockError &e) {
+        LogError(e.DumpToString());
+    }
 
     return retVal;
 }
index 270ce31..a86c219 100644 (file)
@@ -304,7 +304,7 @@ int check_password(const unsigned char *cur_pwd, const unsigned char *requested_
                        const unsigned int max_attempts, const unsigned int expire_time,
                        int *current_attempt)
 {
-       unsigned int current_time;
+       unsigned int current_time = time(NULL);
 
        if(max_attempts != 0)
        {