Synchronize repositories.
authorBartlomiej Grzelewski <b.grzelewski@samsung.com>
Wed, 11 Sep 2013 09:02:56 +0000 (11:02 +0200)
committerBartlomiej Grzelewski <b.grzelewski@samsung.com>
Thu, 6 Feb 2014 16:13:22 +0000 (17:13 +0100)
[Issue#]   N/A
[Bug]      N/A
[Problem]  N/A
[Solution] N/A

[Verification] N/A

CMakeLists.txt
packaging/security-server.service [deleted file]
src/communication/security-server-comm.c
src/include/security-server-common.h
src/server/security-server-password.c

index b0adb1c..84defdd 100644 (file)
@@ -43,6 +43,9 @@ SET(CMAKE_CXX_FLAGS_CCOV       "-g -std=c++0x -O2 --coverage")
 # (BJ: our ARM too?)
 ADD_DEFINITIONS("-fPIC")
 
+# Set the default ELF image symbol visibility to hidden - all symbols will be
+# marked with this unless overridden within the code.
+#ADD_DEFINITIONS("-fvisibility=hidden")
 
 # Set compiler warning flags
 ADD_DEFINITIONS("-Werror")                      # Make all warnings into errors.
diff --git a/packaging/security-server.service b/packaging/security-server.service
deleted file mode 100644 (file)
index b2a79c2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-[Unit]
-Description=Start the security server
-
-[Service]
-ExecStart=/usr/bin/security-server
-
-[Install]
-WantedBy=multi-user.target
index 5ad8058..cee9ebc 100644 (file)
@@ -828,7 +828,7 @@ int send_valid_pwd_request(int sock_fd)
 
     /* Send to server */
     retval = TEMP_FAILURE_RETRY(write(sock_fd, &hdr, sizeof(hdr)));
-    if (retval < (int)sizeof(hdr))
+    if (retval < (int)(sizeof(hdr)))
     {
         /* Write error */
         SEC_SVR_ERR("Error on write(): %d", retval);
@@ -925,7 +925,7 @@ int send_set_pwd_request(int sock_fd,
 
     /* Send to server */
     retval = TEMP_FAILURE_RETRY(write(sock_fd, buf, total_length));
-    if (retval < (int)sizeof(buf))
+    if (retval < (int)(sizeof(buf)))
     {
         /* Write error */
         SEC_SVR_ERR("Error on write(): %d", retval);
@@ -990,7 +990,7 @@ int send_set_pwd_validity_request(int sock_fd, const unsigned int valid_period_i
 
     /* Send to server */
     retval = TEMP_FAILURE_RETRY(write(sock_fd, buf, total_length));
-    if (retval < (int)sizeof(buf))
+    if (retval < (int)(sizeof(buf)))
     {
         /* Write error */
         SEC_SVR_ERR("Error on write(): %d", retval);
@@ -1510,7 +1510,7 @@ int authenticate_client_application(int sockfd, int *pid, int *uid)
     /* get PID of socket peer */
     if (getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &cr, &cl) != 0)
     {
-        SEC_SVR_DBG("%s", "getsockopt failed");
+        SEC_SVR_ERR("%s", "getsockopt failed");
         return SECURITY_SERVER_ERROR_SOCKET;
     }
     *pid = cr.pid;
index f5dc2ca..9eb0e41 100644 (file)
@@ -111,35 +111,6 @@ typedef struct _cookie_list
 
 void printhex(const unsigned char *data, int size);
 
-/* for SECURE_LOG* purpose */
-#undef _SECURE_
-#ifndef _SECURE_LOG
-#define _SECURE_ (0)
-#else
-#define _SECURE_ (1)
-#endif
-#undef LOG_
-#define LOG_(id, prio, tag, fmt, arg ...) \
-    (__dlog_print(id, prio, tag, "%s: %s(%d) > " fmt, __MODULE__, __func__, __LINE__, ##arg))
-#undef SECURE_LOG_
-#define SECURE_LOG_(id, prio, tag, fmt, arg ...) \
-    (_SECURE_ ? (__dlog_print(id, prio, tag, "%s: %s(%d) > [SECURE_LOG] " fmt, __MODULE__, __func__, __LINE__, ##arg)) : (0))
-
-#ifdef LOG_TAG
-    #undef LOG_TAG
-#endif
-#define LOG_TAG "SECURITY_SERVER"
-
-#define SECURE_LOGD(format, arg ...) SECURE_LOG_(LOG_ID_MAIN, DLOG_DEBUG, LOG_TAG, format, ##arg)
-#define SECURE_LOGI(format, arg ...) SECURE_LOG_(LOG_ID_MAIN, DLOG_INFO, LOG_TAG, format, ##arg)
-#define SECURE_LOGW(format, arg ...) SECURE_LOG_(LOG_ID_MAIN, DLOG_WARN, LOG_TAG, format, ##arg)
-#define SECURE_LOGE(format, arg ...) SECURE_LOG_(LOG_ID_MAIN, DLOG_ERROR, LOG_TAG, format, ##arg)
-
-#ifndef SECURE_SLOGE
-    #define SECURE_SLOGE(format, arg ...) SECURE_LOG_(LOG_ID_MAIN, DLOG_ERROR, LOG_TAG, format, ##arg)
-#endif // SECURE_SLOGE
-/****************************/
-
 /* Debug */
 #ifdef SECURITY_SERVER_DEBUG_TO_CONSOLE /* debug msg will be printed in console */
 #define SEC_SVR_DBG(FMT, ARG ...) fprintf(stderr, "[DBG:%s:%d] " FMT "\n", \
index 14a1ad0..fc30d26 100644 (file)
@@ -191,7 +191,7 @@ int load_password(unsigned char *cur_pwd, unsigned int *max_attempt, unsigned in
         /* Check expiration time. */
         if (*expire_time == 0) /* No valid period */
             *expire_time = 0xffffffff;
-        else if (*expire_time <= (unsigned int)time(NULL)) /* expired */
+        else if ((time_t)*expire_time <= time(NULL)) /* expired */
             *expire_time = 0;
         else        /* valid yet */
             *expire_time -= time(NULL);
@@ -1394,7 +1394,7 @@ int process_set_pwd_max_challenge_request(int sockfd)
     // this value (max challenge) for current password
 
     retval = TEMP_FAILURE_RETRY(read(sockfd, &max_challenge, sizeof(unsigned int)));
-    if(retval < (int)sizeof(unsigned int))
+    if (retval < (int)sizeof(unsigned int))
     {
         SEC_SVR_ERR("Server Error: recieve failed: %d", retval);
         retval = send_generic_response(sockfd,
@@ -1474,7 +1474,7 @@ int process_set_pwd_validity_request(int sockfd)
     // this value (validity) for current password
 
     retval = TEMP_FAILURE_RETRY(read(sockfd, &validity, sizeof(unsigned int)));
-    if(retval < (int)sizeof(unsigned int))
+    if (retval < (int)sizeof(unsigned int))
     {
         SEC_SVR_ERR("Server Error: recieve failed: %d", retval);
         retval = send_generic_response(sockfd,