umask-util: add helper that resets umask until end of current code block
This commit is contained in:
@@ -765,7 +765,6 @@ static void test_rename_noreplace(void) {
|
||||
|
||||
static void test_chmod_and_chown(void) {
|
||||
_cleanup_(rm_rf_physical_and_freep) char *d = NULL;
|
||||
_unused_ _cleanup_umask_ mode_t u = umask(0000);
|
||||
struct stat st;
|
||||
const char *p;
|
||||
|
||||
@@ -774,6 +773,8 @@ static void test_chmod_and_chown(void) {
|
||||
|
||||
log_info("/* %s */", __func__);
|
||||
|
||||
BLOCK_WITH_UMASK(0000);
|
||||
|
||||
assert_se(mkdtemp_malloc(NULL, &d) >= 0);
|
||||
|
||||
p = strjoina(d, "/reg");
|
||||
|
||||
Reference in New Issue
Block a user