X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxpgnt.c;h=75f719cf38aedae18fae4d72378dad13d56f34cd;hb=2eb952ca31aa13d1f6f429305fbb6f43a9a28c56;hp=27de94d431a6c83d2b68fa9358b5b48d0fc580eb;hpb=75b7ba26d3437dc0c89446f1e8d3dd6edb05e1af;p=PuTTY.git diff --git a/unix/uxpgnt.c b/unix/uxpgnt.c index 27de94d4..75f719cf 100644 --- a/unix/uxpgnt.c +++ b/unix/uxpgnt.c @@ -23,7 +23,7 @@ SockAddr unix_sock_addr(const char *path); Socket new_unix_listener(SockAddr listenaddr, Plug plug); -void fatalbox(char *p, ...) +void fatalbox(const char *p, ...) { va_list ap; fprintf(stderr, "FATAL ERROR: "); @@ -33,7 +33,7 @@ void fatalbox(char *p, ...) fputc('\n', stderr); exit(1); } -void modalfatalbox(char *p, ...) +void modalfatalbox(const char *p, ...) { va_list ap; fprintf(stderr, "FATAL ERROR: "); @@ -43,7 +43,7 @@ void modalfatalbox(char *p, ...) fputc('\n', stderr); exit(1); } -void nonfatal(char *p, ...) +void nonfatal(const char *p, ...) { va_list ap; fprintf(stderr, "ERROR: "); @@ -52,7 +52,7 @@ void nonfatal(char *p, ...) va_end(ap); fputc('\n', stderr); } -void connection_fatal(void *frontend, char *p, ...) +void connection_fatal(void *frontend, const char *p, ...) { va_list ap; fprintf(stderr, "FATAL ERROR: "); @@ -62,7 +62,7 @@ void connection_fatal(void *frontend, char *p, ...) fputc('\n', stderr); exit(1); } -void cmdline_error(char *p, ...) +void cmdline_error(const char *p, ...) { va_list ap; fprintf(stderr, "pageant: "); @@ -88,8 +88,8 @@ void pageant_log(void *ctx, const char *fmt, va_list ap) * In Pageant our selects are synchronous, so these functions are * empty stubs. */ -int uxsel_input_add(int fd, int rwx) { return 0; } -void uxsel_input_remove(int id) { } +uxsel_id *uxsel_input_add(int fd, int rwx) { return NULL; } +void uxsel_input_remove(uxsel_id *id) { } /* * More stubs. @@ -103,6 +103,8 @@ FontSpec *platform_default_fontspec(const char *name) { return fontspec_new(""); Filename *platform_default_filename(const char *name) { return filename_from_str(""); } char *x_get_default(const char *key) { return NULL; } void log_eventlog(void *handle, const char *event) {} +int from_backend(void *frontend, int is_stderr, const char *data, int datalen) +{ assert(!"only here to satisfy notional call from backend_socket_log"); } /* * Short description of parameters. @@ -111,7 +113,29 @@ static void usage(void) { printf("Pageant: SSH agent\n"); printf("%s\n", ver); - printf("FIXME\n"); + printf("Usage: pageant [key files]\n"); + printf(" pageant [key files] --exec [args]\n"); + printf(" pageant -a [key files]\n"); + printf(" pageant -d [key identifiers]\n"); + printf(" pageant --public [key identifiers]\n"); + printf(" pageant --public-openssh [key identifiers]\n"); + printf(" pageant -l\n"); + printf(" pageant -D\n"); + printf("Lifetime options, for running Pageant as an agent:\n"); + printf(" -X run with the lifetime of the X server\n"); + printf(" -T run with the lifetime of the controlling tty\n"); + printf(" --permanent run permanently\n"); + printf(" --debug run in debugging mode, without forking\n"); + printf(" --exec run with the lifetime of that command\n"); + printf("Client options, for talking to an existing agent:\n"); + printf(" -a add key(s) to the existing agent\n"); + printf(" -l list currently loaded key fingerprints and comments\n"); + printf(" --public print public keys in RFC 4716 format\n"); + printf(" --public-openssh print public keys in OpenSSH format\n"); + printf(" -d delete key(s) from the agent\n"); + printf(" -D delete all keys from the agent\n"); + printf("Other options:\n"); + printf(" -v verbose mode (in agent mode)\n"); exit(1); } @@ -355,7 +379,6 @@ static int unix_add_keyfile(const char *filename_str) goto cleanup; } else if (status == PAGEANT_ACTION_FAILURE) { fprintf(stderr, "pageant: %s: %s\n", filename_str, err); - sfree(err); ret = FALSE; goto cleanup; } @@ -380,7 +403,6 @@ static int unix_add_keyfile(const char *filename_str) goto cleanup; } else if (status == PAGEANT_ACTION_FAILURE) { fprintf(stderr, "pageant: %s: %s\n", filename_str, err); - sfree(err); ret = FALSE; goto cleanup; }