Date: Thu, 23 Feb 2006 19:38:33 +0800 (CST) From: Sunpoet Po-Chuan Hsieh <sunpoet@sunpoet.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/93743: [net/csup] patch file is reject to apply on 20060223 snapshot Message-ID: <20060223113833.9291F1701B@sunpoet.net> Resent-Message-ID: <200602231140.k1NBe883006744@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 93743 >Category: ports >Synopsis: [net/csup] patch file is reject to apply on 20060223 snapshot >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Feb 23 11:40:03 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Sunpoet Po-Chuan Hsieh >Release: FreeBSD 6.0-STABLE i386 >Organization: SUNPOET.net >Environment: System: FreeBSD IRIS.sunpoet.net 6.0-STABLE FreeBSD 6.0-STABLE #5: Sat Dec 31 08:36:20 CST 2005 sunpoet@IRIS.sunpoet.net:/usr/obj/usr/src/sys/sunpoet i386 >Description: Patch file (files/patch-proto.c) is rejected to apply on 20060223 snapshot. % make ===> Vulnerability check disabled, database not found ===> Extracting for csup-20060223_1 => MD5 Checksum OK for csup-snap-20060223.tgz. => SHA256 Checksum OK for csup-snap-20060223.tgz. ===> Patching for csup-20060223_1 ===> Applying FreeBSD patches for csup-20060223_1 1 out of 8 hunks failed--saving rejects to proto.c.rej => Patch patch-proto.c failed to apply cleanly. *** Error code 1 Stop in /usr/ports/net/csup. >How-To-Repeat: Build net/csup. >Fix: Replace the files/patch-proto.c with the following one. % cat files/patch-proto.c --- proto.c.orig Thu Feb 23 07:29:02 2006 +++ proto.c Thu Feb 23 19:26:21 2006 @@ -196,15 +196,15 @@ if (msg == NULL) goto bad; lprintf(-1, "Rejected by server: %s\n", msg); - return (-1); + return (STATUS_TRANSIENTFAILURE); } else goto bad; lprintf(2, "Server software version: %s\n", swver != NULL ? swver : "."); - return (0); + return (STATUS_SUCCESS); bad: lprintf(-1, "Invalid greeting from server\n"); - return (-1); + return (STATUS_FAILURE); } /* Negotiate protocol version with the server. */ @@ -236,12 +236,12 @@ if (maj != PROTO_MAJ || min != PROTO_MIN) { lprintf(-1, "Server protocol version %d.%d not supported " "by client\n", maj, min); - return (1); + return (STATUS_FAILURE); } - return (0); + return (STATUS_SUCCESS); bad: lprintf(-1, "Invalid PROTO command from server\n"); - return (1); + return (STATUS_FAILURE); } static int @@ -265,24 +265,24 @@ if (strcmp(realm, ".") != 0 || strcmp(challenge, ".") != 0) { lprintf(-1, "Authentication required by the server and not " "supported by client\n"); - return (1); + return (STATUS_FAILURE); } proto_printf(s, "AUTHMD5 . . .\n"); stream_flush(s); line = stream_getln(s, NULL); cmd = proto_get_ascii(&line); if (strcmp(cmd, "OK") == 0) - return (0); + return (STATUS_SUCCESS); if (strcmp(cmd, "!") == 0) { msg = proto_get_rest(&line); if (msg == NULL) goto bad; lprintf(-1, "Server error: %s\n", msg); - return (1); + return (STATUS_FAILURE); } bad: lprintf(-1, "Invalid server reply to AUTHMD5\n"); - return (1); + return (STATUS_FAILURE); } /* @@ -327,10 +327,10 @@ if (line == NULL || strcmp(line, ".") != 0) goto bad; memcpy(config->fasupport, support, sizeof(config->fasupport)); - return (0); + return (STATUS_SUCCESS); bad: lprintf(-1, "Protocol error negotiating attribute support\n"); - return (1); + return (STATUS_FAILURE); } /* @@ -422,10 +422,10 @@ if (line == NULL) goto bad; } - return (0); + return (STATUS_SUCCESS); bad: lprintf(-1, "Protocol error during collection exchange\n"); - return (1); + return (STATUS_FAILURE); } static struct mux * @@ -482,7 +482,7 @@ struct killer killer; struct threads *workers; struct mux *m; - int error, i, status; + int i, status; /* * We pass NULL for the close() function because we'll reuse @@ -490,17 +490,17 @@ */ config->server = stream_open_fd(config->socket, stream_read_fd, stream_write_fd, NULL); - error = proto_greet(config); - if (!error) - error = proto_negproto(config); - if (!error) - error = proto_login(config); - if (!error) - error = proto_fileattr(config); - if (!error) - error = proto_xchgcoll(config); - if (error) - return (STATUS_FAILURE); + status = proto_greet(config); + if (status == STATUS_SUCCESS) + status = proto_negproto(config); + if (status == STATUS_SUCCESS) + status = proto_login(config); + if (status == STATUS_SUCCESS) + status = proto_fileattr(config); + if (status == STATUS_SUCCESS) + status = proto_xchgcoll(config); + if (status != STATUS_SUCCESS) + return (status); /* Multi-threaded action starts here. */ m = proto_mux(config); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060223113833.9291F1701B>