chiark
/
gitweb
/
~ian
/
secnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
buffer: Provide buffer_destroy
[secnet.git]
/
secnet.h
diff --git
a/secnet.h
b/secnet.h
index 1bfe8a183d5a0becb31a6926558833014b79b2de..54f5d073b8f27f8e3f6cccf62e6b016a883b5d51 100644
(file)
--- a/
secnet.h
+++ b/
secnet.h
@@
-174,6
+174,7
@@
extern void *safe_realloc_ary(void *p, size_t size, size_t count,
const char *message);
void setcloexec(int fd); /* cannot fail */
const char *message);
void setcloexec(int fd); /* cannot fail */
+void setnonblock(int fd); /* cannot fail */
void pipe_cloexec(int fd[2]); /* pipe(), setcloexec() twice; cannot fail */
extern int sys_cmd(const char *file, const char *argc, ...);
void pipe_cloexec(int fd[2]); /* pipe(), setcloexec() twice; cannot fail */
extern int sys_cmd(const char *file, const char *argc, ...);
@@
-267,12
+268,19
@@
bool_t remove_hook(uint32_t phase, hook_fn *f, void *state);
extern uint32_t current_phase;
extern void enter_phase(uint32_t new_phase);
extern uint32_t current_phase;
extern void enter_phase(uint32_t new_phase);
+void phase_hooks_init(void); /* for main() only */
+
/* Some features (like netlink 'soft' routes) require that secnet
retain root privileges. They should indicate that here when
appropriate. */
extern bool_t require_root_privileges;
extern cstring_t require_root_privileges_explanation;
/* Some features (like netlink 'soft' routes) require that secnet
retain root privileges. They should indicate that here when
appropriate. */
extern bool_t require_root_privileges;
extern cstring_t require_root_privileges_explanation;
+/* Some modules may want to know whether secnet is going to drop
+ privilege, so that they know whether to do privsep. Call only
+ in phases SETUP and later. */
+bool_t will_droppriv(void);
+
/***** END of program lifetime support *****/
/***** MODULE support *****/
/***** END of program lifetime support *****/
/***** MODULE support *****/