Add a secure warning message for pushing files.
authorKim Gunsoo <gunsoo83.kim@samsung.com>
Mon, 28 Mar 2016 10:42:50 +0000 (19:42 +0900)
committerKim Gunsoo <gunsoo83.kim@samsung.com>
Thu, 31 Mar 2016 07:29:09 +0000 (16:29 +0900)
- When you transfer files using sdb, your data is to be
  sent over an unencrypted connection and could be read
  by others.

Change-Id: I423e19b92ad798e94ed800ba09a1aea34353bf04
Signed-off-by: Kim Gunsoo <gunsoo83.kim@samsung.com>
src/command_function.c
src/sdb_messages.c
src/sdb_messages.h

index aa96f33a8203262bd81f32cada9d8f26244949b8..f8a89bf69495b41f3860f9971e8b97f6d6644c04 100644 (file)
@@ -555,6 +555,8 @@ int push(int argc, char ** argv) {
             .dstF = (FILE_FUNC*)&REMOTE_FILE_FUNC,
             .tag = {'p', 'u', 's', 'h', 'e', 'd', '\0'},
     };
+
+    fprintf(stdout,"%s\n", MSG_SYNC_SECURE_WARNING);
     for (i=1; i<argc-1; i++) {
         info.copied = 0;
         info.skipped = 0;
@@ -767,6 +769,8 @@ int install(int argc, char **argv) {
             .total_bytes = 0,
             .tag = {'p', 'u', 's', 'h', 'e', 'd', '\0'},
     };
+
+    fprintf(stdout,"%s\n", MSG_SYNC_SECURE_WARNING);
     if(do_sync_copy(srcpath, destination, &info, 0)) {
         return 1;
     }
index 03e7b81af1aec80c515ee1c757aa1ca828d36821..b7bc32f7832b5d47bb28ddaacae4aa43f401c9b8 100644 (file)
@@ -65,6 +65,7 @@ const char* ERR_SYNC_NOT_EXIST_FILE = "'%s' does not exist";
 const char* ERR_SYNC_NOT_DIRECTORY = "'%s' is not a directory";
 const char* ERR_SYNC_LOCKED  = "'%s' is locked";
 const char* ERR_SYNC_CANNOT_ACCESS = "cannot access '%s'";
+const char* MSG_SYNC_SECURE_WARNING = "WARNING: Your data is to be sent over an unencrypted connection and could be read by others.";
 
 const char* ERR_CONNECT_MORE_THAN_ONE_TARGET = "more than one target found. Specify the target with -s option.";
 const char* ERR_CONNECT_MORE_THAN_ONE_EMUL = "more than one emulator found. Specify the emulator with -e option.";
index 9f9b037a295c8e73dc7d49fb863408fb2ee36952..656864e7876b9dfdc6234bd00c3afef69e5e585c 100644 (file)
@@ -66,6 +66,7 @@ extern const char* ERR_SYNC_NOT_EXIST_FILE;
 extern const char* ERR_SYNC_NOT_DIRECTORY;
 extern const char* ERR_SYNC_LOCKED;
 extern const char* ERR_SYNC_CANNOT_ACCESS;
+extern const char* MSG_SYNC_SECURE_WARNING;
 
 extern const char* ERR_CONNECT_MORE_THAN_ONE_TARGET;
 extern const char* ERR_CONNECT_MORE_THAN_ONE_EMUL;