aboutsummaryrefslogtreecommitdiffstats
path: root/common/sysutils.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/sysutils.h')
-rw-r--r--common/sysutils.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/common/sysutils.h b/common/sysutils.h
index de1e3bb1e..9e0a323dd 100644
--- a/common/sysutils.h
+++ b/common/sysutils.h
@@ -43,6 +43,16 @@ int enable_core_dumps (void);
const unsigned char *get_session_marker (size_t *rlen);
/*int check_permissions (const char *path,int extension,int checkonly);*/
void gnupg_sleep (unsigned int seconds);
+
+/* Initialize the fd translation table. This reads one line from
+ stdin which is expected to be in the format "FROM TO [...]" where
+ each "FROM TO" pair are two handle numbers. Handle number FROM on
+ the command line is translated to handle number TO. */
+void translate_table_init (void);
+
+/* Translate a handle number. */
+int translate_table_lookup (int fd);
+
int translate_sys2libc_fd (gnupg_fd_t fd, int for_write);
int translate_sys2libc_fd_int (int fd, int for_write);
FILE *gnupg_tmpfile (void);