Subject: kern/4062: inconsistent indentation in procfs_checkioperm()
To: None <gnats-bugs@gnats.netbsd.org>
From: None <enami@but-b.or.jp>
List: netbsd-bugs
Date: 08/30/1997 13:00:47
>Number: 4062
>Category: kern
>Synopsis: inconsistent indentation in procfs_checkioperm()
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Fri Aug 29 21:05:00 1997
>Last-Modified:
>Originator: enami tsugutomo
>Organization:
>Release: NetBSD-current as of 1997 Aug 28
>Environment:
System: NetBSD pavlov.enami.ba2.so-net.or.jp 1.2G NetBSD 1.2G (PAVLOV) #318: Sun Aug 24 10:28:41 JST 1997 enami@pavlov.enami.ba2.so-net.or.jp:/b/netbsd/kernel/compile/PAVLOV i386
>Description:
[ This is completely cosmetic matter. ]
There is an inconsistent indentation in procfs_checkioperm().
In it, the line `ISSET(t->p_flag, P_SUGID)) &&' is lined up to
the start of expression of one line above, but in function
procfs_control() and sys_ptrace(), there is a piece of code
that do same thing, but the same line is indented four space
more. It leads misreading.
>How-To-Repeat:
Compare the above three function.
>Fix:
Here is fix (hoping that tab is not crobbered):
Index: procfs_mem.c
===================================================================
RCS file: /a/cvsroot/NetBSD/src/sys/miscfs/procfs/procfs_mem.c,v
retrieving revision 1.1.1.5
diff -c -r1.1.1.5 procfs_mem.c
*** procfs_mem.c 1997/08/27 14:15:07 1.1.1.5
--- procfs_mem.c 1997/08/30 02:52:09
***************
*** 264,270 ****
* (unless you're root), or...
*/
if ((t->p_cred->p_ruid != p->p_cred->p_ruid ||
! ISSET(t->p_flag, P_SUGID)) &&
(error = suser(p->p_ucred, &p->p_acflag)) != 0)
return (error);
--- 264,270 ----
* (unless you're root), or...
*/
if ((t->p_cred->p_ruid != p->p_cred->p_ruid ||
! ISSET(t->p_flag, P_SUGID)) &&
(error = suser(p->p_ucred, &p->p_acflag)) != 0)
return (error);
>Audit-Trail:
>Unformatted: