netatalk 4.5.0
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 (asun@zoology.washington.edu)
3 * All Rights Reserved. See COPYRIGHT.
4 */
5
10
11#ifndef AFPD_UAM_AUTH_H
12#define AFPD_UAM_AUTH_H 1
13
14#include <pwd.h>
15
16#include <atalk/globals.h>
17#include <atalk/uam.h>
18
19 struct uam_mod {
20 void *uam_module;
21 struct uam_export *uam_fcn;
22 struct uam_mod *uam_prev, *uam_next;
23};
24
25 struct uam_obj {
26 const char *uam_name;
27 char *uam_path;
28 int uam_count;
29 union {
30 struct {
31 int (*login)(void *, struct passwd **,
32 char *, int, char *, size_t *);
33 int (*logincont)(void *, struct passwd **, char *,
34 int, char *, size_t *);
35 void (*logout)(void);
36 int (*login_ext)(void *, char *, struct passwd **,
37 char *, int, char *, size_t *);
38 } uam_login;
39 int (*uam_changepw)(void *, char *, struct passwd *, char *,
40 int, char *, size_t *);
41 } u;
42 struct uam_obj *uam_prev, *uam_next;
43};
44
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); \
50} while (0)
51
52#define uam_detach(a) do { \
53 (a)->uam_prev->uam_next = (a)->uam_next; \
54 (a)->uam_next->uam_prev = (a)->uam_prev; \
55} while (0)
56
57 extern struct uam_mod *uam_load(AFPObj *, const char *, const char *);
58 extern void uam_unload(struct uam_mod *);
59
60/* auth.c */
61 int auth_load(AFPObj *, const char *, const char *);
62 int auth_register(const int, struct uam_obj *);
63#define auth_unregister(a) uam_detach(a)
64 struct uam_obj *auth_uamfind(const int, const char *, const int);
65 void auth_unload(void);
66
67/* uam.c */
68 int uam_random_string(AFPObj *, char *, int);
69
70#endif /* uam_auth.h */
uam_login
static struct uam_obj uam_login
Definition afpd/auth.c:63
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
uam_load
struct uam_mod * uam_load(AFPObj *, const char *, const char *)
Definition afpd/uam.c:45
auth_load
int auth_load(AFPObj *, const char *, const char *)
Definition afpd/auth.c:1261
uam_random_string
int uam_random_string(AFPObj *, char *, int)
Fill a buffer with cryptographically secure random bytes.
Definition afpd/uam.c:362
auth_uamfind
struct uam_obj * auth_uamfind(const int, const char *, const int)
Definition afpd/auth.c:1225
globals.h
AFPObj
Definition globals.h:166
uam_export
Definition uam.h:61
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::u
union uam_obj::@234351115164276023104375356216234304271370274024 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::login_ext
int(* login_ext)(void *, char *, struct passwd **, char *, int, char *, size_t *)
Definition afpd/uam_auth.h:36
uam_obj::uam_changepw
int(* uam_changepw)(void *, char *, struct passwd *, char *, int, char *, size_t *)
Definition afpd/uam_auth.h:39
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