-/* $OpenBSD: biff.c,v 1.14 2015/12/29 19:04:46 gsoares Exp $ */
+/* $OpenBSD: biff.c,v 1.15 2016/07/07 09:26:25 semarie Exp $ */
/* $NetBSD: biff.c,v 1.3 1995/03/26 02:34:22 glass Exp $ */
/*
if (stat(name, &sb))
err(2, "stat");
+ sb.st_mode &= ACCESSPERMS;
+
if (*argv == NULL) {
(void)printf("is %s\n", sb.st_mode & S_IXUSR ? "y" : "n");
exit(sb.st_mode & S_IXUSR ? 0 : 1);
-/* $OpenBSD: mesg.c,v 1.11 2016/01/25 21:59:36 gsoares Exp $ */
+/* $OpenBSD: mesg.c,v 1.12 2016/07/07 09:26:26 semarie Exp $ */
/* $NetBSD: mesg.c,v 1.4 1994/12/23 07:16:32 jtc Exp $ */
/*
if (stat(tty, &sb) < 0)
err(2, "%s", tty);
+ sb.st_mode &= ACCESSPERMS;
+
if (*argv == NULL) {
if (sb.st_mode & S_IWGRP) {
(void)fprintf(stderr, "is y\n");
-/* $OpenBSD: cl_term.c,v 1.25 2016/05/27 09:18:11 martijn Exp $ */
+/* $OpenBSD: cl_term.c,v 1.26 2016/07/07 09:26:26 semarie Exp $ */
/*-
* Copyright (c) 1993, 1994
msgq(sp, M_SYSERR, "%s", tty);
return (1);
}
+ sb.st_mode &= ACCESSPERMS;
/* Save the original status if it's unknown. */
if (clp->tgw == TGW_UNKNOWN)