X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=etc%2Fpapd%2Flp.c;h=e077a8d5b03fb3d86d12d03b57c6d9c16b9dc866;hb=b8c1894353b62eb52e59d4e0150fd3c25dcd86ba;hp=dec0b53d21136307207eff1418e315a1b09a01e0;hpb=815d557e167e76015934397dffbfa869180dcdbc;p=netatalk.git diff --git a/etc/papd/lp.c b/etc/papd/lp.c index dec0b53d..e077a8d5 100644 --- a/etc/papd/lp.c +++ b/etc/papd/lp.c @@ -1,5 +1,5 @@ /* - * $Id: lp.c,v 1.28 2009-10-13 22:55:37 didg Exp $ + * $Id: lp.c,v 1.32 2009-10-29 11:35:58 didg Exp $ * * Copyright (c) 1990,1994 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -92,11 +92,11 @@ int lp_disconn_inet( int ); int lp_conn_unix(); int lp_disconn_unix( int ); -char hostname[ MAXHOSTNAMELEN ]; +static char hostname[ MAXHOSTNAMELEN ]; extern struct sockaddr_at *sat; -struct lp { +static struct lp { int lp_flags; FILE *lp_stream; int lp_seq; @@ -127,7 +127,7 @@ static void convert_octal (char *string, charset_t dest) char temp[4]; long int ch; - q=p=string; + q=p=(unsigned char *)string; while ( *p != '\0' ) { ch = 0; if ( *p == '\\' ) { @@ -164,7 +164,7 @@ static void translate(charset_t from, charset_t dest, char **option) if (*option != NULL) { convert_octal(*option, from); if (from) { - if ((size_t) -1 != (convert_string_allocate(from, dest, *option, strlen(*option), &translated)) ) { + if ((size_t) -1 != (convert_string_allocate(from, dest, *option, -1, &translated)) ) { free (*option); *option = translated; } @@ -208,6 +208,8 @@ static void lp_setup_comments (charset_t dest) #define is_var(a, b) (strncmp((a), (b), 2) == 0) +#if 0 +/* removed, it's not used and a pain to get it right from a security POV */ static size_t quote(char *dest, char *src, const size_t bsize, size_t len) { size_t used = 0; @@ -234,7 +236,6 @@ size_t used = 0; return used; } - static char* pipexlate(char *src) { char *p, *q, *dest; @@ -302,7 +303,7 @@ static char* pipexlate(char *src) } return destbuf; } - +#endif void lp_person(char *person) {