projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
O_CLOEXEC for SCM_RIGHTS
[linux-2.6-block.git]
/
net
/
core
/
scm.c
diff --git
a/net/core/scm.c
b/net/core/scm.c
index 292ad8d5ad76262c46fc33248376cd0401658722..44c4ec2c8769b1a922d69a6f0e5882bc6f58f001 100644
(file)
--- a/
net/core/scm.c
+++ b/
net/core/scm.c
@@
-228,7
+228,8
@@
void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm)
err = security_file_receive(fp[i]);
if (err)
break;
- err = get_unused_fd();
+ err = get_unused_fd_flags(MSG_CMSG_CLOEXEC & msg->msg_flags
+ ? O_CLOEXEC : 0);
if (err < 0)
break;
new_fd = err;