2017-09-21 10:01:20 +03:00
|
|
|
/**
|
|
|
|
* xrdp: A Remote Desktop Protocol server.
|
|
|
|
*
|
|
|
|
* Copyright (C) Emmanuel Blindauer 2017
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
2017-09-26 22:06:44 +03:00
|
|
|
* @file sessionrecord.h
|
2023-06-29 19:06:28 +03:00
|
|
|
* @brief utmp handling code
|
2017-09-21 10:01:20 +03:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2017-09-26 22:06:44 +03:00
|
|
|
#ifndef SESSIONRECORD_H
|
|
|
|
#define SESSIONRECORD_H
|
|
|
|
|
2023-06-29 19:06:28 +03:00
|
|
|
struct login_info;
|
2023-06-29 19:27:06 +03:00
|
|
|
struct proc_exit_status;
|
2017-11-12 19:18:15 +03:00
|
|
|
|
2017-09-21 10:01:20 +03:00
|
|
|
/**
|
2023-06-29 19:06:28 +03:00
|
|
|
* @brief Record login in utmp
|
2017-09-21 10:01:20 +03:00
|
|
|
*
|
2023-06-29 19:06:28 +03:00
|
|
|
* @param pid PID of window manager
|
|
|
|
* @param display Display number
|
|
|
|
* @param login_info Information about logged in user
|
2017-09-21 10:01:20 +03:00
|
|
|
*/
|
2023-06-29 19:27:06 +03:00
|
|
|
void
|
|
|
|
utmp_login(int pid, int display, const struct login_info *login_info);
|
2017-09-21 10:01:20 +03:00
|
|
|
|
2023-06-29 19:06:28 +03:00
|
|
|
/**
|
|
|
|
* @brief Record logout in utmp
|
|
|
|
*
|
|
|
|
* @param pid PID of window manager
|
|
|
|
* @param display Display number
|
2023-06-29 19:27:06 +03:00
|
|
|
* @param exit_status Exit status of process
|
2023-06-29 19:06:28 +03:00
|
|
|
*/
|
2023-06-29 19:27:06 +03:00
|
|
|
void
|
|
|
|
utmp_logout(int pid, int display, const struct proc_exit_status *exit_status);
|
2017-09-21 10:01:20 +03:00
|
|
|
|
|
|
|
#endif
|