diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-01-24 12:03:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-01-24 12:03:32 +0000 |
commit | 48718834d4fb6c411ff5b00b86662a3dee3ac6cc (patch) | |
tree | a5651f8f3066fb0e68bfc87cbd23be1c0dea6ba5 /src/include/gnunet_connection_lib.h | |
parent | 1b97726713d88e1ec485aa1e827365a707ebc02f (diff) | |
download | gnunet-48718834d4fb6c411ff5b00b86662a3dee3ac6cc.tar.gz gnunet-48718834d4fb6c411ff5b00b86662a3dee3ac6cc.zip |
UNIX domain socket authentication support added
Diffstat (limited to 'src/include/gnunet_connection_lib.h')
-rw-r--r-- | src/include/gnunet_connection_lib.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h index 33afb0386..8d2dbb611 100644 --- a/src/include/gnunet_connection_lib.h +++ b/src/include/gnunet_connection_lib.h | |||
@@ -53,15 +53,34 @@ struct GNUNET_CONNECTION_Handle; | |||
53 | 53 | ||
54 | 54 | ||
55 | /** | 55 | /** |
56 | * Credentials for UNIX domain sockets. | ||
57 | */ | ||
58 | struct GNUNET_CONNECTION_Credentials | ||
59 | { | ||
60 | /** | ||
61 | * UID of the other end of the connection. | ||
62 | */ | ||
63 | uid_t uid; | ||
64 | |||
65 | /** | ||
66 | * GID of the other end of the connection. | ||
67 | */ | ||
68 | gid_t gid; | ||
69 | }; | ||
70 | |||
71 | |||
72 | /** | ||
56 | * Function to call for access control checks. | 73 | * Function to call for access control checks. |
57 | * | 74 | * |
58 | * @param cls closure | 75 | * @param cls closure |
76 | * @param ucred credentials, if available, otherwise NULL | ||
59 | * @param addr address | 77 | * @param addr address |
60 | * @param addrlen length of address | 78 | * @param addrlen length of address |
61 | * @return GNUNET_YES to allow, GNUNET_NO to deny, GNUNET_SYSERR | 79 | * @return GNUNET_YES to allow, GNUNET_NO to deny, GNUNET_SYSERR |
62 | * for unknown address family (will be denied). | 80 | * for unknown address family (will be denied). |
63 | */ | 81 | */ |
64 | typedef int (*GNUNET_CONNECTION_AccessCheck) (void *cls, | 82 | typedef int (*GNUNET_CONNECTION_AccessCheck) (void *cls, |
83 | const struct GNUNET_CONNECTION_Credentials *ucred, | ||
65 | const struct sockaddr * addr, | 84 | const struct sockaddr * addr, |
66 | socklen_t addrlen); | 85 | socklen_t addrlen); |
67 | 86 | ||