summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/misc.h b/misc.h
index 869895d3a..5db594b91 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.h,v 1.81 2019/09/03 08:32:11 djm Exp $ */ 1/* $OpenBSD: misc.h,v 1.84 2020/01/24 23:54:40 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -69,6 +69,8 @@ long convtime(const char *);
69char *tilde_expand_filename(const char *, uid_t); 69char *tilde_expand_filename(const char *, uid_t);
70char *percent_expand(const char *, ...) __attribute__((__sentinel__)); 70char *percent_expand(const char *, ...) __attribute__((__sentinel__));
71char *tohex(const void *, size_t); 71char *tohex(const void *, size_t);
72void xextendf(char **s, const char *sep, const char *fmt, ...)
73 __attribute__((__format__ (printf, 3, 4))) __attribute__((__nonnull__ (3)));
72void sanitise_stdfd(void); 74void sanitise_stdfd(void);
73void ms_subtract_diff(struct timeval *, int *); 75void ms_subtract_diff(struct timeval *, int *);
74void ms_to_timeval(struct timeval *, int); 76void ms_to_timeval(struct timeval *, int);
@@ -178,8 +180,13 @@ int opt_match(const char **opts, const char *term);
178#define RP_ALLOW_EOF 0x0004 180#define RP_ALLOW_EOF 0x0004
179#define RP_USE_ASKPASS 0x0008 181#define RP_USE_ASKPASS 0x0008
180 182
183struct notifier_ctx;
184
181char *read_passphrase(const char *, int); 185char *read_passphrase(const char *, int);
182int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2))); 186int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2)));
187struct notifier_ctx *notify_start(int, const char *, ...)
188 __attribute__((format(printf, 2, 3)));
189void notify_complete(struct notifier_ctx *);
183 190
184int secure_permissions(struct stat *st, uid_t uid); 191int secure_permissions(struct stat *st, uid_t uid);
185 192
@@ -187,4 +194,6 @@ int secure_permissions(struct stat *st, uid_t uid);
187#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) 194#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b))
188#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y)) 195#define ROUNDUP(x, y) ((((x)+((y)-1))/(y))*(y))
189 196
197typedef void (*sshsig_t)(int);
198sshsig_t ssh_signal(int, sshsig_t);
190#endif /* _MISC_H */ 199#endif /* _MISC_H */