Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Dec 2001 20:53:04 +0000
From:      David Hill <david@phobia.ms>
To:        David Hill <david@phobia.ms>
Cc:        freebsd-current@freebsd.org
Subject:   Re: write.c patch
Message-ID:  <20011207205304.2973406c.david@phobia.ms>
In-Reply-To: <20011203174843.3ea95a84.david@phobia.ms>
References:  <20011203174843.3ea95a84.david@phobia.ms>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 3 Dec 2001 17:48:43 +0000
David Hill <david@phobia.ms> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011207205304.2973406c.david>