0

On an Ubuntu Linux 20.04, cat /proc/$$/sessionid shows 3, and on an openSUSE 15.5, it shows 2.

The 3 or 2 definitely has different meaning that the session ID value (SID) from getsid(0), then what does it mean?

Ubuntu screenshot

openSUSE screenshot

Jimm Chen
  • 115
  • 5

1 Answers1

2

https://www.kernel.org/doc/Documentation/ABI/stable/procfs-audit_loginuid

What:       Audit Login Session ID
Date:       2008-03-13
KernelVersion:  2.6.25-rc7 1e0bd7550ea9 ("[PATCH] export sessionid alongside the loginuid in procfs")
Contact:    linux-audit@redhat.com
Users:      audit and login applications
Description:
        The /proc/$pid/sessionid pseudofile is read to get the
        audit login session ID of process $pid as a decimal
        unsigned int (%u, u32).  It is set automatically,
        serially assigned with each new login.