diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2001-12-09 22:15:11 +0000 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2001-12-09 22:15:11 +0000 |
commit | da67a7d6126846939fd43b1ddb5aa8c06ee09301 (patch) | |
tree | e9df9e69023b0e8584ee85cd8a44daf210bee75d /modules/pammodutil/include | |
parent | cb7734d4080f3673a34594ee4c6e7b02dcd89f33 (diff) | |
download | pam-da67a7d6126846939fd43b1ddb5aa8c06ee09301.tar.gz pam-da67a7d6126846939fd43b1ddb5aa8c06ee09301.tar.bz2 pam-da67a7d6126846939fd43b1ddb5aa8c06ee09301.zip |
Relevant BUGIDs: 490938
Purpose of commit: new feature
Commit summary:
---------------
Added libpammodutil and link it with every module as its built.
The issue here is that there is a lot of code that the various modules
use in common, and this staic library can be used to help make this code
more maintainable. I do not intend to make this library dynamic. Especially
right now, as I want to be free to chop and change the API and don't want
to deal with revision control and third party modules.
This checkin makes the pam_rhost_auth module make some use of this new
library. I don't intend to add support for any other module prior to
releasing 0.76.
Diffstat (limited to 'modules/pammodutil/include')
-rw-r--r-- | modules/pammodutil/include/security/_pam_modutil.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/modules/pammodutil/include/security/_pam_modutil.h b/modules/pammodutil/include/security/_pam_modutil.h new file mode 100644 index 00000000..af8a7ae1 --- /dev/null +++ b/modules/pammodutil/include/security/_pam_modutil.h @@ -0,0 +1,33 @@ +#ifndef _PAM_MODUTIL_H +#define _PAM_MODUTIL_H + +/* + * $Id$ + * + * This file is a list of handy libc wrappers that attempt to provide some + * thread-safe and other convenient functionality to modules in a form that + * is common, but not dynamically linked with yet another dynamic pam + * library extension. + * + * A number of these functions reserve space in a pam_[sg]et_data item. + * In all cases, the name of the item is prefixed with "_pammodutil_*". + * + * On systems that simply can't support thread safe programming, these + * functions don't support it either - sorry. + * + * Copyright (c) 2001 Andrew Morgan <morgan@kernel.org> + */ + +#include <pwd.h> +#include <sys/types.h> + +extern struct passwd *_pammodutil_getpwnam(pam_handle_t *pamh, + const char *user); + +extern struct passwd *_pammodutil_getpwuid(pam_handle_t *pamh, + uid_t uid); + +extern void _pammodutil_cleanup(pam_handle_t *pamh, void *data, + int error_status); + +#endif /* _PAM_MODUTIL_H */ |