2 * $Id: uam_auth.h,v 1.3 2001-06-25 20:13:45 rufustfirefly Exp $
4 * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
5 * All Rights Reserved. See COPYRIGHT.
7 * interface between uam.c and auth.c
10 #ifndef PAPD_UAM_AUTH_H
11 #define PAPD_UAM_AUTH_H 1
13 #include <sys/cdefs.h>
16 #include <atalk/uam.h>
22 struct uam_export *uam_fcn;
23 struct uam_mod *uam_prev, *uam_next;
27 const char *uam_name; /* authentication method */
28 char *uam_path; /* where it's located */
32 int (*login) __P((void *, struct passwd **,
33 char *, int, char *, int *));
34 int (*logincont) __P((void *, struct passwd **, char *,
36 void (*logout) __P((void));
38 int (*uam_changepw) __P((void *, char *, struct passwd *, char *,
40 int (*uam_printer) __P((char *, char *, char *, struct papfile *));
42 struct uam_obj *uam_prev, *uam_next;
45 #define uam_attach(a, b) do { \
46 (a)->uam_prev->uam_next = (b); \
47 (b)->uam_prev = (a)->uam_prev; \
48 (b)->uam_next = (a); \
49 (a)->uam_prev = (b); \
52 #define uam_detach(a) do { \
53 (a)->uam_prev->uam_next = (a)->uam_next; \
54 (a)->uam_next->uam_prev = (a)->uam_prev; \
57 #define UAM_LIST(type) (((type) == UAM_SERVER_LOGIN) ? &uam_login : \
58 (((type) == UAM_SERVER_CHANGEPW) ? &uam_changepw : \
59 (((type) == UAM_SERVER_PRINTAUTH) ? &uam_printer : NULL)))
62 extern struct uam_mod *uam_load __P((const char *, const char *));
63 extern void uam_unload __P((struct uam_mod *));
66 int auth_load __P((const char *, const char *));
67 int auth_register __P((const int, struct uam_obj *));
68 #define auth_unregister(a) uam_detach(a)
69 struct uam_obj *auth_uamfind __P((const int, const char *, const int));
70 void auth_unload __P((void));
71 int getuamnames __P((const int, char *));
73 #endif /* uam_auth.h */