diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_connection_lib.h | 19 | ||||
-rw-r--r-- | src/include/gnunet_network_lib.h | 1 | ||||
-rw-r--r-- | src/include/platform.h | 3 |
3 files changed, 23 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 | ||
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h index 73303689a..34cb7bc32 100644 --- a/src/include/gnunet_network_lib.h +++ b/src/include/gnunet_network_lib.h | |||
@@ -309,6 +309,7 @@ void GNUNET_NETWORK_fdset_add (struct GNUNET_NETWORK_FDSet *dst, | |||
309 | void GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to, | 309 | void GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to, |
310 | const struct GNUNET_NETWORK_FDSet *from); | 310 | const struct GNUNET_NETWORK_FDSet *from); |
311 | 311 | ||
312 | |||
312 | /** | 313 | /** |
313 | * Return file descriptor for this network handle | 314 | * Return file descriptor for this network handle |
314 | * | 315 | * |
diff --git a/src/include/platform.h b/src/include/platform.h index cc2aa03ae..230031307 100644 --- a/src/include/platform.h +++ b/src/include/platform.h | |||
@@ -156,6 +156,9 @@ | |||
156 | #include <sys/loadavg.h> | 156 | #include <sys/loadavg.h> |
157 | #include <semaphore.h> | 157 | #include <semaphore.h> |
158 | #endif | 158 | #endif |
159 | #if HAVE_UCRED_H | ||
160 | #include <ucred.h> | ||
161 | #endif | ||
159 | #ifdef CYGWIN | 162 | #ifdef CYGWIN |
160 | #include <windows.h> | 163 | #include <windows.h> |
161 | #include <cygwin/if.h> | 164 | #include <cygwin/if.h> |