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
f944f959
Commit
f944f959
authored
Sep 30, 2003
by
Ulrich Drepper
Committed by
Stephen Hemminger
Sep 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NET]: Use task->tgid instead of task->pid in SCM credentials code.
parent
579d5c49
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
include/net/scm.h
include/net/scm.h
+1
-1
net/unix/af_unix.c
net/unix/af_unix.c
+3
-3
No files found.
include/net/scm.h
View file @
f944f959
...
...
@@ -39,7 +39,7 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg,
memset
(
scm
,
0
,
sizeof
(
*
scm
));
scm
->
creds
.
uid
=
current
->
uid
;
scm
->
creds
.
gid
=
current
->
gid
;
scm
->
creds
.
pid
=
current
->
p
id
;
scm
->
creds
.
pid
=
current
->
tg
id
;
if
(
msg
->
msg_controllen
<=
0
)
return
0
;
return
__scm_send
(
sock
,
msg
,
scm
);
...
...
net/unix/af_unix.c
View file @
f944f959
...
...
@@ -448,7 +448,7 @@ static int unix_listen(struct socket *sock, int backlog)
sk
->
sk_max_ack_backlog
=
backlog
;
sk
->
sk_state
=
TCP_LISTEN
;
/* set credentials so connect can copy them */
sk
->
sk_peercred
.
pid
=
current
->
p
id
;
sk
->
sk_peercred
.
pid
=
current
->
tg
id
;
sk
->
sk_peercred
.
uid
=
current
->
euid
;
sk
->
sk_peercred
.
gid
=
current
->
egid
;
err
=
0
;
...
...
@@ -983,7 +983,7 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
unix_peer
(
newsk
)
=
sk
;
newsk
->
sk_state
=
TCP_ESTABLISHED
;
newsk
->
sk_type
=
SOCK_STREAM
;
newsk
->
sk_peercred
.
pid
=
current
->
p
id
;
newsk
->
sk_peercred
.
pid
=
current
->
tg
id
;
newsk
->
sk_peercred
.
uid
=
current
->
euid
;
newsk
->
sk_peercred
.
gid
=
current
->
egid
;
newu
=
unix_sk
(
newsk
);
...
...
@@ -1045,7 +1045,7 @@ static int unix_socketpair(struct socket *socka, struct socket *sockb)
sock_hold
(
skb
);
unix_peer
(
ska
)
=
skb
;
unix_peer
(
skb
)
=
ska
;
ska
->
sk_peercred
.
pid
=
skb
->
sk_peercred
.
pid
=
current
->
p
id
;
ska
->
sk_peercred
.
pid
=
skb
->
sk_peercred
.
pid
=
current
->
tg
id
;
ska
->
sk_peercred
.
uid
=
skb
->
sk_peercred
.
uid
=
current
->
euid
;
ska
->
sk_peercred
.
gid
=
skb
->
sk_peercred
.
gid
=
current
->
egid
;
...
...
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