2 * $Id: uam_auth.h,v 1.4 2009-10-13 22:55:37 didg 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) (void *, struct passwd **,
33 char *, int, char *, int *);
34 int (*logincont) (void *, struct passwd **, char *,
36 void (*logout) (void);
38 int (*uam_changepw) (void *, char *, struct passwd *, char *,
40 int (*uam_printer) (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 (const char *, const char *);
63 extern void uam_unload (struct uam_mod *);
66 int auth_load (const char *, const char *);
67 int auth_register (const int, struct uam_obj *);
68 #define auth_unregister(a) uam_detach(a)
69 struct uam_obj *auth_uamfind (const int, const char *, const int);
70 void auth_unload (void);
71 int getuamnames (const int, char *);
73 #endif /* uam_auth.h */