Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: Makefile
- ===================================================================
- RCS file: /cvs/ports/japanese/canna/Makefile,v
- retrieving revision 1.42
- diff -u -p -r1.42 Makefile
- --- Makefile 11 Mar 2022 19:24:42 -0000 1.42
- +++ Makefile 4 Dec 2022 04:20:12 -0000
- @@ -10,7 +10,7 @@ PKGNAME-server= cannaserver-3.5b2
- REVISION-main = 6
- REVISION-dict = 1
- -REVISION-server = 8
- +REVISION-server = 9
- SHARED_LIBS= RKC 1.0 \
- RKC16 1.0 \
- Index: patches/patch-server_misc_c
- ===================================================================
- RCS file: /cvs/ports/japanese/canna/patches/patch-server_misc_c,v
- retrieving revision 1.2
- diff -u -p -r1.2 patch-server_misc_c
- --- patches/patch-server_misc_c 11 Mar 2022 19:24:42 -0000 1.2
- +++ patches/patch-server_misc_c 4 Dec 2022 04:20:12 -0000
- @@ -1,5 +1,19 @@
- ---- server/misc.c.orig Mon Jul 3 17:58:30 2000
- -+++ server/misc.c Mon Jul 3 18:01:42 2000
- +--- server/misc.c.orig Wed Nov 27 16:30:30 1996
- ++++ server/misc.c Sun Dec 4 06:35:49 2022
- +@@ -471,5 +471,5 @@ CreateAccessControlList()
- + hp = gethostbyname(MyName);
- + if (hp) {
- +- MyAddr = *(unsigned long *)(hp->h_addr);
- ++ MyAddr = *(unsigned int *)(hp->h_addr);
- + }
- +
- +@@ -527,5 +527,5 @@ CreateAccessControlList()
- + continue;
- + }
- +- current->hostaddr = *(unsigned long *)(hp->h_addr);
- ++ current->hostaddr = *(unsigned int *)(hp->h_addr);
- + /* 複数のアドレスが入っていることに対応していないなあ */
- +
- @@ -650,17 +650,19 @@ int cxnum ;
- if (client->username && client->username[0]) {
- if (client->groupname && client->groupname[0]) {
- Index: patches/patch-server_wconvert_c
- ===================================================================
- RCS file: /cvs/ports/japanese/canna/patches/patch-server_wconvert_c,v
- retrieving revision 1.2
- diff -u -p -r1.2 patch-server_wconvert_c
- --- patches/patch-server_wconvert_c 11 Mar 2022 19:24:42 -0000 1.2
- +++ patches/patch-server_wconvert_c 4 Dec 2022 04:20:12 -0000
- @@ -1,12 +1,40 @@
- ---- server/wconvert.c.orig Wed Nov 27 02:27:28 1996
- -+++ server/wconvert.c Wed Mar 12 14:59:07 2003
- +--- server/wconvert.c.orig Wed Nov 27 16:27:28 1996
- ++++ server/wconvert.c Sun Dec 4 10:24:46 2022
- @@ -101,4 +101,5 @@ extern reqproc ExtensionWideVector[];
- extern void DispDebug() ;
- +extern const Ushort *ushortmemchr pro((const Ushort *, int, size_t));
- extern int canna_server_hi ;
- extern int canna_server_lo ;
- -@@ -1323,5 +1324,8 @@ ClientPtr *clientp ;
- +@@ -668,4 +669,10 @@ irw_killserver(clientp)
- + }
- +
- ++ cli_hostaddr = client->hostaddr;
- ++ if (!cli_hostaddr){
- ++ /* unixドメインの場合(0)、通過ok */
- ++ goto finalize;
- ++ }
- ++
- + /* サーバ側のホストアドレスの取得 成功(0) */
- + if (gethostname(buf, sizeof(buf)) < 0){
- +@@ -676,9 +683,7 @@ irw_killserver(clientp)
- + goto not_addr;
- + }
- +- ser_hostaddr = *(unsigned long *)(ser->h_addr);
- +- cli_hostaddr = client->hostaddr;
- ++ ser_hostaddr = *(unsigned int *)(ser->h_addr);
- +
- + /* アドレスの比較 */
- +- if (cli_hostaddr) /* unixドメインの場合(0)、通過ok */
- + if (cli_hostaddr != ser_hostaddr){
- + not_addr:
- +@@ -688,4 +693,5 @@ irw_killserver(clientp)
- +
- + /* 終了処理 */
- ++finalize:
- + RkwFinalize();
- + SendType2Reply(client, wKillServer, !EXTPROTO, 0);
- +@@ -1323,5 +1329,8 @@ ClientPtr *clientp ;
- int cxnum = Request.type18.context, stat = -1;
- int requestsize = Request.type18.size, retval;
- + size_t datasize = Request.type18.datalen - SIZEOFSHORT * 2;
- @@ -15,13 +43,13 @@
- + goto protoerr;
- if (validcontext(cxnum, client, wListDictionary)) {
- if (requestsize <= sizeof(local_buffer) ||
- -@@ -1360,4 +1364,5 @@ ClientPtr *clientp ;
- +@@ -1360,4 +1369,5 @@ ClientPtr *clientp ;
- }
- +protoerr:
- retval = SendType6Reply(client, wListDictionary, EXTPROTO, stat,
- dicnames, namesize(dicnames, stat));
- -@@ -1471,8 +1476,13 @@ ClientPtr *clientp ;
- +@@ -1471,8 +1481,13 @@ ClientPtr *clientp ;
- int cxnum = Request.type18.context, stat = BADCONT;
- int dirlen, requestsize = Request.type18.size, retval;
- + size_t datasize = Request.type18.datalen - SIZEOFSHORT * 2;
- @@ -35,13 +63,13 @@
- + goto protoerr;
- dicname = &(req->data[dirlen]) ;
- if (dirlen > 1) {
- -@@ -1516,4 +1526,5 @@ ClientPtr *clientp ;
- +@@ -1516,4 +1531,5 @@ ClientPtr *clientp ;
- }
- }
- +protoerr:
- retval = SendType7Reply(client, wGetWordTextDictionary, EXTPROTO,
- stat, stat > 0 ? stat + 1 : 0, infobuf);
- -@@ -2097,10 +2108,10 @@ ClientPtr *clientp;
- +@@ -2097,10 +2113,10 @@ ClientPtr *clientp;
- if (validcontext(cxnum, client, wThrough)) {
- - buf = malloc((int)Request.type20.bufsize);
- @@ -55,7 +83,7 @@
- + buf, content_size, content_size);
- }
- }
- -@@ -2297,4 +2308,7 @@ BYTE *buf ;
- +@@ -2297,4 +2313,7 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq1 start!!\n") );
- + if (Request.type1.datalen != 0)
- @@ -63,28 +91,28 @@
- +
- return( 0 ) ;
- }
- -@@ -2306,4 +2320,6 @@ BYTE *buf ;
- +@@ -2306,4 +2325,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq2 start!!\n") );
- + if (Request.type2.datalen != SIZEOFSHORT)
- + return( -1 );
- buf += HEADER_SIZE; Request.type2.context = S2TOS(buf);
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type2.context) );
- -@@ -2318,4 +2334,6 @@ BYTE *buf ;
- +@@ -2318,4 +2339,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq3 start!!\n") );
- + if (Request.type3.datalen != SIZEOFSHORT * 2)
- + return( -1 );
- buf += HEADER_SIZE; Request.type3.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type3.buflen = S2TOS(buf);
- -@@ -2335,4 +2353,6 @@ BYTE *buf ;
- +@@ -2335,4 +2358,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq4 start!!\n") );
- + if (Request.type4.datalen < SIZEOFSHORT * 4)
- + return( -1 );
- buf += HEADER_SIZE; Request.type4.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type4.begin = S2TOS(buf);
- -@@ -2340,5 +2360,9 @@ BYTE *buf ;
- +@@ -2340,5 +2365,9 @@ BYTE *buf ;
- buf += SIZEOFSHORT; Request.type4.yomilen = S2TOS(buf);
- Request.type4.yomi = (Ushort *)(buf += SIZEOFSHORT) ;
- - len = Request.type4.datalen - SIZEOFSHORT * 4;
- @@ -95,42 +123,42 @@
- + return( -1 );
- for (data = Request.type4.yomi, i = 0; i < len; i++, data++)
- *data = ntohs((unsigned short)*data); /* ちょっとやだなあ */
- -@@ -2360,4 +2384,6 @@ BYTE *buf ;
- +@@ -2360,4 +2389,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq5 start!!\n") );
- + if (Request.type5.datalen != SIZEOFSHORT * 2 + SIZEOFINT)
- + return( -1 );
- buf += HEADER_SIZE; Request.type5.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type5.size = S2TOS(buf);
- -@@ -2376,4 +2402,6 @@ BYTE *buf ;
- +@@ -2376,4 +2407,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq6 start!!\n") );
- + if (Request.type6.datalen != SIZEOFSHORT * 3)
- + return( -1 );
- buf += HEADER_SIZE; Request.type6.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type6.number = S2TOS(buf);
- -@@ -2392,4 +2420,6 @@ BYTE *buf ;
- +@@ -2392,4 +2425,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq7 start!!\n") );
- + if (Request.type7.datalen != SIZEOFSHORT * 3)
- + return( -1 );
- buf += HEADER_SIZE; Request.type7.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type7.number = S2TOS(buf);
- -@@ -2408,4 +2438,6 @@ BYTE *buf ;
- +@@ -2408,4 +2443,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq8 start!!\n") );
- + if (Request.type8.datalen != SIZEOFSHORT * 4)
- + return( -1 );
- buf += HEADER_SIZE; Request.type8.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type8.curbun = S2TOS(buf);
- -@@ -2426,4 +2458,6 @@ BYTE *buf ;
- +@@ -2426,4 +2463,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq9 start!!\n") );
- + if (Request.type9.datalen != SIZEOFSHORT * 4)
- + return( -1 );
- buf += HEADER_SIZE; Request.type9.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type9.number = S2TOS(buf);
- -@@ -2443,7 +2477,11 @@ BYTE *buf ;
- +@@ -2443,7 +2482,11 @@ BYTE *buf ;
- {
- register int i ;
- + int rest;
- @@ -142,14 +170,14 @@
- + return( -1 );
- buf += HEADER_SIZE; Request.type10.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type10.number = S2TOS(buf);
- -@@ -2453,4 +2491,6 @@ BYTE *buf ;
- +@@ -2453,4 +2496,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "req->mode =%d\n", Request.type10.mode) );
- + if (rest != Request.type10.number * SIZEOFSHORT)
- + return( -1 );
- buf += SIZEOFINT; Request.type10.kouho = (short *)buf; /* short? */
- for (i = 0; i < Request.type10.number; i++) {
- -@@ -2469,10 +2509,16 @@ BYTE *buf ;
- +@@ -2469,10 +2514,16 @@ BYTE *buf ;
- int i, len ;
- - ir_debug( Dmsg(10, "ProcWideReq10 start!!\n") );
- @@ -167,7 +195,7 @@
- + return( -1 );
- for (data = Request.type11.yomi, i = 0; i < len; i++, data++)
- *data = ntohs( *data ); /* なんかやだ */
- -@@ -2491,14 +2537,24 @@ BYTE *buf ;
- +@@ -2491,14 +2542,24 @@ BYTE *buf ;
- {
- register Ushort *data;
- - int i, len ;
- @@ -193,7 +221,7 @@
- + return( -1 );
- Request.type12.dicname = (char *)buf;
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type12.context) );
- -@@ -2518,22 +2574,35 @@ BYTE *buf ;
- +@@ -2518,22 +2579,35 @@ BYTE *buf ;
- {
- register Ushort *data;
- - int i ,len ;
- @@ -231,7 +259,7 @@
- + return( -1 );
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type13.context) );
- ir_debug( Dmsg(10, "req->dicname =%s\n", Request.type13.dicname) );
- -@@ -2557,4 +2626,7 @@ BYTE *buf ;
- +@@ -2557,4 +2631,7 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq14 start!!\n") );
- + if (Request.type14.datalen <= SIZEOFINT + SIZEOFSHORT
- @@ -239,14 +267,14 @@
- + return( -1 );
- buf += HEADER_SIZE; Request.type14.mode = L4TOL(buf);
- buf += SIZEOFINT; Request.type14.context = S2TOS(buf);
- -@@ -2562,4 +2634,6 @@ BYTE *buf ;
- +@@ -2562,4 +2639,6 @@ BYTE *buf ;
- len = ((int)Request.type14.datalen - SIZEOFSHORT - SIZEOFINT)
- / SIZEOFSHORT;
- + if (Request.type14.yomi[len - 1] != 0)
- + return( -1 );
- for (data = Request.type14.yomi, i = 0; i < len; i++, data++)
- *data = ntohs( *data ); /* なんかやだ */
- -@@ -2578,9 +2652,15 @@ ProcWideReq15(buf)
- +@@ -2578,9 +2657,15 @@ ProcWideReq15(buf)
- BYTE *buf ;
- {
- + int rest;
- @@ -262,7 +290,7 @@
- + return( -1 );
- ir_debug( Dmsg(10, "req->mode =%d\n", Request.type15.mode) );
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type15.context) );
- -@@ -2598,4 +2678,7 @@ BYTE *buf ;
- +@@ -2598,4 +2683,7 @@ BYTE *buf ;
- buf += HEADER_SIZE;
- + if (Request.type17.datalen < SIZEOFCHAR * 2
- @@ -270,14 +298,14 @@
- + return( -1 );
- Request.type17.dicname = (char *)buf;
- Request.type17.mode = (char)*(buf + Request.type17.datalen - SIZEOFCHAR) ;
- -@@ -2614,4 +2697,6 @@ BYTE *buf ;
- +@@ -2614,4 +2702,6 @@ BYTE *buf ;
- ir_debug( Dmsg(10, "ProcWideReq18 start!!\n") );
- + if (Request.type18.datalen < SIZEOFSHORT * 2)
- + return( -1 );
- buf += HEADER_SIZE; Request.type18.context = S2TOS(buf);
- buf += SIZEOFSHORT; Request.type18.data = (char *)buf;
- -@@ -2631,10 +2716,16 @@ ProcWideReq19(buf)
- +@@ -2631,10 +2721,16 @@ ProcWideReq19(buf)
- BYTE *buf ;
- {
- + int rest;
- @@ -294,7 +322,7 @@
- + return( -1 );
- ir_debug( Dmsg(10, "req->context =%d\n", Request.type20.context) );
- ir_debug( Dmsg(10, "req->command =%d\n", Request.type20.command) );
- -@@ -2648,13 +2739,23 @@ ProcWideReq20(buf)
- +@@ -2648,13 +2744,23 @@ ProcWideReq20(buf)
- BYTE *buf ;
- {
- + BYTE *bufend;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement