summaryrefslogtreecommitdiffstats
path: root/ini/ini_parse_ut.c
diff options
context:
space:
mode:
Diffstat (limited to 'ini/ini_parse_ut.c')
-rw-r--r--ini/ini_parse_ut.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/ini/ini_parse_ut.c b/ini/ini_parse_ut.c
index 6cab9d4..826cce0 100644
--- a/ini/ini_parse_ut.c
+++ b/ini/ini_parse_ut.c
@@ -634,7 +634,6 @@ int merge_section_test(void)
int startup_test(void)
{
int error = EOK;
- int error2 = EOK;
struct ini_cfgfile *file_ctx = NULL;
struct ini_cfgobj *ini_config = NULL;
char **error_list = NULL;
@@ -642,6 +641,9 @@ int startup_test(void)
memcpy(filename, FOO_CONF, sizeof(FOO_CONF));
+ /* Ensure that we start with the correct file mode */
+ chmod(filename, 0664);
+
INIOUT(printf("<==== Startup test ====>\n"));
/* Open config file */
@@ -685,22 +687,9 @@ int startup_test(void)
0);
if (error) {
- /* In case the repo is created by root the permission is different */
- error2 = ini_config_access_check(
- file_ctx,
- INI_ACCESS_CHECK_MODE, /* add uid & gui flags
- * in real case
- */
- 0, /* <- will be real uid in real case */
- 0, /* <- will be real gid in real case */
- 0644, /* Checkling for rw-r-r-- */
- 0);
- if(error2) {
- printf("Access check failed twice: %d %d!\n", error, error2);
- ini_config_file_destroy(file_ctx);
- return EACCES;
- }
- /* If this check passed we are OK! */
+ printf("Access check failed: %d!\n", error);
+ ini_config_file_destroy(file_ctx);
+ return EACCES;
}
/* Create config object */