Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
+ along with systemd; If not, see <https://www.gnu.org/licenses/>.
***/
#include <inttypes.h>
* hierarchy. */
int sd_pid_get_cgroup(pid_t pid, char **cgroup);
+/* Equivalent to the corresponding sd_pid_get* functions, but take a
+ * PIDFD instead of a PID, to ensure there can be no possible PID
+ * recycle issues before/after the calls. */
+int sd_pidfd_get_session(pid_t pid, char **session);
+int sd_pidfd_get_owner_uid(pid_t pid, uid_t *uid);
+int sd_pidfd_get_unit(pid_t pid, char **unit);
+int sd_pidfd_get_user_unit(pid_t pid, char **unit);
+int sd_pidfd_get_slice(pid_t pid, char **slice);
+int sd_pidfd_get_user_slice(pid_t pid, char **slice);
+int sd_pidfd_get_machine_name(pid_t pid, char **machine);
+int sd_pidfd_get_cgroup(pid_t pid, char **cgroup);
+
/* Similar to sd_pid_get_session(), but retrieves data about the peer
* of a connected AF_UNIX socket */
int sd_peer_get_session(int fd, char **session);
/* Determine user ID of session */
int sd_session_get_uid(const char *session, uid_t *uid);
+/* Determine username of session */
+int sd_session_get_username(const char *session, char **username);
+
/* Determine seat of session */
int sd_session_get_seat(const char *session, char **seat);
+/* Determine the start time of session */
+int sd_session_get_start_time(const char *session, uint64_t *usec);
+
/* Determine the (PAM) service name this session was registered by. */
int sd_session_get_service(const char *session, char **service);