summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* netrom/nrsdrv.c: Fix signedness compiler warnings.Ralf Baechle2015-06-071-1/+1
| | | | | | | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT nrsdrv.o -MD -MP -MF .deps/nrsdrv.Tpo -c -o nrsdrv.o nrsdrv.c nrsdrv.c: In function ‘main’: nrsdrv.c:438:15: warning: pointer targets in passing argument 1 of ‘kiss_unesc’ differ in signedness [-Wpointer-sign] kiss_unesc(buffer, n); ^ nrsdrv.c:246:13: note: expected ‘unsigned char *’ but argument is of type ‘char *’ static void kiss_unesc(unsigned char *buffer, int len) ^ nrsdrv.c:449:14: warning: pointer targets in passing argument 1 of ‘nrs_unesc’ differ in signedness [-Wpointer-sign] nrs_unesc(buffer, n); ^ nrsdrv.c:192:13: note: expected ‘unsigned char *’ but argument is of type ‘char *’ static void nrs_unesc(unsigned char *buffer, int len) ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* netrom/netromt.c: Fix signedness compiler warnings.Ralf Baechle2015-06-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT netromt.o -MD -MP -MF .deps/netromt.Tpo -c -o netromt.o netromt.c netromt.c: In function ‘build_header’: netromt.c:30:9: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign] strcpy(message + 1, nr_config_get_alias(NULL)); ^ In file included from netromt.c:4:0: /usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) ^ netromt.c:31:12: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign] strncat(message + 1, " ", MNEMONIC_LEN - strlen(message + 1)); ^ In file included from netromt.c:4:0: /usr/include/string.h:398:15: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ extern size_t strlen (const char *__s) ^ netromt.c:31:1: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in signedness [-Wpointer-sign] strncat(message + 1, " ", MNEMONIC_LEN - strlen(message + 1)); ^ netromt.c:31:1: note: expected ‘char *’ but argument is of type ‘unsigned char *’ netromt.c: In function ‘build_mine’: netromt.c:66:49: warning: pointer targets in passing argument 2 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign] if (ax25_aton_entry(nr_config_get_addr(port), message + len) == -1) { ^ In file included from netromt.c:19:0: /usr/include/netax25/axlib.h:58:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’ extern int ax25_aton_entry(const char *, char *); ^ netromt.c:74:10: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign] strcpy(message + len, nr_config_get_alias(port)); ^ In file included from netromt.c:4:0: /usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) ^ netromt.c:75:13: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign] strncat(message + len, " ", MNEMONIC_LEN - strlen(message + len)); ^ In file included from netromt.c:4:0: /usr/include/string.h:398:15: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ extern size_t strlen (const char *__s) ^ netromt.c:75:2: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in signedness [-Wpointer-sign] strncat(message + len, " ", MNEMONIC_LEN - strlen(message + len)); ^ netromt.c:75:2: note: expected ‘char *’ but argument is of type ‘unsigned char *’ netromt.c:78:44: warning: pointer targets in passing argument 2 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign] ax25_aton_entry(nr_config_get_addr(NULL), message + len); ^ In file included from netromt.c:19:0: /usr/include/netax25/axlib.h:58:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’ extern int ax25_aton_entry(const char *, char *); ^ netromt.c: In function ‘build_others’: netromt.c:156:34: warning: pointer targets in passing argument 2 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign] if (ax25_aton_entry(callsign, message + len) == -1) { ^ In file included from netromt.c:19:0: /usr/include/netax25/axlib.h:58:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’ extern int ax25_aton_entry(const char *, char *); ^ netromt.c:163:11: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign] strcpy(message + len, mnemonic); ^ In file included from netromt.c:4:0: /usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) ^ netromt.c:164:14: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign] strncat(message + len, " ", MNEMONIC_LEN - strlen(message + len)); ^ In file included from netromt.c:4:0: /usr/include/string.h:398:15: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ extern size_t strlen (const char *__s) ^ netromt.c:164:3: warning: pointer targets in passing argument 1 of ‘__builtin_strncat’ differ in signedness [-Wpointer-sign] strncat(message + len, " ", MNEMONIC_LEN - strlen(message + len)); ^ netromt.c:164:3: note: expected ‘char *’ but argument is of type ‘unsigned char *’ netromt.c:167:35: warning: pointer targets in passing argument 2 of ‘ax25_aton_entry’ differ in signedness [-Wpointer-sign] if (ax25_aton_entry(neighbour, message + len) == -1) { ^ In file included from netromt.c:19:0: /usr/include/netax25/axlib.h:58:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’ extern int ax25_aton_entry(const char *, char *); ^ [...] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* hdlcutil/usersmdiag.h: Fix signedness compiler warnings.Ralf Baechle2015-06-071-1/+1
| | | | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT hdrvcomm.o -MD -MP -MF .deps/hdrvcomm.Tpo -c -o hdrvcomm.o hdrvcomm.c hdrvcomm.c: In function ‘hdrvc_get_driver_name’: hdrvcomm.c:677:1: warning: pointer targets in passing argument 2 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign] strncpy(buf, msg.data.by, ret); ^ hdrvcomm.c:677:1: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ hdrvcomm.c: In function ‘hdrvc_get_mode_name’: hdrvcomm.c:712:1: warning: pointer targets in passing argument 2 of ‘__builtin_strncpy’ differ in signedness [-Wpointer-sign] strncpy(buf, msg.data.by, ret); ^ hdrvcomm.c:712:1: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* hdlcutil/sethdlc.c: Fix signedness compiler warnings.Ralf Baechle2015-06-071-2/+2
| | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT sethdlc.o -MD -MP -MF .deps/sethdlc.Tpo -c -o sethdlc.o sethdlc.c sethdlc.c: In function ‘main’: sethdlc.c:539:34: warning: pointer targets in passing argument 1 of ‘hdrvc_recvpacket’ differ in signedness [-Wpointer-sign] while ((ret = hdrvc_recvpacket(pktbuf, sizeof(pktbuf))) > 1) ^ In file included from sethdlc.c:46:0: hdrvcomm.h:88:12: note: expected ‘char *’ but argument is of type ‘unsigned char *’ extern int hdrvc_recvpacket(char *pkt, int maxlen); ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25/mheardd.c: Fix signedness compiler warnings.Ralf Baechle2015-06-071-4/+7
| | | | | | | | | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT mheardd.o -MD -MP -MF .deps/mheardd.Tpo -c -o mheardd.o mheardd.c mheardd.c: In function ‘main’: mheardd.c:259:22: warning: pointer targets in passing argument 1 of ‘ax25_validate’ differ in signedness [-Wpointer-sign] if (!ax25_validate(data + 0) || !ax25_validate(data + AXLEN)) { ^ In file included from mheardd.c:31:0: /usr/include/netax25/axlib.h:116:12: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ extern int ax25_validate(const char *); ^ mheardd.c:259:50: warning: pointer targets in passing argument 1 of ‘ax25_validate’ differ in signedness [-Wpointer-sign] if (!ax25_validate(data + 0) || !ax25_validate(data + AXLEN)) { ^ In file included from mheardd.c:31:0: /usr/include/netax25/axlib.h:116:12: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ extern int ax25_validate(const char *); ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25/axwrapper.c: Fix signedness compiler warnings.Ralf Baechle2015-06-071-1/+2
| | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT axwrapper.o -MD -MP -MF .deps/axwrapper.Tpo -c -o axwrapper.o axwrapper.c axwrapper.c: In function ‘main’: axwrapper.c:105:17: warning: pointer targets in passing argument 2 of ‘setvbuf’ differ in signedness [-Wpointer-sign] setvbuf(stdout, stdoutbuf, _IOFBF, paclen); ^ In file included from axwrapper.c:36:0: /usr/include/stdio.h:336:12: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’ extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf, ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25/axspawn.c: Fix signedness compiler warnings.Ralf Baechle2015-06-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT axspawn.o -MD -MP -MF .deps/axspawn.Tpo -c -o axspawn.o axspawn.c axspawn.c: In function ‘decstathuf’: axspawn.c:595:9: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] srcptr = src; ^ axspawn.c:596:10: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] destptr = dest; ^ axspawn.c: In function ‘read_ax25’: axspawn.c:675:19: warning: pointer targets in passing argument 1 of ‘decstathuf’ differ in signedness [-Wpointer-sign] if (!decstathuf(s, decomp, len, &declen)) { ^ axspawn.c:584:5: note: expected ‘char *’ but argument is of type ‘unsigned char *’ int decstathuf(char *src, char *dest, int srclen, int *destlen) ^ axspawn.c:677:11: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign] strcpy(s, decomp); ^ In file included from axspawn.c:149:0: /usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) ^ axspawn.c:690:31: warning: pointer targets in passing argument 1 of ‘Strncasecmp’ differ in signedness [-Wpointer-sign] if (!huffman && !Strncasecmp(s, "//COMP ON\n", 10)) { ^ axspawn.c:498:5: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ int Strncasecmp(const char *s1, const char *s2, int n) ^ axspawn.c:704:10: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign] strcpy(s,"\n"); ^ In file included from axspawn.c:149:0: /usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) ^ axspawn.c:708:30: warning: pointer targets in passing argument 1 of ‘Strncasecmp’ differ in signedness [-Wpointer-sign] if (huffman && !Strncasecmp(s, "//COMP OFF\n", 11)) { ^ axspawn.c:498:5: note: expected ‘const char *’ but argument is of type ‘unsigned char *’ int Strncasecmp(const char *s1, const char *s2, int n) ^ axspawn.c:727:10: warning: pointer targets in passing argument 1 of ‘strcpy’ differ in signedness [-Wpointer-sign] strcpy(s,"\n"); ^ In file included from axspawn.c:149:0: /usr/include/string.h:129:14: note: expected ‘char * restrict’ but argument is of type ‘unsigned char *’ extern char *strcpy (char *__restrict __dest, const char *__restrict __src) ^ axspawn.c: In function ‘new_user’: axspawn.c:1101:5: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] q = strchr(p, '/'); ^ axspawn.c:1145:5: warning: pointer targets in assignment differ in signedness [-Wpointer-sign] p = q; ^ axspawn.c: In function ‘main’: axspawn.c:1557:17: warning: pointer targets in passing argument 1 of ‘read_ax25’ differ in signedness [-Wpointer-sign] if (read_ax25(buf, sizeof(buf)) < 0) ^ axspawn.c:662:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’ int read_ax25(unsigned char *s, int size) ^ axspawn.c:1571:24: warning: pointer targets in passing argument 1 of ‘read_ax25’ differ in signedness [-Wpointer-sign] if ((cnt = read_ax25(buf, sizeof(buf)-1)) < 0) ^ axspawn.c:662:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’ int read_ax25(unsigned char *s, int size) ^ axspawn.c:1655:19: warning: pointer targets in passing argument 1 of ‘read_ax25’ differ in signedness [-Wpointer-sign] cnt = read_ax25(buf, sizeof(buf)-1); ^ axspawn.c:662:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’ int read_ax25(unsigned char *s, int size) ^ axspawn.c:1930:22: warning: pointer targets in passing argument 1 of ‘read_ax25’ differ in signedness [-Wpointer-sign] cnt = read_ax25(buf, sizeof(buf)); ^ axspawn.c:662:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’ int read_ax25(unsigned char *s, int size) ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ax25/access.c: Fix signedness compiler warnings.Ralf Baechle2015-06-071-1/+1
| | | | | | | | | | | | | | cc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT access.o -MD -MP -MF .deps/access.Tpo -c -o access.o access.c access.c: In function ‘calc_md5_pw’: access.c:194:23: warning: pointer targets in passing argument 2 of ‘MD5Update’ differ in signedness [-Wpointer-sign] MD5Update(&context, buffer+i, n); ^ In file included from access.c:13:0: md5.h:60:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’ void MD5Update(MD5_CTX *mdContext, unsigned char *inBuf, unsigned int inLen); ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Update ChangeLog.Ralf Baechle2015-06-061-1/+4
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Fix path of node binary in ax25d.conf.Ralf Baechle2015-06-051-5/+5
| | | | | | | | 1905bd6c7e1123adccfd24803fea67227228d38c (Substitute proper paths in ax25d.conf.) accidently dropped the filename, that is node, from the path of the node binary. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Remove generated file ax25/ax25d.conf.Ralf Baechle2015-06-051-49/+0
| | | | | | | | Since 1905bd6c7e1123adccfd24803fea67227228d38c (Substitute proper paths in ax25d.conf.) ax25/ax25d.conf is a generated file and should have been deleted. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* configure.ac: Don't substitute AX25IO_LIB.Ralf Baechle2015-05-291-1/+0
| | | | | | Nothing is using it. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Consistently indent ChangeLog for readability.Ralf Baechle2015-05-291-7/+7
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* RPM: Don't include %{_sysconfdir}/ax25 directory itself.Ralf Baechle2015-05-281-1/+0
| | | | | | | | libax25 commit fe7b81a8ca94a1a32878e06b6ea68d30f73a45bd (RPM: Include /etc/ax25 dir into package.) included the directory into the libax25 package and it should only be included in a single package. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Substitute proper paths in ax25d.conf.Ralf Baechle2015-05-264-7/+69
| | | | | | | | | | | | | Depending on the prefix configured, the default ax25d.conf file may contain incorrects paths. Generate config file using the correct sbin dir. Assume node which is not part of ax25-tools to be installed with the same prefix. Don't probe - chances are the sysadmin of a node system is going to install it after ax25-tools so we'd likely have to guess which never is a good thing. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axwrapper: Indent with tabs instead of spaces.Ralf Baechle2015-05-251-2/+2
| | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Add Tomi Manninen OH2BNS's axwrapper program.Ralf Baechle2015-05-259-1/+260
| | | | | | | | | | | | | Axwrapper first creates a pipe and then forks and execs the program <server-program> with arguments given at the axwrapper command line. The argv[0] argument is mandatory; further arguments are optional. The parent process then sits and waits for any I/O to and from the user and converts any carriage return characters from the user to line feeds and any line feeds from the program to carriage returns. This is useful when starting non-AX.25-aware programs from ax25d. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Add config files to rpm spec file.Ralf Baechle2015-05-231-1/+12
| | | | | | | Even though these files are just templates to get started with they make it much easier to the user trying to get started. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* rsparms: Fix harmless -Werror=format-security build error.Ralf Baechle2015-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | make[2]: Entering directory '/home/ralf/src/ax25/ax25-tools/rose' gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -MT rsparms.o -MD -MP -MF .deps/rsparms.Tpo -c -o rsparms.o rsparms.c rsparms.c: In function ‘nodes’: rsparms.c:71:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, nodes_usage); ^ rsparms.c:117:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, nodes_usage); ^ cc1: some warnings being treated as errors Makefile:462: recipe for target 'rsparms.o' failed make[2]: *** [rsparms.o] Error 1 make[2]: Leaving directory '/home/ralf/src/ax25/ax25-tools/rose' The string is a constant in the application code itself so no security issue Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* nrparms: Fix harmless -Werror=format-security build error.Ralf Baechle2015-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | make[2]: Entering directory '/home/ralf/src/ax25/ax25-tools/netrom' gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -MT nrparms.o -MD -MP -MF .deps/nrparms.Tpo -c -o nrparms.o nrparms.c nrparms.c: In function ‘main’: nrparms.c:213:4: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, nodes_usage); ^ nrparms.c:224:4: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, routes_usage); ^ cc1: some warnings being treated as errors Makefile:438: recipe for target 'nrparms.o' failed make[2]: *** [nrparms.o] Error 1 make[2]: Leaving directory '/home/ralf/src/ax25/ax25-tools/netrom' The strings are constants in the application code itself so no security issue. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* m6pack: Fix harmless -Werror=format-security build error.Ralf Baechle2015-05-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | make[2]: Entering directory '/home/ralf/src/ax25/ax25-tools/6pack' gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -MT m6pack.o -MD -MP -MF .deps/m6pack.Tpo -c -o m6pack.o m6pack.c m6pack.c: In function ‘main’: m6pack.c:446:4: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ m6pack.c:452:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ m6pack.c:457:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ cc1: some warnings being treated as errors Makefile:384: recipe for target 'm6pack.o' failed make[2]: *** [m6pack.o] Error 1 make[2]: Leaving directory '/home/ralf/src/ax25/ax25-tools/6pack' The string are constants in the application code itself so no security issue. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* mkiss: Fix harmless -Werror=format-security build error.Ralf Baechle2015-05-181-3/+3
| | | | | | | | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -MT mkiss.o -MD -MP -MF .deps/mkiss.Tpo -c -o mkiss.o mkiss.c mkiss.c: In function ‘main’: mkiss.c:469:4: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ mkiss.c:475:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ mkiss.c:480:3: error: format not a string literal and no format arguments [-Werror=format-security] fprintf(stderr, usage_string); ^ cc1: some warnings being treated as errors The strings are constants in the application code itself so no security issues. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axparms: Fix harmless -Werror=format-security build error.Ralf Baechle2015-05-181-1/+1
| | | | | | | | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -MT axparms.o -MD -MP -MF .deps/axparms.Tpo -c -o axparms.o axparms.c axparms.c: In function ‘routes’: axparms.c:142:4: error: format not a string literal and no format arguments [-Werror=format-security] printf(routebuf); ^ axparms.c: In function ‘associate’: axparms.c:189:3: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] fgets(buffer, 80, fp); ^ cc1: some warnings being treated as errors Makefile:570: recipe for target 'axparms.o' failed make[3]: *** [axparms.o] Error 1 Note that routebuf has been read from /procfs so should be safe. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Ignore "compile" file.Ralf Baechle2015-05-181-0/+1
| | | | | | | | | | | | automake 1.14 will install this file into the top directory with "automake --add-missing" and complain if it's missing: $ automake configure.ac:10: error: required file './compile' not found configure.ac:10: 'automake --add-missing' can install 'compile' $ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ROSE: Add back installconf rule.Ralf Baechle2015-05-181-0/+1
| | | | | | | | | | | | | | Without this dummy rule, make installconf failes in the rose subdir with: [...] make[1]: Entering directory `/home/ralf/src/ax25/ax25-tools/rose' make[1]: *** No rule to make target `installconf'. Stop. make[1]: Leaving directory `/home/ralf/src/ax25/ax25-tools/rose' [...] This bug exists since 0.0.3 and predates the CVS history. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* automake: Replace use of deprecated automake macro INCLUDES.Ralf Baechle2015-05-178-16/+16
| | | | | | | | | | | | | | | | | This fixes the automake warnings: 6pack/Makefile.am:10: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') Makefile.am:9: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') ax25/Makefile.am:26: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') hdlcutil/Makefile.am:16: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') kiss/Makefile.am:11: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') netrom/Makefile.am:28: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') rose/Makefile.am:15: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') tcpip/Makefile.am:27: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') INCLUDES has been deprecated since automake 1.5. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* axspawn: Remove unused variable command.Ralf Baechle2015-05-071-1/+0
| | | | | | | | | | | | | gcc -DHAVE_CONFIG_H -I. -I.. -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25 _LOCALSTATEDIR=\""/usr/local/var/ax25/"\" -g -O2 -Wall -MT axspawn.o -MD -MP -MF .deps/axspawn.Tpo -c -o axspawn.o axspawn.c [...] axspawn.c:1049:7: warning: unused variable ‘command’ [-Wunused-variable] char command[1024]; ^ [...] Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Ignore *~ files.Ralf Baechle2015-05-021-0/+1
| | | | | | These are just editor backup files and don't provide any useful content. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* Merge branch 'master' of git://git.linux-ax25.org/pub/scm/ralf/ax25-toolsRalf Baechle2015-05-0295-3949/+3896
|\ | | | | | | | | Conflicts: ax25/axspawn.c
| * axgetput: Use shifts instead of a silly table to compute bitmask.Ralf Baechle2013-06-171-3/+1
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * axgetput: Simplify do_crc() a bit.Ralf Baechle2013-06-171-2/+1
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * axgetput: Use calc_crc() to simplify CRC calculations.Ralf Baechle2013-06-171-11/+4
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * axgetput: Provide calc_crc() function to iterate over memory area.Ralf Baechle2013-06-171-0/+8
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * axgetput: Get rid of unused length argument of do_crc().Ralf Baechle2013-06-171-4/+4
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Insert space between `)' and a following `{'.Ralf Baechle2013-06-172-2/+2
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Reformat consistently. Strictly whitespace changes only.Ralf Baechle2013-06-1735-2548/+2548
| | | | | | | | | | | | | | Indentation by tabs only. Move case labels in switches are on the same level as the switch keyword. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Remove pointless return statements at the end of void functions.Ralf Baechle2013-06-173-3/+0
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Always have a space between if, for, switch, while and the following `('.Ralf Baechle2013-06-1710-29/+29
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Remove parenthesis around arguments of return statements.Ralf Baechle2013-06-176-19/+19
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Use tabs for indentation, not spaces.Ralf Baechle2013-06-1731-560/+560
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Remove useless initializations to 0 or NULL.Ralf Baechle2013-06-1719-59/+59
| | | | | | | | | | | | | | They only inflate the .data section of the binary. Initializations to FALSE are still left to do. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Nuke trailing whitespace.Ralf Baechle2013-06-1776-767/+767
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Nuke trailing blank lines.Ralf Baechle2013-06-1722-35/+0
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
| * Use dist_ prefix in Makefile.am rather than EXTRA_DIST where possible.Ralf Baechle2013-06-1711-32/+19
| | | | | | | | Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | Fix typo SIOCAX25CTLCON in perror()Thomas Osterried2015-05-011-1/+1
| | | | | | | | Signed-off-by: Thomas Osterried <thomas@osterried.de>
* | Signed-off-by: Thomas Osterried <ax25@x-berg.in-berlin.de>Thomas Osterried2015-05-011-1/+1
| | | | | | | | | | | | | | | | | | Security patch submitted by Jaroslav Skarvada <jskarvad@redhat.com> Netrom and ROSE Addresses are copied to Node. Room was enough for Netrom, but rose addresses returned by rose_ntoa() are one byte longer (a 10 bytes string plus null-termination) which lead to an buffer overflow.
* | The current linux kernel has no limit anymore for the number of netromThomas Osterried2015-05-012-2/+4
| | | | | | | | | | | | and rose devices (previously 4 netrom, 6 rose). Thanks to Jaroslav, OK2JRQ for the patch
* | Provide defaults for user_shell if unset.Thomas Osterried2015-05-012-2/+8
| | | | | | | | | | | | | | | | | | The user_shell config variable is optional. If not specified, /bin/bash is used. Except: if create_with_useradd is configured and there's a config file /etc/default/useradd, then it's not passed to useradd in order to let the user choose. Signed-off-by: Thomas Osterried <ax25@x-berg.in-berlin.de>
* | Found debian wheezy useradd bug: useradd did terminates and eats 100%Thomas Osterried2015-05-011-10/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpu power, if it was called from axspawn. This could be prevented if SIGCHLD is masked. To increase security, no longer call useradd via system() but fork() and execve(). Fixed a bug when useradd failed then the login process continued anyway. Empty lines in axspawn.conf are now valid. The user_shell config variable is optional. If not specified, /bin/bash is used. Except: if create_with_useradd is configured and there's a config file /etc/default/useradd, then it's not passed to useradd in order to let him choose. Signed-off-by: Thomas Osterried <ax25@x-berg.in-berlin.de>
* | Fix: kernel learned qualities < configured worst_qual.Thomas Osterried2015-05-011-3/+3
|/ | | | | | | | First compute the node quality by remotely reported quality * best_quality) + 128) / 256; (the well known algorithm) and afterwards verify if it's < worst_qual. Signed-off-by: Thomas Osterried <thomas@osterried.de>