• Eric W. Biederman's avatar
    userns: Add kprojid_t and associated infrastructure in projid.h · f76d207a
    Eric W. Biederman authored
    Implement kprojid_t a cousin of the kuid_t and kgid_t.
    
    The per user namespace mapping of project id values can be set with
    /proc/<pid>/projid_map.
    
    A full compliment of helpers is provided: make_kprojid, from_kprojid,
    from_kprojid_munged, kporjid_has_mapping, projid_valid, projid_eq,
    projid_eq, projid_lt.
    
    Project identifiers are part of the generic disk quota interface,
    although it appears only xfs implements project identifiers currently.
    
    The xfs code allows anyone who has permission to set the project
    identifier on a file to use any project identifier so when
    setting up the user namespace project identifier mappings I do
    not require a capability.
    
    Cc: Dave Chinner <david@fromorbit.com>
    Cc: Jan Kara <jack@suse.cz>
    Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
    f76d207a
user.c 5.16 KB