netatalk: auth.h Source File

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
auth.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1990,1993 Regents of The University of Michigan.
3 * All Rights Reserved. See COPYRIGHT.
4 */
5
6#ifndef AFPD_AUTH_H
7#define AFPD_AUTH_H 1
8
9#include <limits.h>
10
11#include <atalk/globals.h>
12
13 struct afp_versions {
14 char *av_name;
15 int av_number;
16};
17
18 static const struct afp_versions afp_versions[] = {
19#ifndef NO_DDP
20 { "AFPVersion 1.1", 11 },
21 { "AFPVersion 2.0", 20 },
22 { "AFPVersion 2.1", 21 },
23#endif /* ! NO_DDP */
24 { "AFP2.2", 22 },
25 { "AFPX03", 30 },
26 { "AFP3.1", 31 },
27 { "AFP3.2", 32 },
28 { "AFP3.3", 33 },
29 { "AFP3.4", 34 }
30};
31
32/* for GetUserInfo */
33#define USERIBIT_USER (1 << 0)
34#define USERIBIT_GROUP (1 << 1)
35#define USERIBIT_UUID (1 << 2)
36#define USERIBIT_ALL (USERIBIT_USER | USERIBIT_GROUP | USERIBIT_UUID)
37
38extern uid_t uuid;
39extern gid_t *groups;
40extern int ngroups;
41
42/* FP functions */
43int afp_login(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
44 size_t *rbuflen);
45int afp_login_ext(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
46 size_t *rbuflen);
47int afp_logincont(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
48 size_t *rbuflen);
49int afp_changepw(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
50 size_t *rbuflen);
51int afp_logout(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
52 size_t *rbuflen);
53int afp_getuserinfo(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
54 size_t *rbuflen);
55int afp_getsession(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
56 size_t *rbuflen);
57int afp_disconnect(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
58 size_t *rbuflen);
59int afp_zzz(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf,
60 size_t *rbuflen);
61
62#endif /* auth.h */
rbuflen
static size_t rbuflen
Definition afpfunc_helpers.c:45
rbuf
static char rbuf[rbufsize]
Definition afpfunc_helpers.c:44
uuid
uid_t uuid
groups
gid_t * groups
afp_login_ext
int afp_login_ext(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/auth.c:837
afp_getsession
int afp_getsession(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/auth.c:516
afp_zzz
int afp_zzz(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/auth.c:415
afp_logout
int afp_logout(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/auth.c:1033
afp_changepw
int afp_changepw(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/auth.c:1059
afp_login
int afp_login(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/auth.c:765
afp_logincont
int afp_logincont(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/auth.c:1008
afp_disconnect
int afp_disconnect(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/auth.c:641
ngroups
int ngroups
afp_getuserinfo
int afp_getuserinfo(AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)
Definition afpd/auth.c:1143
globals.h
obj
static AFPObj obj
Definition netatalk.c:69
AFPObj
Definition globals.h:166
afp_versions
Definition auth.h:13
afp_versions::av_name
char * av_name
Definition auth.h:14
afp_versions::av_number
int av_number
Definition auth.h:15