netatalk: uam_auth.h Source File

netatalk 4.5.1
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
papd/uam_auth.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
3 * All Rights Reserved. See COPYRIGHT.
4 */
5
10
11#ifndef PAPD_UAM_AUTH_H
12#define PAPD_UAM_AUTH_H 1
13
14#include <sys/types.h>
15#include <pwd.h>
16
17#include <atalk/uam.h>
18
19#include "file.h"
20
21struct uam_mod {
22 void *uam_module;
23 struct uam_export *uam_fcn;
24 struct uam_mod *uam_prev, *uam_next;
25};
26
27struct uam_obj {
28 const char *uam_name;
29 char *uam_path;
30 int uam_count;
31 union {
32 struct {
33 int (*login)(void *, struct passwd **,
34 char *, int, char *, int *);
35 int (*logincont)(void *, struct passwd **, char *,
36 int, char *, int *);
37 void (*logout)(void);
38 } uam_login;
39 int (*uam_changepw)(void *, char *, struct passwd *, char *,
40 int, char *, int *);
41 int (*uam_printer)(char *, char *, char *, struct papfile *);
42 } u;
43 struct uam_obj *uam_prev, *uam_next;
44};
45
46#define uam_attach(a, b) do { \
47 (a)->uam_prev->uam_next = (b); \
48 (b)->uam_prev = (a)->uam_prev; \
49 (b)->uam_next = (a); \
50 (a)->uam_prev = (b); \
51} while (0)
52
53#define uam_detach(a) do { \
54 (a)->uam_prev->uam_next = (a)->uam_next; \
55 (a)->uam_next->uam_prev = (a)->uam_prev; \
56} while (0)
57
58#define UAM_LIST(type) (((type) == UAM_SERVER_LOGIN) ? &uam_login : \
59 (((type) == UAM_SERVER_CHANGEPW) ? &uam_changepw : \
60 (((type) == UAM_SERVER_PRINTAUTH) ? &uam_printer : NULL)))
61
62
63extern struct uam_mod *uam_load(const char *, const char *);
64extern void uam_unload(struct uam_mod *);
65
66/* auth.c */
67int auth_load(const char *, const char *);
68int auth_register(const int, struct uam_obj *);
69#define auth_unregister(a) uam_detach(a)
70struct uam_obj *auth_uamfind(const int, const char *, const int);
71void auth_unload(void);
72int getuamnames(const int, char *);
73
74#endif /* uam_auth.h */
uam_changepw
static struct uam_obj uam_changepw
Definition afpd/auth.c:66
uam_login
static struct uam_obj uam_login
Definition afpd/auth.c:63
file.h
uam_unload
void uam_unload(struct uam_mod *)
Definition afpd/uam.c:102
auth_register
int auth_register(const int, struct uam_obj *)
Definition afpd/auth.c:1244
auth_unload
void auth_unload(void)
Definition afpd/auth.c:1308
getuamnames
int getuamnames(const int, char *)
Definition papd/auth.c:43
uam_load
struct uam_mod * uam_load(const char *, const char *)
Definition papd/uam.c:31
auth_load
int auth_load(const char *, const char *)
Definition papd/auth.c:101
auth_uamfind
struct uam_obj * auth_uamfind(const int, const char *, const int)
Definition afpd/auth.c:1225
papfile
Definition papd/file.h:11
uam_mod
Definition afpd/uam_auth.h:19
uam_mod::uam_module
void * uam_module
Definition afpd/uam_auth.h:20
uam_mod::uam_next
struct uam_mod * uam_next
Definition afpd/uam_auth.h:22
uam_mod::uam_prev
struct uam_mod * uam_prev
Definition afpd/uam_auth.h:22
uam_mod::uam_fcn
struct uam_export * uam_fcn
Definition afpd/uam_auth.h:21
uam_obj
Definition afpd/uam_auth.h:25
uam_obj::logincont
int(* logincont)(void *, struct passwd **, char *, int, char *, size_t *)
Definition afpd/uam_auth.h:33
uam_obj::logout
void(* logout)(void)
Definition afpd/uam_auth.h:35
uam_obj::uam_printer
int(* uam_printer)(char *, char *, char *, struct papfile *)
Definition papd/uam_auth.h:41
uam_obj::u
union uam_obj::@305071364246310154315171152047165020217300263361 u
uam_obj::uam_name
const char * uam_name
Definition afpd/uam_auth.h:26
uam_obj::login
int(* login)(void *, struct passwd **, char *, int, char *, size_t *)
Definition afpd/uam_auth.h:31
uam_obj::uam_prev
struct uam_obj * uam_prev
Definition afpd/uam_auth.h:42
uam_obj::uam_count
int uam_count
Definition afpd/uam_auth.h:28
uam_obj::uam_next
struct uam_obj * uam_next
Definition afpd/uam_auth.h:42
uam_obj::uam_path
char * uam_path
Definition afpd/uam_auth.h:27
uam.h