Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161243100
D54109.id167713.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
844 B
Referenced Files
None
Subscribers
None
D54109.id167713.diff
View Options
diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c
--- a/sys/netlink/route/iface.c
+++ b/sys/netlink/route/iface.c
@@ -671,6 +671,8 @@
rtnl_handle_newlink(struct nlmsghdr *hdr, struct nlpcb *nlp, struct nl_pstate *npt)
{
struct nlattr_bmask bm;
+ struct thread *td = curthread;
+ struct ucred *cred;
int error;
struct nl_parsed_link attrs = {};
@@ -679,10 +681,15 @@
return (error);
nl_get_attrs_bmask_nlmsg(hdr, &ifmsg_parser, &bm);
+ cred = td->td_ucred;
+ td->td_ucred = nlp_get_cred(nlp);
if (hdr->nlmsg_flags & NLM_F_CREATE)
- return (create_link(hdr, &attrs, &bm, nlp, npt));
+ error = create_link(hdr, &attrs, &bm, nlp, npt);
else
- return (modify_link(hdr, &attrs, &bm, nlp, npt));
+ error = modify_link(hdr, &attrs, &bm, nlp, npt);
+ td->td_ucred = cred;
+
+ return (error);
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 3, 1:46 AM (39 m, 8 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34608624
Default Alt Text
D54109.id167713.diff (844 B)
Attached To
Mode
D54109: netlink: use same cred as caller's cred similar to ifioctl
Attached
Detach File
Event Timeline
Log In to Comment