[Devel] Re: [PATCH 2/3] c/r: Add UTS support (v6)

Serge E. Hallyn serue at us.ibm.com
Thu Apr 2 11:09:36 PDT 2009


Quoting Dan Smith (danms at us.ibm.com):
> +	ret = cr_read_string(ctx, nn, hh.nodename_len);
> +	if (ret < 0)
> +		goto out;
> +
> +	ret = cr_read_string(ctx, dn, hh.domainname_len);
> +	if (ret < 0)
> +		goto out;
> +
> +	ret = sys_unshare(CLONE_NEWUTS);
> +	if (ret)
> +		goto out;
> +
> +	ns = t->nsproxy->uts_ns;
> +	memcpy(ns->name.nodename, nn, hh.nodename_len);
> +	memcpy(ns->name.domainname, dn, hh.domainname_len);

Actually, I think you must make sure the user didn't slip
in a nodename_len which was > sizeof(ns->name.nodename).

-serge
_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list