[PATCH v2 2/2] hostfs: store permissions in extended attributes

Richard Weinberger richard at nod.at
Fri Apr 14 03:54:51 PDT 2023


----- Ursprüngliche Mail -----
> Von: "Marko Petrović" <petrovicmarko2006 at gmail.com>
> +static int uml_chown(const char *pathname, unsigned int owner, unsigned int
> group)

Is there a specific reason why you are not using uid_t and gid_t?

> +{
> +	int status;
> +
> +	if (use_xattr) {
> +		if (owner != -1) {

Doesn't -1 clash with the uid space?
Same for gid.

> +			status = setxattr(pathname, "user.umluid", &owner,
> +							sizeof(unsigned int), 0);


I'd prefer storing the values platform independent. e.g. in __le32. 
Just to be future prove.

Thanks,
//richard



More information about the linux-um mailing list