Fri, 07 Sep 2012 19:08:07 +0200
Correct build configuration in Solaris subdir, correct english grammar,
remove irrelevant strip notice, introduce custom CFLAG logic, facilitate
use of Solaris Studio compiler with needed build configuration
adjustments, conditionally build 64 bit position independent code,
and accommodate tun(7) in newer Solaris releases by renaming driver
and module from conflicting 'tun' to 'vtun'. These changes include
some nonstandard 'I give up' logic causing out of tree builds by
manipulating the PATH, for example.
michael@482 | 1 | Index: Makefile.in |
michael@482 | 2 | --- Makefile.in.orig 2005-11-07 19:38:27 +0100 |
michael@482 | 3 | +++ Makefile.in 2005-11-07 19:38:52 +0100 |
michael@482 | 4 | @@ -152,7 +152,7 @@ |
michael@482 | 5 | @-for i in otp-md4 otp-md5; do ln -s opiekey.1 $(LOCALMAN)/man1/$$i.1; done |
michael@482 | 6 | @if test ! -d $(LOCALMAN)/man1; then $(MKDIR) $(LOCALMAN)/man1; chmod 755 $(LOCALMAN)/man1; fi; cp opiekey.1 $(LOCALMAN)/man1/opiekey.1; $(CHOWN) $(OWNER) $(LOCALMAN)/man1/opiekey.1; chgrp $(GROUP) $(LOCALMAN)/man1/opiekey.1; chmod 644 $(LOCALMAN)/man1/opiekey.1 |
michael@482 | 7 | |
michael@482 | 8 | -server: libopie/libopie.a libmissing/libmissing.a opietest-passed opielogin opiesu opiepasswd opieinfo opieftpd opieserv |
michael@482 | 9 | +server: libopie/libopie.a libmissing/libmissing.a opietest-passed opielogin opiesu opiepasswd opieinfo opieserv |
michael@482 | 10 | |
michael@482 | 11 | server-install: server |
michael@482 | 12 | @echo "Installing OPIE server software..." |
michael@482 | 13 | Index: libopie/atob8.c |
michael@482 | 14 | --- libopie/atob8.c.orig 1999-03-11 03:09:57 +0100 |
michael@482 | 15 | +++ libopie/atob8.c 2005-11-07 19:39:30 +0100 |
michael@482 | 16 | @@ -72,5 +72,5 @@ |
michael@482 | 17 | *out++ |= val; |
michael@482 | 18 | } |
michael@482 | 19 | |
michael@482 | 20 | - return out; |
michael@482 | 21 | + return (char *)out; |
michael@482 | 22 | } |
michael@482 | 23 | Index: opie_cfg.h |
michael@482 | 24 | --- opie_cfg.h.orig 2001-11-20 17:23:37 +0100 |
michael@482 | 25 | +++ opie_cfg.h 2005-11-07 19:39:05 +0100 |
michael@482 | 26 | @@ -69,6 +69,9 @@ |
michael@482 | 27 | #define DOUTMPX 0 |
michael@482 | 28 | #endif /* HAVE_GETUTXLINE && HAVE_UTMPX_H */ |
michael@482 | 29 | |
michael@482 | 30 | +#include <stdlib.h> |
michael@482 | 31 | +#include <stdio.h> |
michael@482 | 32 | +#include <string.h> |
michael@482 | 33 | #include <sys/types.h> |
michael@482 | 34 | /* Adapted from the Autoconf hypertext info pages */ |
michael@482 | 35 | #if HAVE_DIRENT_H |
michael@482 | 36 | Index: libopie/generator.c |
michael@482 | 37 | --- libopie/generator.c.orig 2006-06-18 02:06:28.215630000 +0200 |
michael@482 | 38 | +++ libopie/generator.c 2006-06-18 02:06:15.049431000 +0200 |
michael@482 | 39 | @@ -62,7 +62,7 @@ |
michael@482 | 40 | static int opieauto_connect FUNCTION_NOARGS |
michael@482 | 41 | { |
michael@482 | 42 | int s; |
michael@482 | 43 | - struct sockaddr_un sun; |
michael@482 | 44 | + struct sockaddr_un locsun; |
michael@482 | 45 | char buffer[1024]; |
michael@482 | 46 | char *c, *c2 ="/.opieauto"; |
michael@482 | 47 | uid_t myuid = getuid(), myeuid = geteuid(); |
michael@482 | 48 | @@ -74,8 +74,8 @@ |
michael@482 | 49 | return -1; |
michael@482 | 50 | }; |
michael@482 | 51 | |
michael@482 | 52 | - memset(&sun, 0, sizeof(struct sockaddr_un)); |
michael@482 | 53 | - sun.sun_family = AF_UNIX; |
michael@482 | 54 | + memset(&locsun, 0, sizeof(struct sockaddr_un)); |
michael@482 | 55 | + locsun.sun_family = AF_UNIX; |
michael@482 | 56 | |
michael@482 | 57 | if (!(c = getenv("HOME"))) { |
michael@482 | 58 | #if DEBUG |
michael@482 | 59 | @@ -84,15 +84,15 @@ |
michael@482 | 60 | return -1; |
michael@482 | 61 | }; |
michael@482 | 62 | |
michael@482 | 63 | - if (strlen(c) > (sizeof(sun.sun_path) - strlen(c2) - 1)) { |
michael@482 | 64 | + if (strlen(c) > (sizeof(locsun.sun_path) - strlen(c2) - 1)) { |
michael@482 | 65 | #if DEBUG |
michael@482 | 66 | syslog(LOG_DEBUG, "opieauto_connect: HOME is too long: %s", c); |
michael@482 | 67 | #endif /* DEBUG */ |
michael@482 | 68 | return -1; |
michael@482 | 69 | }; |
michael@482 | 70 | |
michael@482 | 71 | - strcpy(sun.sun_path, c); |
michael@482 | 72 | - strcat(sun.sun_path, c2); |
michael@482 | 73 | + strcpy(locsun.sun_path, c); |
michael@482 | 74 | + strcat(locsun.sun_path, c2); |
michael@482 | 75 | |
michael@482 | 76 | if ((s = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { |
michael@482 | 77 | #if DEBUG |
michael@482 | 78 | @@ -104,14 +104,14 @@ |
michael@482 | 79 | { |
michael@482 | 80 | struct stat st; |
michael@482 | 81 | |
michael@482 | 82 | - if (stat(sun.sun_path, &st) < 0) { |
michael@482 | 83 | + if (stat(locsun.sun_path, &st) < 0) { |
michael@482 | 84 | #if DEBUG |
michael@482 | 85 | syslog(LOG_DEBUG, "opieauto_connect: stat: %s(%d)\n", strerror(errno), errno); |
michael@482 | 86 | #endif /* DEBUG */ |
michael@482 | 87 | goto ret; |
michael@482 | 88 | }; |
michael@482 | 89 | |
michael@482 | 90 | - if (connect(s, (struct sockaddr *)&sun, sizeof(struct sockaddr_un))) { |
michael@482 | 91 | + if (connect(s, (struct sockaddr *)&locsun, sizeof(struct sockaddr_un))) { |
michael@482 | 92 | #if DEBUG |
michael@482 | 93 | syslog(LOG_DEBUG, "opieauto_connect: connect: %s(%d)\n", strerror(errno), errno); |
michael@482 | 94 | #endif /* DEBUG */ |
michael@482 | 95 | Index: opieauto.c |
michael@482 | 96 | --- opieauto.c.orig 2001-11-20 16:18:42.000000000 +0100 |
michael@482 | 97 | +++ opieauto.c 2006-06-18 02:28:20.526432000 +0200 |
michael@482 | 98 | @@ -282,10 +282,10 @@ |
michael@482 | 99 | baile("atexit"); |
michael@482 | 100 | |
michael@482 | 101 | { |
michael@482 | 102 | - struct sockaddr_un sun; |
michael@482 | 103 | + struct sockaddr_un locsun; |
michael@482 | 104 | |
michael@482 | 105 | - memset(&sun, 0, sizeof(struct sockaddr_un)); |
michael@482 | 106 | - sun.sun_family = AF_UNIX; |
michael@482 | 107 | + memset(&locsun, 0, sizeof(struct sockaddr_un)); |
michael@482 | 108 | + locsun.sun_family = AF_UNIX; |
michael@482 | 109 | |
michael@482 | 110 | { |
michael@482 | 111 | char *c; |
michael@482 | 112 | @@ -294,12 +294,12 @@ |
michael@482 | 113 | if (!(c = getenv("HOME"))) |
michael@482 | 114 | bail("getenv(HOME) failed -- no HOME variable?"); |
michael@482 | 115 | |
michael@482 | 116 | - if (strlen(c) > (sizeof(sun.sun_path) - strlen(c2) - 1)) |
michael@482 | 117 | + if (strlen(c) > (sizeof(locsun.sun_path) - strlen(c2) - 1)) |
michael@482 | 118 | bail("your HOME is too long"); |
michael@482 | 119 | |
michael@482 | 120 | - strcpy(sun.sun_path, c); |
michael@482 | 121 | - strcat(sun.sun_path, c2); |
michael@482 | 122 | - sockpath = strdup(sun.sun_path); |
michael@482 | 123 | + strcpy(locsun.sun_path, c); |
michael@482 | 124 | + strcat(locsun.sun_path, c2); |
michael@482 | 125 | + sockpath = strdup(locsun.sun_path); |
michael@482 | 126 | }; |
michael@482 | 127 | |
michael@482 | 128 | if ((parents = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) |
michael@482 | 129 | @@ -311,7 +311,7 @@ |
michael@482 | 130 | if (umask(0177) < 0) |
michael@482 | 131 | baile("umask"); |
michael@482 | 132 | |
michael@482 | 133 | - if (bind(parents, (struct sockaddr *)&sun, sizeof(struct sockaddr_un))) |
michael@482 | 134 | + if (bind(parents, (struct sockaddr *)&locsun, sizeof(struct sockaddr_un))) |
michael@482 | 135 | baile("bind"); |
michael@482 | 136 | |
michael@482 | 137 | if (stat(sockpath, &st) < 0) |