Changeset View
Changeset View
Standalone View
Standalone View
lib/libcasper/services/cap_pwd/cap_pwd.h
Show All 30 Lines | |||||
#ifndef _CAP_PWD_H_ | #ifndef _CAP_PWD_H_ | ||||
#define _CAP_PWD_H_ | #define _CAP_PWD_H_ | ||||
#ifdef HAVE_CASPER | #ifdef HAVE_CASPER | ||||
#define WITH_CASPER | #define WITH_CASPER | ||||
#endif | #endif | ||||
#include <sys/cdefs.h> | |||||
#ifdef WITH_CASPER | #ifdef WITH_CASPER | ||||
__BEGIN_DECLS | |||||
struct passwd *cap_getpwent(cap_channel_t *chan); | struct passwd *cap_getpwent(cap_channel_t *chan); | ||||
struct passwd *cap_getpwnam(cap_channel_t *chan, const char *login); | struct passwd *cap_getpwnam(cap_channel_t *chan, const char *login); | ||||
struct passwd *cap_getpwuid(cap_channel_t *chan, uid_t uid); | struct passwd *cap_getpwuid(cap_channel_t *chan, uid_t uid); | ||||
int cap_getpwent_r(cap_channel_t *chan, struct passwd *pwd, char *buffer, | int cap_getpwent_r(cap_channel_t *chan, struct passwd *pwd, char *buffer, | ||||
size_t bufsize, struct passwd **result); | size_t bufsize, struct passwd **result); | ||||
int cap_getpwnam_r(cap_channel_t *chan, const char *name, struct passwd *pwd, | int cap_getpwnam_r(cap_channel_t *chan, const char *name, struct passwd *pwd, | ||||
char *buffer, size_t bufsize, struct passwd **result); | char *buffer, size_t bufsize, struct passwd **result); | ||||
int cap_getpwuid_r(cap_channel_t *chan, uid_t uid, struct passwd *pwd, | int cap_getpwuid_r(cap_channel_t *chan, uid_t uid, struct passwd *pwd, | ||||
char *buffer, size_t bufsize, struct passwd **result); | char *buffer, size_t bufsize, struct passwd **result); | ||||
int cap_setpassent(cap_channel_t *chan, int stayopen); | int cap_setpassent(cap_channel_t *chan, int stayopen); | ||||
void cap_setpwent(cap_channel_t *chan); | void cap_setpwent(cap_channel_t *chan); | ||||
void cap_endpwent(cap_channel_t *chan); | void cap_endpwent(cap_channel_t *chan); | ||||
int cap_pwd_limit_cmds(cap_channel_t *chan, const char * const *cmds, | int cap_pwd_limit_cmds(cap_channel_t *chan, const char * const *cmds, | ||||
size_t ncmds); | size_t ncmds); | ||||
int cap_pwd_limit_fields(cap_channel_t *chan, const char * const *fields, | int cap_pwd_limit_fields(cap_channel_t *chan, const char * const *fields, | ||||
size_t nfields); | size_t nfields); | ||||
int cap_pwd_limit_users(cap_channel_t *chan, const char * const *names, | int cap_pwd_limit_users(cap_channel_t *chan, const char * const *names, | ||||
size_t nnames, uid_t *uids, size_t nuids); | size_t nnames, uid_t *uids, size_t nuids); | ||||
__END_DECLS | |||||
#else | #else | ||||
#define cap_getpwent(chan) getpwent() | #define cap_getpwent(chan) getpwent() | ||||
#define cap_getpwnam(chan, login) getpwnam(login) | #define cap_getpwnam(chan, login) getpwnam(login) | ||||
#define cap_getpwuid(chan, uid) getpwuid(uid) | #define cap_getpwuid(chan, uid) getpwuid(uid) | ||||
#define cap_getpwent_r(chan, pwd, buffer, bufsize, result) \ | #define cap_getpwent_r(chan, pwd, buffer, bufsize, result) \ | ||||
getpwent_r(pwd, buffer, bufsize, result) | getpwent_r(pwd, buffer, bufsize, result) | ||||
#define cap_getpwnam_r(chan, name, pwd, buffer, bufsize, result) \ | #define cap_getpwnam_r(chan, name, pwd, buffer, bufsize, result) \ | ||||
Show All 14 Lines |