vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / kernel / file_systems / netfs / authentication_server / AuthenticationServer.h
blobf15e0ccb54debfe1ff263aa60e157ebff235069c
1 // AuthenticationServer.h
3 #ifndef NETFS_AUTHENTICATION_SERVER_H
4 #define NETFS_AUTHENTICATION_SERVER_H
6 #include <Application.h>
7 #include <Locker.h>
9 #include "HashString.h"
11 class AuthenticationServer : public BApplication {
12 public:
13 AuthenticationServer();
14 ~AuthenticationServer();
16 status_t Init();
17 private:
18 static int32 _RequestThreadEntry(void* data);
19 int32 _RequestThread();
21 bool _GetAuthentication(const char* context,
22 const char* server, const char* share,
23 HashString* user, HashString* password);
24 status_t _AddAuthentication(const char* context,
25 const char* server, const char* share,
26 const char* user, const char* password,
27 bool makeDefault);
28 status_t _SendRequestReply(port_id port, int32 token,
29 status_t error, bool cancelled,
30 const char* user, const char* password);
32 private:
33 class Authentication;
34 class ServerKey;
35 class ServerEntry;
36 class ServerEntryMap;
37 struct AuthenticationRequest;
38 class UserDialogTask;
39 friend class UserDialogTask;
41 BLocker fLock;
42 port_id fRequestPort;
43 thread_id fRequestThread;
44 ServerEntryMap* fServerEntries;
45 bool fTerminating;
48 #endif // NETFS_AUTHENTICATION_SERVER_H