diff --git a/src/pack.c b/src/pack.c index 1d61b71..29c7758 100644 --- a/src/pack.c +++ b/src/pack.c @@ -58,11 +58,11 @@ static void empty_pack_stage(int full, int from_version, int to_version, char *m // (re)create module/version/{delta,staged} string_or_die(&path, "%s/%s/%i_to_%i/delta", packstage_dir, module, from_version, to_version); - g_mkdir_with_parents(path, S_IRWXU | S_IRWXG); + g_mkdir_with_parents(path, S_IRWXU); free(path); string_or_die(&path, "%s/%s/%i_to_%i/staged", packstage_dir, module, from_version, to_version); - g_mkdir_with_parents(path, S_IRWXU | S_IRWXG); + g_mkdir_with_parents(path, S_IRWXU); free(path); } } @@ -79,7 +79,7 @@ static void explode_pack_stage(int from_version, int to_version, char *module) string_or_die(&path, "%s/%s/%i_to_%i/staged", packstage_dir, module, from_version, to_version); - g_mkdir_with_parents(path, S_IRWXU | S_IRWXG); + g_mkdir_with_parents(path, S_IRWXU); dir = opendir(path); if (!dir) { fprintf(stderr, "There are problems accessing %s, exiting\n", path); diff --git a/test/functional/full-run/test.bats b/test/functional/full-run/test.bats index b2e4b96..17270e4 100755 --- a/test/functional/full-run/test.bats +++ b/test/functional/full-run/test.bats @@ -40,6 +40,12 @@ setup() { [[ 1 -eq $(grep '/usr/share/clear/bundles$' $DIR/www/10/Manifest.os-core | wc -l) ]] [[ 4 -eq $(tar -tf $DIR/www/10/pack-test-bundle-from-0.tar | wc -l) ]] [[ 5 -eq $(tar -tf $DIR/www/10/pack-os-core-from-0.tar | wc -l) ]] + + # extract test-bundle pack to make sure staged and delta are created with the + # correct permissions + sudo tar -xf $DIR/www/10/pack-test-bundle-from-0.tar --directory $DIR/www/10/ + [[ $(stat -c %a $DIR/www/10/staged) -eq 700 ]] + [[ $(stat -c %a $DIR/www/10/delta) -eq 700 ]] } # vi: ft=sh ts=8 sw=2 sts=2 et tw=80