netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
afpd/uam_auth.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1999 Adrian Sun ([email protected])
3 * All Rights Reserved. See COPYRIGHT.
4 *
5 * interface between uam.c and auth.c
6 */
7
8#ifndef AFPD_UAM_AUTH_H
9#define AFPD_UAM_AUTH_H 1
10
11#include <pwd.h>
12
13#include <atalk/globals.h>
14#include <atalk/uam.h>
15
16struct uam_mod {
20};
21
22struct uam_obj {
23 const char *uam_name; /* authentication method */
24 char *uam_path; /* where it's located */
26 union {
27 struct {
28 int (*login)(void *, struct passwd **,
29 char *, int, char *, size_t *);
30 int (*logincont)(void *, struct passwd **, char *,
31 int, char *, size_t *);
32 void (*logout)(void);
33 int (*login_ext)(void *, char *, struct passwd **,
34 char *, int, char *, size_t *);
36 int (*uam_changepw)(void *, char *, struct passwd *, char *,
37 int, char *, size_t *);
38 } u;
40};
41
42#define uam_attach(a, b) do { \
43 (a)->uam_prev->uam_next = (b); \
44 (b)->uam_prev = (a)->uam_prev; \
45 (b)->uam_next = (a); \
46 (a)->uam_prev = (b); \
47} while (0)
48
49#define uam_detach(a) do { \
50 (a)->uam_prev->uam_next = (a)->uam_next; \
51 (a)->uam_next->uam_prev = (a)->uam_prev; \
52} while (0)
53
54extern struct uam_mod *uam_load(AFPObj *, const char *, const char *);
55extern void uam_unload(struct uam_mod *);
56
57/* auth.c */
58int auth_load(AFPObj *, const char *, const char *);
59int auth_register(const int, struct uam_obj *);
60#define auth_unregister(a) uam_detach(a)
61struct uam_obj *auth_uamfind(const int, const char *, const int);
62void auth_unload(void);
63
64/* uam.c */
65int uam_random_string(AFPObj *, char *, int);
66
67#endif /* uam_auth.h */
static struct uam_obj uam_login
Definition afpd/auth.c:53
void uam_unload(struct uam_mod *)
Definition afpd/uam.c:101
int auth_register(const int, struct uam_obj *)
Definition afpd/auth.c:1156
void auth_unload(void)
Definition afpd/auth.c:1220
struct uam_mod * uam_load(AFPObj *, const char *, const char *)
Definition afpd/uam.c:44
int auth_load(AFPObj *, const char *, const char *)
Definition afpd/auth.c:1173
int uam_random_string(AFPObj *, char *, int)
Definition afpd/uam.c:348
struct uam_obj * auth_uamfind(const int, const char *, const int)
Definition afpd/auth.c:1137
Definition globals.h:154
Definition uam.h:60
Definition afpd/uam_auth.h:16
void * uam_module
Definition afpd/uam_auth.h:17
struct uam_mod * uam_next
Definition afpd/uam_auth.h:19
struct uam_mod * uam_prev
Definition afpd/uam_auth.h:19
struct uam_export * uam_fcn
Definition afpd/uam_auth.h:18
Definition afpd/uam_auth.h:22
int(* logincont)(void *, struct passwd **, char *, int, char *, size_t *)
Definition afpd/uam_auth.h:30
void(* logout)(void)
Definition afpd/uam_auth.h:32
union uam_obj::@267363230117161357145247102227344201111336235326 u
const char * uam_name
Definition afpd/uam_auth.h:23
int(* login)(void *, struct passwd **, char *, int, char *, size_t *)
Definition afpd/uam_auth.h:28
struct uam_obj * uam_prev
Definition afpd/uam_auth.h:39
int(* login_ext)(void *, char *, struct passwd **, char *, int, char *, size_t *)
Definition afpd/uam_auth.h:33
int(* uam_changepw)(void *, char *, struct passwd *, char *, int, char *, size_t *)
Definition afpd/uam_auth.h:36
int uam_count
Definition afpd/uam_auth.h:25
struct uam_obj * uam_next
Definition afpd/uam_auth.h:39
char * uam_path
Definition afpd/uam_auth.h:24