~mdw
/
tripe
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Allow the caller to configure the administration socket permissions.
[tripe]
/
server
/
tripe.h
diff --git
a/server/tripe.h
b/server/tripe.h
index
ab15787
..
c5694dc
100644
(file)
--- a/
server/tripe.h
+++ b/
server/tripe.h
@@
-75,6
+75,7
@@
#include <mLib/fwatch.h>
#include <mLib/hash.h>
#include <mLib/macros.h>
#include <mLib/fwatch.h>
#include <mLib/hash.h>
#include <mLib/macros.h>
+#include <mLib/mdup.h>
#include <mLib/mdwopt.h>
#include <mLib/quis.h>
#include <mLib/report.h>
#include <mLib/mdwopt.h>
#include <mLib/quis.h>
#include <mLib/report.h>
@@
-332,6
+333,7
@@
typedef struct stats {
typedef struct peerspec {
char *name; /* Peer's name */
typedef struct peerspec {
char *name; /* Peer's name */
+ char *tag; /* Public key tag */
const tunnel_ops *tops; /* Tunnel operations */
unsigned long t_ka; /* Keep alive interval */
addr sa; /* Socket address to speak to */
const tunnel_ops *tops; /* Tunnel operations */
unsigned long t_ka; /* Keep alive interval */
addr sa; /* Socket address to speak to */
@@
-424,12
+426,6
@@
typedef struct admin_addop {
peerspec peer; /* Peer pending creation */
} admin_addop;
peerspec peer; /* Peer pending creation */
} admin_addop;
-typedef struct admin_greetop {
- admin_resop r; /* Name resolution header */
- void *c; /* Challenge block */
- size_t sz; /* Length of challenge */
-} admin_greetop;
-
typedef struct admin_pingop {
admin_bgop bg; /* Background operation header */
ping ping; /* Ping pending response */
typedef struct admin_pingop {
admin_bgop bg; /* Background operation header */
ping ping; /* Ping pending response */
@@
-937,13
+933,15
@@
extern void a_daemon(void);
* Arguments: @const char *sock@ = socket name to create
* @uid_t u@ = user to own the socket
* @gid_t g@ = group to own the socket
* Arguments: @const char *sock@ = socket name to create
* @uid_t u@ = user to own the socket
* @gid_t g@ = group to own the socket
+ * @mode_t m@ = permissions to set on the socket
*
* Returns: ---
*
* Use: Creates the admin listening socket.
*/
*
* Returns: ---
*
* Use: Creates the admin listening socket.
*/
-extern void a_init(const char */*sock*/, uid_t /*u*/, gid_t /*g*/);
+extern void a_init(const char */*sock*/,
+ uid_t /*u*/, gid_t /*g*/, mode_t /*m*/);
/*----- Mapping with addresses as keys ------------------------------------*/
/*----- Mapping with addresses as keys ------------------------------------*/
@@
-1248,6
+1246,15
@@
extern peer *p_create(peerspec */*spec*/);
extern const char *p_name(peer */*p*/);
extern const char *p_name(peer */*p*/);
+/* --- @p_tag@ --- *
+ *
+ * Arguments: @peer *p@ = pointer to a peer block
+ *
+ * Returns: A pointer to the peer's public key tag.
+ */
+
+extern const char *p_tag(peer */*p*/);
+
/* --- @p_spec@ --- *
*
* Arguments: @peer *p@ = pointer to a peer block
/* --- @p_spec@ --- *
*
* Arguments: @peer *p@ = pointer to a peer block