Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4c1cf062
Commit
4c1cf062
authored
Jan 20, 2005
by
Pablo Neira
Committed by
David S. Miller
Jan 20, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETLINK]: Move nl_nonroot into netlink_table.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
cce81e80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
net/netlink/af_netlink.c
net/netlink/af_netlink.c
+3
-3
No files found.
net/netlink/af_netlink.c
View file @
4c1cf062
...
...
@@ -91,12 +91,12 @@ struct nl_pid_hash {
struct
netlink_table
{
struct
nl_pid_hash
hash
;
struct
hlist_head
mc_list
;
unsigned
int
nl_nonroot
;
};
static
struct
netlink_table
*
nl_table
;
static
DECLARE_WAIT_QUEUE_HEAD
(
nl_table_wait
);
static
unsigned
int
nl_nonroot
[
MAX_LINKS
];
static
int
netlink_dump
(
struct
sock
*
sk
);
static
void
netlink_destroy_callback
(
struct
netlink_callback
*
cb
);
...
...
@@ -438,7 +438,7 @@ static int netlink_autobind(struct socket *sock)
static
inline
int
netlink_capable
(
struct
socket
*
sock
,
unsigned
int
flag
)
{
return
(
nl_
nonroot
[
sock
->
sk
->
sk_protocol
]
&
flag
)
||
return
(
nl_
table
[
sock
->
sk
->
sk_protocol
].
nl_nonroot
&
flag
)
||
capable
(
CAP_NET_ADMIN
);
}
...
...
@@ -1066,7 +1066,7 @@ netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len))
void
netlink_set_nonroot
(
int
protocol
,
unsigned
int
flags
)
{
if
((
unsigned
int
)
protocol
<
MAX_LINKS
)
nl_
nonroot
[
protocol
]
=
flags
;
nl_
table
[
protocol
].
nl_nonroot
=
flags
;
}
static
void
netlink_destroy_callback
(
struct
netlink_callback
*
cb
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment