1141 |
It seems that correct method to use is in_atomic() |
It seems that correct method to use is in_atomic() |
1142 |
rather than in_interrupt() because in_atomic() returns nonzero |
rather than in_interrupt() because in_atomic() returns nonzero |
1143 |
whenever scheduling is not allowed. |
whenever scheduling is not allowed. |
1144 |
|
|
1145 |
|
Fix 2008/01/24 |
1146 |
|
|
1147 |
|
@ Support /proc/ccs/ access by non-root user. |
1148 |
|
|
1149 |
|
Until now, only root user can access /proc/ccs/ interface. |
1150 |
|
But to permit /proc/ccs/ access by non-root user so that |
1151 |
|
it won't require ssh login by root user when administrating |
1152 |
|
from remote host, I eased restrictions on this interface. |
1153 |
|
|
1154 |
|
(current->uid == 0 && current->euid == 0) || |
1155 |
|
(current->uid != 0 && current->uid == inode->i_uid) || |
1156 |
|
(current->gid != 0 && current->gid == inode->i_gid) |
1157 |
|
|
1158 |
|
The inode's uid and gid are set using chown/chgrp commands. |
1159 |
|
|
1160 |
|
Fix 2008/02/05 |
1161 |
|
|
1162 |
|
@ Use find_task_by_vpid() instead of find_task_pid(). |
1163 |
|
|
1164 |
|
Kernel 2.6.24 introduced PID namespace. |
1165 |
|
To search PID given from userland, the kernel needs to use |
1166 |
|
find_task_by_vpid() instead of find_task_pid(). |
1167 |
|
|
1168 |
|
Fix 2008/02/14 |
1169 |
|
|
1170 |
|
@ Add execve() parameter checking. |
1171 |
|
|
1172 |
|
Until now, it was impossible to check argv[] and envp[] parameters |
1173 |
|
passed to execve(). |
1174 |
|
I expanded conditional permission syntax so that |
1175 |
|
{ argc, envc, argv[] , envp[] } parameters can be checked if needed. |
1176 |
|
This will allow administrator permit execution of /bin/sh only when |
1177 |
|
/bin/sh is invoked in the form of "/bin/sh -c" and environment variable |
1178 |
|
HOME is set by specifying |
1179 |
|
|
1180 |
|
allow_execute /bin/sh if exec.argv[1]="-c" exec.envp["HOME"]!=NULL |
1181 |
|
|
1182 |
|
in the policy. |
1183 |
|
This extension will make exploit codes difficult to start /bin/sh because |
1184 |
|
they unlikely set up environment variables and unlikely specify "-c" |
1185 |
|
option when invoking /bin/sh , whereas proper functions likely set up |
1186 |
|
environment variables and likely specify "-c" option. |
1187 |
|
|
1188 |
|
Fix 2008/02/18 |
1189 |
|
|
1190 |
|
@ Add process state checking. |
1191 |
|
|
1192 |
|
Until now, it was impossible to change ACL without executing program. |
1193 |
|
I added three variables for performing stateful checking within a domain. |
1194 |
|
You can set current process's state like: |
1195 |
|
|
1196 |
|
allow_network TCP accept @TRUSTED_HOSTS 1024-65535 ; set task.state[0]=1 |
1197 |
|
allow_network TCP accept @UNTRUSTED_HOSTS 1024-65535 ; set task.state[0]=0 |
1198 |
|
|
1199 |
|
and you can use the state like |
1200 |
|
|
1201 |
|
allow_read /path/to/important/file if task.state[0]=1 |
1202 |
|
|
1203 |
|
in the policy. |
1204 |
|
The state changes when the request was granted by the MAC's policy, |
1205 |
|
so please be careful with situations where the state has changed successfully |
1206 |
|
but the request was not processed because of other reasons (e.g. out of memory). |