Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143018267
D47601.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
829 B
Referenced Files
None
Subscribers
None
D47601.diff
View Options
diff --git a/sys/security/mac_do/mac_do.c b/sys/security/mac_do/mac_do.c
--- a/sys/security/mac_do/mac_do.c
+++ b/sys/security/mac_do/mac_do.c
@@ -310,11 +310,12 @@
sysctl_rules(SYSCTL_HANDLER_ARGS)
{
char *const buf = malloc(MAC_RULE_STRING_LEN, M_DO, M_WAITOK);
+ struct prison *const td_pr = req->td->td_ucred->cr_prison;
struct prison *pr;
struct rules *rules;
int error;
- rules = find_rules(req->td->td_ucred->cr_prison, &pr);
+ rules = find_rules(td_pr, &pr);
strlcpy(buf, rules->string, MAC_RULE_STRING_LEN);
prison_unlock(pr);
@@ -322,7 +323,8 @@
if (error != 0 || req->newptr == NULL)
goto out;
- error = parse_and_set_rules(pr, buf);
+ /* Set our prison's rules, not that of the jail we inherited from. */
+ error = parse_and_set_rules(td_pr, buf);
out:
free(buf, M_DO);
return (error);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 26, 7:29 AM (15 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28011564
Default Alt Text
D47601.diff (829 B)
Attached To
Mode
D47601: MAC/do: sysctl_rules(): Set the requesting's thread's jail's rules
Attached
Detach File
Event Timeline
Log In to Comment