[CRIU] [PATCH 2/2] zdtm: test for mlocked area restores if programm have no credentials

Pavel Emelyanov xemul at parallels.com
Fri Sep 19 03:25:28 PDT 2014


On 09/12/2014 02:39 PM, Pavel Tikhomirov wrote:

> +	test_msg("Setuid to 18943\n");
> +	ret = setuid(18943);

This call doesn't drop capabilities.

> +	if (ret < 0) {
> +		err("setuid");
> +		return -1;
> +	}
> +
> +	test_waitsig();
> +
> +	ret = get_smaps_bits((unsigned long)start, &new_flags, &new_madv);
> +	if (ret < 0)
> +		return -1;
> +
> +	test_msg("Check smaps flags for MAP_LOCKED\n");
> +	if (new_flags & MAP_LOCKED) {
> +		pass();
> +	} else {
> +		fail("Vma is not locked after c/r\n");
> +		return -1;
> +	}
> +
> +	return 0;
> +}
> 



More information about the CRIU mailing list