Commit Graph

16 Commits

Author SHA1 Message Date
matt335672 2a3cec4125 Update PAM auth module for UDS logins
An extra method auth_uds() is added to the PAM module to
allow a 'struct auth_info' to be created for a UDS login. The PAM stack
is used to check the UDS user can be authorized.

Also, an error code is returned from the auth module rather than a
simple boolean. This allows a more complete status to be communicated
to the user. See https://github.com/neutrinolabs/xrdp/discussions/1921
and also #909 and #642
2022-12-22 11:35:02 +00:00
matt335672 660ac303f0 Replace various types used for auth_info
The loadable sesman authentication modules use different types for the
authentication handle returned from auth_userpass(). The PAM module
uses a pointer, and the other modules use (effectively) a boolean. Within
sesman itself, a long or tbus (intptr_t) is used.

This PR replaces all of these types with a pointer to an incomplete type.

Consequently:-
- A single better-labelled type is used it all places within sesman so
  it's more obvious what's being handled.
- There is no need to cast the authentication handle within the PAM
  module to a long and back again.
- The compiler can check function signatures between auth.h and the
  various verify modules.
2022-09-16 10:46:53 +01:00
matt335672 a4c6c36cf2 Add PAM_RHOST support
Supplies the IP address that an authentication event is
received from as the PAM parameter PAM_RHOST for PAM-capable systems.
2022-05-18 12:35:07 +01:00
Pavel Roskin 6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 2017-03-14 00:21:48 -07:00
Pavel Roskin 6fef1e4eb5 Use const pointers in function arguments when possible 2016-10-17 08:54:07 -07:00
Pavel Roskin bf08892622 Fix incorrect description of auth_userpass() return value 2016-10-17 08:54:07 -07:00
Jay Sorg 538763e144 sesman: Fedora bug 821569 2013-10-01 10:42:00 -07:00
ArvidNorr a2bbbd8cc3 Display PAM error in gateway setup, use domain name as IP/DNS, changed how the socket is closed 2013-01-16 01:28:35 -08:00
Laxmikant Rashinkar 1123323fda o moved from GNU General Public License to Apache License, Version 2.0
o applied new coding standards to all .c files
o moved some files around
2012-09-19 20:51:34 -07:00
jsorg71 7e36a89921 update copyright year 2010-07-26 03:48:58 +00:00
jsorg71 cd57d1b689 update copyright year 2008-01-30 07:53:57 +00:00
ilsimo 9c4b9f8390 added sessvc as session supervisor
first code for password changing
2007-04-07 16:20:08 +00:00
jsorg71 6886ba4556 copyright year update 2007-01-12 05:07:07 +00:00
ilsimo 013ab3c61f updated code documentation 2006-05-25 20:34:32 +00:00
jsorg71 b1b3ff9e7d year update and moved some stuff to os_calls.c 2006-04-23 21:54:12 +00:00
ilsimo c2fda67a1c Adding auth.h env.c env.h session.c session.h tcp.c tcp.h 2005-10-06 19:27:38 +00:00