version up to 2.1.0
[platform/core/system/sdbd.git] / src / sdb.h
index a6a052d..41ce734 100644 (file)
--- a/src/sdb.h
+++ b/src/sdb.h
@@ -33,9 +33,9 @@
 #define A_VERSION 0x01000000        // SDB protocol version
 
 #define SDB_VERSION_MAJOR 2         // Used for help/version information
-#define SDB_VERSION_MINOR 0         // Used for help/version information
+#define SDB_VERSION_MINOR 1         // Used for help/version information
 
-#define SDB_SERVER_VERSION 2        // Increment this when we want to force users to start a new sdb server
+#define SDB_SERVER_VERSION 0        // Increment this when we want to force users to start a new sdb server
 
 typedef struct amessage amessage;
 typedef struct apacket apacket;
@@ -319,8 +319,24 @@ void framebuffer_service(int fd, void *cookie);
 void log_service(int fd, void *cookie);
 void remount_service(int fd, void *cookie);
 char * get_log_file_path(const char * log_name);
+
+int rootshell_mode;// 0: developer, 1: root
+
+// This is the users and groups config for the platform
+
+#define SID_ROOT        0    /* traditional unix root user */
+#define SID_TTY         5    /* group for /dev/ptmx */
+#define SID_APP         5000 /* application */
+#define SID_DEVELOPER   5100 /* developer with SDK */
+#define SID_APP_LOGGING 6509
+#define SID_SYS_LOGGING 6527
+
 #endif
 
+int should_drop_privileges(void);
+int set_developer_privileges();
+void set_root_privileges();
+
 /* packet allocator */
 apacket *get_apacket(void);
 void put_apacket(apacket *p);
@@ -347,7 +363,8 @@ typedef enum {
     TRACE_SYSDEPS,
     TRACE_JDWP,
     TRACE_SERVICES,
-    TRACE_PROPERTIES
+    TRACE_PROPERTIES,
+    TRACE_SDKTOOLS
 } SdbTrace;
 
 #if SDB_TRACE