std::string uid_string;
TemporaryTestUser test_user(new_user_name, GUM_USERTYPE_NORMAL, false);
test_user.create();
- uid_string = std::to_string(static_cast<unsigned int>(test_user.getUid()));
+ test_user.getUidString(uid_string);
install_app(sm_app_id, sm_pkg_id, test_user.getUid());
// gumd user add
TemporaryTestUser test_user(new_user_name, GUM_USERTYPE_NORMAL, false);
test_user.create();
- uid_string = std::to_string(static_cast<unsigned int>(test_user.getUid()));
+ test_user.getUidString(uid_string);
addUserRequest.setUid(test_user.getUid());
addUserRequest.setUserType(SM_USER_TYPE_NORMAL);
const char *const USER_TYPE_NORMAL_BUCKET = "USER_TYPE_NORMAL";
const std::string username("sm_test_10_user_cynara_policy");
CynaraTestAdmin::Admin admin;
+ std::string uid_string;
TemporaryTestUser user(username, GUM_USERTYPE_NORMAL, true);
user.create();
- std::string uid_string = std::to_string(static_cast<unsigned int>(user.getUid()));
+ user.getUidString(uid_string);
CynaraTestAdmin::CynaraPoliciesContainer nonemptyContainer;
nonemptyContainer.add(MAIN_BUCKET,CYNARA_ADMIN_WILDCARD, uid_string.c_str(), CYNARA_ADMIN_WILDCARD, CYNARA_ADMIN_BUCKET, USER_TYPE_NORMAL_BUCKET);
const std::string app_id = "security_manager_10_app";
const std::string pkg_id = "security_manager_10_pkg";
const std::string username("sm_test_10_user_name");
+ std::string uid_string;
TemporaryTestUser user(username, GUM_USERTYPE_NORMAL, true);
user.create();
+ user.getUidString(uid_string);
const std::string path1 = "/home/" + username + "/p1";
const std::string path2 = "/home/" + username + "/p2";
const std::string pkgopt = " --pkg=" + pkg_id;
const std::string appopt = " --app=" + app_id;
- const std::string uidopt = " --uid=" + std::to_string(static_cast<unsigned int>(user.getUid()));
+ const std::string uidopt = " --uid=" + uid_string;
mkdir(path1.c_str(), 0);
mkdir(path2.c_str(), 0);
const int SUCCESS = 0;
const int FAILURE = 256;
const std::string username("sm_test_11_user_name");
+ std::string uid_string;
TemporaryTestUser user(username, GUM_USERTYPE_NORMAL, true);
user.create();
- const std::string uidopt = " --uid=" + std::to_string(static_cast<unsigned int>(user.getUid()));
+ user.getUidString(uid_string);
+ const std::string uidopt = " --uid=" + uid_string;
struct operation {
std::string command;