diff --git a/include/privilege-control.h b/include/privilege-control.h
index d8576cc..0f7517a 100644
--- a/include/privilege-control.h
+++ b/include/privilege-control.h
@@ -112,6 +112,9 @@ int smack_pid_have_access(pid_t pid,
 int perm_app_set_privilege(const char* name, const char* type, const char* path);
 int set_app_privilege(const char* name, const char* type, const char* path) DEPRECATED;
 
+int perm_app_set_privilege_user(const char* name, const char* type, const char* path, uid_t uid, gid_t gid);
+int set_app_privilege_user(const char* name, const char* type, const char* path, uid_t uid, gid_t gid);
+
 /**
  * For a UNIX socket endpoint determine the other side's pkg_id.
  *
diff --git a/src/privilege-control.c b/src/privilege-control.c
index 8fe7ede..042f5c6 100644
--- a/src/privilege-control.c
+++ b/src/privilege-control.c
@@ -241,7 +241,7 @@ API int smack_pid_have_access(pid_t pid,
 	}
 }
 
-static int set_dac(const char *smack_label, const char *pkg_name)
+static int set_dac(const char *smack_label, const char *pkg_name, uid_t uid, gid_t gid)
 {
 	SECURE_C_LOGD("Entering function: %s. Params: smack_label=%s, pkg_name=%s",
 				__func__, smack_label, pkg_name);
@@ -283,8 +283,8 @@ static int set_dac(const char *smack_label, const char *pkg_name)
 		else
 		{
 			strncpy(usr.user_name, APP_USER_NAME, sizeof(usr.user_name));
-			usr.uid = APP_UID;
-			usr.gid = APP_GID;
+			usr.uid = uid;
+			usr.gid = gid;
 			strncpy(usr.home_dir, APP_HOME_DIR, sizeof(usr.home_dir));
 			strncpy(usr.group_list, APP_GROUP_PATH, sizeof(usr.group_list));
 		}
@@ -550,6 +550,14 @@ static app_type_t verify_app_type(const char* type, const char* path)
 	exit(EXIT_FAILURE);
 }
 
+API int set_app_privilege_user(const char* name, const char* type, const char* path, uid_t uid, gid_t gid)//deprecated
+{
+	SECURE_C_LOGD("Entering function: %s. Params: name=%s, type=%s, path=%s",
+				__func__, name, type, path);
+
+	return perm_app_set_privilege_user(name, type, path, uid, gid);
+}
+
 API int set_app_privilege(const char* name, const char* type, const char* path)//deprecated
 {
 	SECURE_C_LOGD("Entering function: %s. Params: name=%s, type=%s, path=%s",
@@ -560,6 +568,11 @@ API int set_app_privilege(const char* name, const char* type, const char* path)/
 
 API int perm_app_set_privilege(const char* name, const char* type, const char* path)
 {
+	return perm_app_set_privilege_user(name, type, path, APP_UID, APP_GID);
+}
+
+API int perm_app_set_privilege_user(const char* name, const char* type, const char* path, uid_t uid, gid_t gid)
+{
 	SECURE_C_LOGD("Entering function: %s. Params: name=%s, type=%s, path=%s",
 				__func__, name, type, path);
 
@@ -603,7 +616,7 @@ API int perm_app_set_privilege(const char* name, const char* type, const char* p
 			return ret;
 	}
 
-	return set_dac(smack_label, name);
+	return set_dac(smack_label, name, uid, gid);
 }
 
 API int set_privilege(const char* pkg_name)//deprecated
