chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba477d7
)
stat-util: fix fd_is_network_ns()
author
Lennart Poettering
<lennart@poettering.net>
Fri, 23 Mar 2018 08:47:04 +0000
(09:47 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Thu, 28 Jun 2018 07:24:07 +0000
(09:24 +0200)
This was broken in
77f9fa3b8ea46c27e5a5e9270f71bf1b4000c3e0
. My fault.
Fixes: #8543
(cherry picked from commit
29f74559d4dc6ea41232233d32f1a92bcee43626
)
src/basic/stat-util.c
patch
|
blob
|
history
diff --git
a/src/basic/stat-util.c
b/src/basic/stat-util.c
index 313ed4f2c84769f2175590ab5950eec42e038ea5..7033685284c69f538dc7ddb576b036739fe422e8 100644
(file)
--- a/
src/basic/stat-util.c
+++ b/
src/basic/stat-util.c
@@
-265,7
+265,8
@@
int fd_is_network_ns(int fd) {
if (r <= 0)
return r;
- if (ioctl(fd, NS_GET_NSTYPE) < 0)
+ r = ioctl(fd, NS_GET_NSTYPE);
+ if (r < 0)
return -errno;
return r == CLONE_NEWNET;