Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142733444
D54109.id170234.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
903 B
Referenced Files
None
Subscribers
None
D54109.id170234.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,16 @@
return (error);
nl_get_attrs_bmask_nlmsg(hdr, &ifmsg_parser, &bm);
+ /* XXX: temporary patch until the D39180 review lands */
+ 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, Jan 23, 8:51 PM (17 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27886857
Default Alt Text
D54109.id170234.diff (903 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