Commit Graph

37 Commits

Author SHA1 Message Date
matt335672
d2a5fcdcd8 Update other auth modules to use new interface
The previous commit introduced a new interface for the auth modules.  This
commit simply updates the other auth modules to use the new interface.

The basic auth module is also updated so that if a user has a shadow
password entry indicated, but the shadow entry cannot be found, an error
is logged rather than silently succeeding.

The BSD authentication module is also updated to allow it to be
compiled on a Linux system for basic testing.
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
matt335672
fcd991844a sesman : Move global declarations to sesman.h 2022-03-03 17:01:55 +00:00
matt335672
8205559959 Fix regressions in auth modules 2020-12-29 09:48:01 +00:00
Alexandre Quesnel
0c61a15fc5 Migrating logging to LOG() and LOG_DEVEL() in sesman/* 2020-11-30 00:36:20 +00:00
Alexandre Quesnel
a9ec1ebd99 Unifying logging in chanserv
This commit adds:
* replace multiple logging macros with LOG and LOG_DEVEL
* logging configuration for chanserv
* logging configuration for console output
* logging configuration for per file or method log level filtering for
debug builds
* file, line, and method name in log message for debug builds
2020-10-19 05:10:47 +00:00
Pavel Roskin
6ed4c969f4 Eliminate APP_CC and DEFAULT_CC 2017-03-14 00:21:48 -07:00
Pavel Roskin
b2d3dcf169 Include config_ac.h from all source files 2017-03-04 00:52:34 -08:00
Pavel Roskin
e9a0324cb3 Fix compile warnings for non-default authentication methods
Include string.h for strcmp(). Don't define _XOPEN_SOURCE, it conflicts
with libc headers and hides putpwent(). Make input strings constant. Fix
functions to match their declarations.
2016-11-15 22:38:56 -08:00
Pavel Roskin
6fef1e4eb5 Use const pointers in function arguments when possible 2016-10-17 08:54:07 -07:00
mancha
d432609c2a
sesman: fix so shadow accounts aren't incorrectly classified "inactive"
as might happen if sp_max/sp_inact fields are empty or sp_lstchg=0.
2015-02-18 17:32:12 +00:00
Jay Sorg
cb4f299899 sesman: fix for --enable-nopam 2014-11-22 23:17:00 -08:00
Jay Sorg
851c762ee7 sesman: check for null from crypt() 2014-10-29 17:54:11 -07:00
Jay Sorg
c6fa03102f copyright year update 2013-06-08 10:51:53 -07:00
Guan-Zhong Huang
b518a3bfe9 Fix password authentication to handle different encryption algorithms 2013-03-09 13:55:21 +08:00
Guan-Zhong Huang
059deae6f3 Fix incorrect usage of log_message() 2013-03-09 13:55:21 +08:00
ArvidNorr
0770f217fa PAM error text can be configured 2013-01-28 15:31:51 +01: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
Jay Sorg
856783ba95 no logic changes, remove warnings and coding style changes 2012-06-10 23:47:08 -07:00
norrarvid
4d4ebbf363 Initial syslog support in XRDP 2012-05-27 17:17:39 +02:00
jsorg71
328649af9b g_thread_sck set outside of lock fix and g_cfg should always be a pointer to a struct 2009-09-28 01:16:07 +00:00
jsorg71
e2c4dbf1af don't mark never expired accounts as disabled - patch from Christoph Brill 2009-07-23 19:59:01 +00:00
ilsimo
d14b076a70 still more work on logging
libscp makefile fix
2008-07-30 10:58:30 +00:00
ilsimo
4c9d3862e5 updating logging subsystem 2008-02-20 22:02:24 +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
078b4d3f41 adding scp v1 first code, fixed passwd auth for disabled password 2006-11-24 20:46:45 +00:00
jsorg71
e9400d44e9 include stdio.h for newer gcc 2006-05-31 17:47:43 +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
721ca9efae adding some access control features 2005-12-15 20:41:03 +00:00
jsorg71
c3ff1bcebb changed pam session and env 2005-08-14 02:22:11 +00:00
jsorg71
6468e760d2 added pam session 2005-07-19 02:22:33 +00:00
jsorg71
ef1be2c6d3 pam changes 2005-07-07 03:08:03 +00:00
jsorg71
74a67d2d3f added non pam authentication 2005-06-04 23:51:51 +00:00