History

Fix prlimit64 for suid/sgid processes

Since check_prlimit_permission always fails in the case of SUID/GUID processes, such processes are not able to read or set their own limits. This commit changes this by assuming that process can always read/change its own limits.

Kacper Kornet committed 15 years ago

Commit aa5bd671 parent 2f215a71 file · +2 −1Browse files

Unified · Split

kernel/sys.c+2−1
@@ -1385,7 +1385,8 @@ static int check_prlimit_permission(struct task_struct *task) · 1384 unmodified lines
1385 const struct cred *cred = current_cred(), *tcred;1385 const struct cred *cred = current_cred(), *tcred;
1386 1386
1387 tcred = __task_cred(task);1387 tcred = __task_cred(task);
1388 if ((cred->uid != tcred->euid ||1388 if (current != task &&
1389 (cred->uid != tcred->euid ||
1389 cred->uid != tcred->suid ||1390 cred->uid != tcred->suid ||
1390 cred->uid != tcred->uid ||1391 cred->uid != tcred->uid ||
1391 cred->gid != tcred->egid ||1392 cred->gid != tcred->egid ||

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t