user_ns: Introduce user_nsmap_uid and user_ns_map_gid.
[pandora-kernel.git] / include / linux / user_namespace.h
index cc4f453..8178156 100644 (file)
@@ -36,6 +36,9 @@ static inline void put_user_ns(struct user_namespace *ns)
                kref_put(&ns->kref, free_user_ns);
 }
 
+uid_t user_ns_map_uid(struct user_namespace *to, const struct cred *cred, uid_t uid);
+gid_t user_ns_map_gid(struct user_namespace *to, const struct cred *cred, gid_t gid);
+
 #else
 
 static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
@@ -52,6 +55,17 @@ static inline void put_user_ns(struct user_namespace *ns)
 {
 }
 
+static inline uid_t user_ns_map_uid(struct user_namespace *to,
+       const struct cred *cred, uid_t uid)
+{
+       return uid;
+}
+static inline gid_t user_ns_map_gid(struct user_namespace *to,
+       const struct cred *cred, gid_t gid)
+{
+       return gid;
+}
+
 #endif
 
 #endif /* _LINUX_USER_H */