From nobody@FreeBSD.org  Wed Oct  3 19:02:10 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id D674337B401
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  3 Oct 2001 19:02:09 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f94228o51628;
	Wed, 3 Oct 2001 19:02:08 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200110040202.f94228o51628@freefall.freebsd.org>
Date: Wed, 3 Oct 2001 19:02:08 -0700 (PDT)
From: Tim Singletary <tsingle@vetinsite.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: link(2)'s man page leaves out reasons for EPERM
X-Send-Pr-Version: www-1.0

>Number:         31025
>Category:       misc
>Synopsis:       link(2)'s man page leaves out reasons for EPERM
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 03 19:10:00 PDT 2001
>Closed-Date:    Sun Oct 14 15:40:21 PDT 2001
>Last-Modified:  Sun Oct 14 15:40:32 PDT 2001
>Originator:     Tim Singletary
>Release:        4.4-RELEASE
>Organization:
Vetinsite
>Environment:
>Description:
Discovered while analyzing why `ln from to' failed with
`Operation not permitted' when the `from' file had the
schg flag set.  ln's failure appears to be correct, but
neither `man 1 ln' nor `man 2 link' explained what was 
happening.
>How-To-Repeat:
Set a file's schg flag and attempt to hard link it to 
another name.
>Fix:
Apply the following diff to /usr/src/lib/libc/sys/link.2

*** link.2      Fri Aug 17 11:42:45 2001
--- newlink.2   Wed Oct  3 21:36:24 2001
***************
*** 118,124 ****
  .It Bq Er EPERM
  The file named by
  .Fa name1
! is a directory.
  .It Bq Er EXDEV
  The link named by
  .Fa name2
--- 118,126 ----
  .It Bq Er EPERM
  The file named by
  .Fa name1
! is a directory or has an immutable or append-only flag set.  
! (See 
! .Xr chflags 1 ) .
  .It Bq Er EXDEV
  The link named by
  .Fa name2
***************
*** 145,150 ****
--- 147,153 ----
  is outside the process's allocated address space.
  .El
  .Sh SEE ALSO
+ .Xr chflags 1 ,
  .Xr readlink 2 ,
  .Xr symlink 2 ,
  .Xr unlink 2

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Sun Oct 14 15:40:21 PDT 2001 
State-Changed-Why:  
Applied, thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31025 
>Unformatted:
