From owner-freebsd-current Fri Dec 7 18:58:27 2001 Delivered-To: freebsd-current@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id CC48637B419 for ; Fri, 7 Dec 2001 18:58:23 -0800 (PST) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.6/8.11.5) with SMTP id fB82w7558714; Fri, 7 Dec 2001 21:58:08 -0500 (EST) (envelope-from arr@FreeBSD.org) X-Authentication-Warning: fledge.watson.org: arr owned process doing -bs Date: Fri, 7 Dec 2001 21:58:07 -0500 (EST) From: "Andrew R. Reiter" X-Sender: arr@fledge.watson.org To: David Hill Cc: freebsd-current@FreeBSD.org Subject: Re: write.c patch In-Reply-To: <20011207205304.2973406c.david@phobia.ms> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG -audit might be a more appropriate list for this. On Fri, 7 Dec 2001, David Hill wrote: :On Mon, 3 Dec 2001 17:48:43 +0000 :David Hill wrote: : :> This patch was done on -CURRENT. :> :> It is both pasted and attached to this message. :> :> Thanks :> David :> :> :> --- write.c.orig Mon Dec 3 17:42:45 2001 :> +++ write.c Mon Dec 3 17:45:22 2001 :> @@ -190,8 +190,7 @@ :> while (read(ufd, (char *) &u, sizeof(u)) == sizeof(u)) :> if (strncmp(user, u.ut_name, sizeof(u.ut_name)) == 0) { :> ++nloggedttys; :> - (void)strncpy(atty, u.ut_line, UT_LINESIZE); :> - atty[UT_LINESIZE] = '\0'; :> + (void)strlcpy(atty, u.ut_line, UT_LINESIZE); :> if (term_chk(atty, &msgsok, &atime, 0)) :> continue; /* bad term? skip */ :> if (myuid && !msgsok) :> @@ -240,7 +239,7 @@ :> warn("%s", path); :> return(1); :> } :> - *msgsokP = (s.st_mode & (S_IWRITE >> 3)) != 0; /* group write bit */ :> + *msgsokP = (s.st_mode & S_IWGRP) != 0; /* group write bit */ :> *atimeP = s.st_atime; :> return(0); :> } :> : :Will someone please take a look at this patch? It is for usr.bin/write/write.c :Thanks : :David : : :To Unsubscribe: send mail to majordomo@FreeBSD.org :with "unsubscribe freebsd-current" in the body of the message : -- Andrew R. Reiter arr@watson.org arr@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message