diff options
author | Thomas Haller <thaller@redhat.com> | 2023-04-03 19:24:05 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-04-04 08:43:20 +0200 |
commit | 20bd6b68036b9696d39c96cb0c1600c42d8d4255 (patch) | |
tree | 4d606776ed5c05ce1b09cab0eb42c8033ae73e7b | |
parent | 62a85fa84560dc296796c3a63f698f8c15794b99 (diff) |
core: fix setting non-blocking FD in nm_utils_spawn_helper()
Fixes: df1d214b2ea7 ('clients: polkit-agent: implement polkit agent without using libpolkit')
-rw-r--r-- | src/libnmc-base/nm-polkit-listener.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnmc-base/nm-polkit-listener.c b/src/libnmc-base/nm-polkit-listener.c index e7972faa48..fbc2c7046d 100644 --- a/src/libnmc-base/nm-polkit-listener.c +++ b/src/libnmc-base/nm-polkit-listener.c @@ -534,10 +534,10 @@ begin_authentication(AuthRequest *request) return; } - fd_flags = fcntl(request->child_stdin, F_GETFD, 0); + fd_flags = fcntl(request->child_stdin, F_GETFL, 0); fcntl(request->child_stdin, F_SETFL, fd_flags | O_NONBLOCK); - fd_flags = fcntl(request->child_stdout, F_GETFD, 0); + fd_flags = fcntl(request->child_stdout, F_GETFL, 0); fcntl(request->child_stdout, F_SETFL, fd_flags | O_NONBLOCK); request->child_stdout_watch_source = nm_g_unix_fd_source_new(request->child_stdout, |