Skip to content

Linux users() hostname returning username instead. #1169

Closed
@janderbrain

Description

Line 482 in psutil/_psutil_linux.c

diff --git a/psutil/_psutil_linux.c b/psutil/_psutil_linux.c
index a15ebe5..85302ef 100644
--- a/psutil/_psutil_linux.c
+++ b/psutil/_psutil_linux.c
@@ -479,7 +479,7 @@ psutil_users(PyObject *self, PyObject *args) {
             "(OOOfOi)",
             py_username,              // username
             py_tty,                   // tty
-            py_username,              // hostname
+            py_hostname,              // hostname
             (float)ut->ut_tv.tv_sec,  // tstamp
             py_user_proc,             // (bool) user process
             ut->ut_pid                // process id

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions