=== modified file 'TODO' --- TODO 2008-08-10 01:10:04 +0000 +++ TODO 2008-08-10 03:32:42 +0000 @@ -27,7 +27,7 @@ *** SEE ALSO Refer to mandos(8), password-request(8mandos), and password-prompt(8mandos) -** [#B] Fix %d format strings to use [[https://secure.wikimedia.org/wikipedia/en/wiki/Inttypes.h][]] +** Use asprintf instead of malloc and strcat? ** use strsep instead of strtok? ** use config file in addition to arguments ** pass things in environment, like device name, etc @@ -60,9 +60,7 @@ Create this section *** SEE ALSO Refer to mandos-client(8mandos) and password-prompt(8mandos) -** [#B] Fix %d format strings to use [[https://secure.wikimedia.org/wikipedia/en/wiki/Inttypes.h][]] -** start_mandos_communication: loop around gnutls_handshake - [[info:gnutls.info.gz:Core%20functions][gnutls_handshake]] +** Use asprintf instead of malloc and memcpy? ** IPv4 support ** use strsep instead of strtok? ** Do not depend on GPG key rings on disk === modified file 'mandos-client.c' --- mandos-client.c 2008-08-10 00:21:08 +0000 +++ mandos-client.c 2008-08-10 03:32:42 +0000 @@ -606,13 +606,16 @@ /* Bad exit by plugin */ if(debug){ if(WIFEXITED(proc->status)){ - fprintf(stderr, "Plugin %d exited with status %d\n", - proc->pid, WEXITSTATUS(proc->status)); + fprintf(stderr, "Plugin %u exited with status %d\n", + (unsigned int) (proc->pid), + WEXITSTATUS(proc->status)); } else if(WIFSIGNALED(proc->status)) { - fprintf(stderr, "Plugin %d killed by signal %d\n", - proc->pid, WTERMSIG(proc->status)); + fprintf(stderr, "Plugin %u killed by signal %d\n", + (unsigned int) (proc->pid), + WTERMSIG(proc->status)); } else if(WCOREDUMP(proc->status)){ - fprintf(stderr, "Plugin %d dumped core\n", proc->pid); + fprintf(stderr, "Plugin %d dumped core\n", + (unsigned int) (proc->pid)); } } /* Remove the plugin */ === modified file 'plugins.d/password-request.c' --- plugins.d/password-request.c 2008-08-10 00:21:08 +0000 +++ plugins.d/password-request.c 2008-08-10 03:32:42 +0000 @@ -50,6 +50,7 @@ sockaddr_in6, PF_INET6, SOCK_STREAM, INET6_ADDRSTRLEN, uid_t, gid_t */ +#include /* PRIu16 */ #include /* socket(), struct sockaddr_in6, struct in6_addr, inet_pton(), connect() */ @@ -228,7 +229,7 @@ } else { fprintf(stderr, "Unsupported algorithm: %s\n", result->unsupported_algorithm); - fprintf(stderr, "Wrong key usage: %d\n", + fprintf(stderr, "Wrong key usage: %u\n", result->wrong_key_usage); if(result->file_name != NULL){ fprintf(stderr, "File name: %s\n", result->file_name); @@ -455,8 +456,8 @@ } if(debug){ - fprintf(stderr, "Setting up a tcp connection to %s, port %d\n", - ip, port); + fprintf(stderr, "Setting up a tcp connection to %s, port %" PRIu16 + "\n", ip, port); } tcp_sd = socket(PF_INET6, SOCK_STREAM, 0); @@ -491,7 +492,8 @@ to.in6.sin6_scope_id = (uint32_t)if_index; if(debug){ - fprintf(stderr, "Connection to: %s, port %d\n", ip, port); + fprintf(stderr, "Connection to: %s, port %" PRIu16 "\n", ip, + port); char addrstr[INET6_ADDRSTRLEN] = ""; if(inet_ntop(to.in6.sin6_family, &(to.in6.sin6_addr), addrstr, sizeof(addrstr)) == NULL){ @@ -676,8 +678,9 @@ char ip[AVAHI_ADDRESS_STR_MAX]; avahi_address_snprint(ip, sizeof(ip), address); if(debug){ - fprintf(stderr, "Mandos server \"%s\" found on %s (%s, %d) on" - " port %d\n", name, host_name, ip, interface, port); + fprintf(stderr, "Mandos server \"%s\" found on %s (%s, %" + PRIu16 ") on port %d\n", name, host_name, ip, + interface, port); } int ret = start_mandos_communication(ip, port, interface, mc); if (ret == 0){