Extend AppInstallHelper with checker methods
[platform/core/test/security-tests.git] / src / security-manager-tests / common / sm_commons.h
index 6840281..427657d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2019 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2016-2020 Samsung Electronics Co., Ltd All Rights Reserved
  *
  *    Licensed under the Apache License, Version 2.0 (the "License");
  *    you may not use this file except in compliance with the License.
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <vector>
-#include <functional>
-
-#include <security-manager-types.h>
 
 #include <app_install_helper.h>
 #include <memory.h>
 #include <temp_test_user.h>
-#include <tzplatform.h>
 
 DEFINE_SMARTPTR(cap_free, _cap_struct, CapsSetsUniquePtr);
 
 const int FTW_MAX_FDS = 16;
 
-typedef std::vector<std::string> privileges_t;
-
 int nftw_remove_labels(const char *fpath, const struct stat* /*sb*/,
                        int /*typeflag*/, struct FTW* /*ftwbuf*/);
-void check_app_permissions(const std::string &app_id, const std::string &pkg_id,
-                           const std::string &user, const privileges_t &allowed_privs,
-                           const privileges_t &denied_privs, bool isHybrid = false);
-void sm_app_has_privileges(const AppInstallHelper &app,
-                           const std::vector<std::string> &privileges,
-                           int result);
-void check_app_after_install(const std::string &app_id, const std::string &pkg_id,
-                             bool isHybrid = false);
-void check_app_after_install(const std::string &app_id, const std::string &pkg_id,
-                             const privileges_t &allowed_privs,
-                             const privileges_t &denied_privs,
-                             bool isHybrid = false);
 void check_path(const std::string &path, const std::string &label,
                 bool transmute = true, bool execute = false);
-void check_app_after_uninstall(const std::string &app_id, const std::string &pkg_id,
-                               bool isHybrid = false, bool removePkg = false);
-void check_app_after_uninstall(const std::string &app_id, const std::string &pkg_id,
-                               const privileges_t &privileges, bool isHybrid = false,
-                               bool removePkg = false);
-std::string access_opposite(std::string &access);
-void check_exact_smack_accesses(const std::string &subject,
-                                const std::string &object,
-                                const std::string &access);
 
 CapsSetsUniquePtr setCaps(const char *cap_string);