[LTP] [PATCH v8 2/2] open16: allow restricted O_CREAT of FIFOs and regular files

Andrea Cervesato andrea.cervesato@suse.com
Wed May 6 15:16:03 CEST 2026


Hi Wei,

> +
> +	if (n == 2) {
> +		SAFE_CHOWN(DIR, -1, gid1);
> +		SAFE_CHMOD(DIR, 0030 | S_ISVTX);
> +	} else {
> +		SAFE_CHOWN(DIR, 0, 0);
> +		SAFE_CHMOD(DIR, 0777 | S_ISVTX);
> +	}

This is not convincing me. We should probably add these values inside the
tcase struct and use a canary value for excluding SAFE_CHOWN/CHMOD from
being used.

Regards,

--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com


More information about the ltp mailing list