Revert "Set default uid" 90/324090/1
authorinkyun.kil <inkyun.kil@samsung.com>
Tue, 13 May 2025 00:36:42 +0000 (09:36 +0900)
committerinkyun.kil <inkyun.kil@samsung.com>
Tue, 13 May 2025 00:37:23 +0000 (09:37 +0900)
This reverts commit 836340828ef0c85016cd8b2d149fe1eba3717498.

Change-Id: I035456b674238d07bcf0f70e386ebe27c7f2f64f

backend/sqlite.c
client/c_main.c
common/common.c
lib/CMakeLists.txt

index 98e9fc843f8a27084dfb1b87255a40a859ad6489..50ccf0ba51200e3e262f6e5d31c739797a3ca48d 100644 (file)
@@ -44,8 +44,6 @@
        "data blob, " \
        "PRIMARY KEY(key)) "
 
-#define BXT_DEFAULT_USER tzplatform_getuid(TZ_SYS_DEFAULT_USER)
-
 static GHashTable *dbs;
 static bool is_db_corrupted;
 
@@ -754,8 +752,8 @@ static int check_owner(const char *dbpath)
                return BUXTON_ERROR_IO_ERROR;
        }
 
-       if (info.st_uid != BXT_DEFAULT_USER) {
-               bxt_err("invalid owner [%d : %d]", BXT_DEFAULT_USER, info.st_uid);
+       if (info.st_uid != getuid()) {
+               bxt_err("invalid owner [%d : %d]", getuid(), info.st_uid);
                return BUXTON_ERROR_IO_ERROR;
        }
 
index a2ef0b06d0231b913fa79a23285219627b605211..315eeae148a92b8c4b5eadf6f71e9f885cc3b219 100644 (file)
@@ -304,7 +304,7 @@ static int get_layer(const char *lnm, uid_t uid, enum buxton_layer_type type,
        }
 
        if (uid == 0)
-               uid = BXT_DEFAULT_USER;
+               uid = getuid();
 
        buxton_layer_set_uid(_layer, uid);
        buxton_layer_set_type(_layer, type);
@@ -466,7 +466,7 @@ int main(int argc, char *argv[])
                r = subsession_get_current_user(BXT_DEFAULT_USER, user);
                if (r == TIZEN_ERROR_NONE)
                        layer->user = strdup(user);
-               bxt_err("get_current_user: %s[uid:%d]", layer->user, layer->uid);
+               bxt_err("get_current_user: %s", layer->user);
        }
 
        r = func(layer, argc > 3 ? argv[3] : NULL,
index 7f90d12a0b28ba65846d266c021527daa5c763a8..747c8270ea09be12aceb3e8392624bc1592b8e01 100644 (file)
@@ -50,7 +50,7 @@ int layer_create(const char *layer_name, struct buxton_layer **layer)
        }
 
        tmp_layer->refcnt = 1;
-       tmp_layer->uid = BXT_DEFAULT_USER;
+       tmp_layer->uid = getuid();
        tmp_layer->type = LAYER_ATTRIBUTE_RW;
 
        *layer = tmp_layer;
index 5235fa9731669ff39de115f4679db33cc0ff57f2..7c1d1dcae7d2d755c8482c87557300e416ced8c1 100644 (file)
@@ -14,7 +14,7 @@ SET_TARGET_PROPERTIES(${TARGET} PROPERTIES
                VERSION ${VERSION}
                SOVERSION ${MAJVER}
 )
-TARGET_LINK_LIBRARIES(${TARGET} ${PKGS_LDFLAGS} ${TZPLATFORM_CONFIG_DEPS_LDFLAGS} pthread atomic )
+TARGET_LINK_LIBRARIES(${TARGET} ${PKGS_LDFLAGS} pthread atomic)
 INSTALL(TARGETS ${TARGET} DESTINATION ${LIB_INSTALL_DIR} COMPONENT RuntimeLibraries)
 
 # buxton2.pc