SystemUser Linuximpl

Implements SystemUser.

Summary
SystemUser LinuximplImplements SystemUser.
CopyrightThis program is free software.
Files
C-kern/api/platform/sysuser.hHeader file SystemUser.
C-kern/platform/Linux/sysuser.cImplementation file SystemUser Linuximpl.
sysuser_id_t
query
sysuser_t
static configuration
sysuser_SYS_SERVICE_NAMEThe name of service used during authentication.
sysuser_UNITTEST_USERNAMEUsed in unittest_platform_sysuser to test <switchtoprivilege_sysuser>.
sysuser_UNITTEST_PASSWORDUsed in unittest_platform_sysuser to test <switchtoprivilege_sysuser>.
lifetime
query
switch
set
authentication
pamerr2errno_sysuserConverts error codes from pam lib to errno error codes.
authenticatecallback_sysuserFunction called back from PAM library during authentication of user.
sysuser_info_t
test

Copyright

This program is free software.  You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

Author

© 2012 Jörg Seebohn

Files

C-kern/api/platform/sysuser.h

Header file SystemUser.

C-kern/platform/Linux/sysuser.c

Implementation file SystemUser Linuximpl.

sysuser_id_t

Summary

query

sysuser_t

Summary
static configuration
sysuser_SYS_SERVICE_NAMEThe name of service used during authentication.
sysuser_UNITTEST_USERNAMEUsed in unittest_platform_sysuser to test <switchtoprivilege_sysuser>.
sysuser_UNITTEST_PASSWORDUsed in unittest_platform_sysuser to test <switchtoprivilege_sysuser>.
lifetime
query
switch
set
authentication
pamerr2errno_sysuserConverts error codes from pam lib to errno error codes.
authenticatecallback_sysuserFunction called back from PAM library during authentication of user.

static configuration

sysuser_SYS_SERVICE_NAME

#define sysuser_SYS_SERVICE_NAME "passwd"

The name of service used during authentication.  The module registers itself to the underlying authentication service provider with this name.  The current value uses the same name as the “passwd” service.  This value can be overwritten in C-kern/resource/config/modulevalues.

sysuser_UNITTEST_USERNAME

#define sysuser_UNITTEST_USERNAME "guest"

Used in unittest_platform_sysuser to test <switchtoprivilege_sysuser>.  This value can be overwritten in C-k ern/resource/config/modulevalues.

sysuser_UNITTEST_PASSWORD

#define sysuser_UNITTEST_PASSWORD "GUEST"

Used in unittest_platform_sysuser to test <switchtoprivilege_sysuser>.  This value can be overwritten in C-kern/resource/config/modulevalues.

lifetime

query

switch

set

authentication

pamerr2errno_sysuser

static int pamerr2errno_sysuser(int pamerr)

Converts error codes from pam lib to errno error codes.

authenticatecallback_sysuser

static int authenticatecallback_sysuser(int num_msg,
const struct pam_message **msg,
struct pam_response **resp,
void *appdata_ptr)

Function called back from PAM library during authentication of user.  The single argument which is delivered back is the password.

sysuser_info_t

test

Offers interface for accessing current system user and authentication of users.
Implements SystemUser.
#define sysuser_SYS_SERVICE_NAME "passwd"
The name of service used during authentication.
#define sysuser_UNITTEST_USERNAME "guest"
Used in unittest_platform_sysuser to test switchtoprivilege_sysuser.
int unittest_platform_sysuser(void)
Test sysuser_t functionality.
#define sysuser_UNITTEST_PASSWORD "GUEST"
Used in unittest_platform_sysuser to test switchtoprivilege_sysuser.
static int pamerr2errno_sysuser(int pamerr)
Converts error codes from pam lib to errno error codes.
static int authenticatecallback_sysuser(int num_msg,
const struct pam_message **msg,
struct pam_response **resp,
void *appdata_ptr)
Function called back from PAM library during authentication of user.
Close