driver core: handle user namespaces properly with the uid/gid devtmpfs change
Now that devtmpfs is caring about uid/gid, we need to use the correct internal types so users who have USER_NS enabled will have things work properly for them. Thanks to Eric for pointing this out, and the patch review. Reported-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Kay Sievers <kay@vrfy.org> Cc: Ming Lei <ming.lei@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d81c8d19da
commit
4e4098a3e0
5 changed files with 20 additions and 20 deletions
|
@ -467,7 +467,7 @@ struct device_type {
|
|||
const struct attribute_group **groups;
|
||||
int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
|
||||
char *(*devnode)(struct device *dev, umode_t *mode,
|
||||
uid_t *uid, gid_t *gid);
|
||||
kuid_t *uid, kgid_t *gid);
|
||||
void (*release)(struct device *dev);
|
||||
|
||||
const struct dev_pm_ops *pm;
|
||||
|
@ -845,7 +845,7 @@ extern int device_rename(struct device *dev, const char *new_name);
|
|||
extern int device_move(struct device *dev, struct device *new_parent,
|
||||
enum dpm_order dpm_order);
|
||||
extern const char *device_get_devnode(struct device *dev,
|
||||
umode_t *mode, uid_t *uid, gid_t *gid,
|
||||
umode_t *mode, kuid_t *uid, kgid_t *gid,
|
||||
const char **tmp);
|
||||
extern void *dev_get_drvdata(const struct device *dev);
|
||||
extern int dev_set_drvdata(struct device *dev, void *data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue