Mercurial > noffle
annotate src/authenticate.h @ 393:e113df4af08b noffle
[svn] added debconf-2.0 dependency option
author | godisch |
---|---|
date | Sat, 24 May 2003 07:30:38 +0100 |
parents | c02c4eb95f95 |
children |
rev | line source |
---|---|
288
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
1 /* |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
2 authenticate.h |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
3 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
4 Do client authentication |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
5 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
6 $Id: authenticate.h 420 2003-01-10 23:25:45Z bears $ |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
7 */ |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
8 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
9 #ifndef AUTHENTICATE_H |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
10 #define AUTHENTICATE_H |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
11 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
12 #include "common.h" |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
13 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
14 enum AuthResult { AUTH_ERROR, AUTH_DISCONNECT, AUTH_FAILED, AUTH_OK }; |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
15 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
16 /* Authenticate a user and password. */ |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
17 enum AuthResult |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
18 Auth_authenticate( const char *user, const char *pass ); |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
19 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
20 /* Open authentication session. */ |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
21 Bool |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
22 Auth_open( void ); |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
23 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
24 /* Authentication session now closed. */ |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
25 void |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
26 Auth_close( void ); |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
27 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
28 /* Check we have appropriate privs for authentication. */ |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
29 Bool |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
30 Auth_checkPrivs( void ); |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
31 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
32 /* Are are privs sufficient only for admin access? */ |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
33 Bool |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
34 Auth_admin( void ); |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
35 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
36 /* Drop any privs required for authentication. */ |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
37 Bool |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
38 Auth_dropPrivs( void ); |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
39 |
c02c4eb95f95
[svn] * src/configfile.h,src/configfile.c,docs/noffle.conf.5: Add noffle-user
bears
parents:
diff
changeset
|
40 #endif |