aboutsummaryrefslogtreecommitdiffstats
path: root/security/tomoyo/condition.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/tomoyo/condition.c')
-rw-r--r--security/tomoyo/condition.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/security/tomoyo/condition.c b/security/tomoyo/condition.c
index 986330b8c73e..63681e8be628 100644
--- a/security/tomoyo/condition.c
+++ b/security/tomoyo/condition.c
@@ -813,28 +813,28 @@ bool tomoyo_condition(struct tomoyo_request_info *r,
813 unsigned long value = 0; 813 unsigned long value = 0;
814 switch (index) { 814 switch (index) {
815 case TOMOYO_TASK_UID: 815 case TOMOYO_TASK_UID:
816 value = current_uid(); 816 value = from_kuid(&init_user_ns, current_uid());
817 break; 817 break;
818 case TOMOYO_TASK_EUID: 818 case TOMOYO_TASK_EUID:
819 value = current_euid(); 819 value = from_kuid(&init_user_ns, current_euid());
820 break; 820 break;
821 case TOMOYO_TASK_SUID: 821 case TOMOYO_TASK_SUID:
822 value = current_suid(); 822 value = from_kuid(&init_user_ns, current_suid());
823 break; 823 break;
824 case TOMOYO_TASK_FSUID: 824 case TOMOYO_TASK_FSUID:
825 value = current_fsuid(); 825 value = from_kuid(&init_user_ns, current_fsuid());
826 break; 826 break;
827 case TOMOYO_TASK_GID: 827 case TOMOYO_TASK_GID:
828 value = current_gid(); 828 value = from_kgid(&init_user_ns, current_gid());
829 break; 829 break;
830 case TOMOYO_TASK_EGID: 830 case TOMOYO_TASK_EGID:
831 value = current_egid(); 831 value = from_kgid(&init_user_ns, current_egid());
832 break; 832 break;
833 case TOMOYO_TASK_SGID: 833 case TOMOYO_TASK_SGID:
834 value = current_sgid(); 834 value = from_kgid(&init_user_ns, current_sgid());
835 break; 835 break;
836 case TOMOYO_TASK_FSGID: 836 case TOMOYO_TASK_FSGID:
837 value = current_fsgid(); 837 value = from_kgid(&init_user_ns, current_fsgid());
838 break; 838 break;
839 case TOMOYO_TASK_PID: 839 case TOMOYO_TASK_PID:
840 value = tomoyo_sys_getpid(); 840 value = tomoyo_sys_getpid();
@@ -970,13 +970,13 @@ bool tomoyo_condition(struct tomoyo_request_info *r,
970 case TOMOYO_PATH2_UID: 970 case TOMOYO_PATH2_UID:
971 case TOMOYO_PATH1_PARENT_UID: 971 case TOMOYO_PATH1_PARENT_UID:
972 case TOMOYO_PATH2_PARENT_UID: 972 case TOMOYO_PATH2_PARENT_UID:
973 value = stat->uid; 973 value = from_kuid(&init_user_ns, stat->uid);
974 break; 974 break;
975 case TOMOYO_PATH1_GID: 975 case TOMOYO_PATH1_GID:
976 case TOMOYO_PATH2_GID: 976 case TOMOYO_PATH2_GID:
977 case TOMOYO_PATH1_PARENT_GID: 977 case TOMOYO_PATH1_PARENT_GID:
978 case TOMOYO_PATH2_PARENT_GID: 978 case TOMOYO_PATH2_PARENT_GID:
979 value = stat->gid; 979 value = from_kgid(&init_user_ns, stat->gid);
980 break; 980 break;
981 case TOMOYO_PATH1_INO: 981 case TOMOYO_PATH1_INO:
982 case TOMOYO_PATH2_INO: 982 case TOMOYO_PATH2_INO: