From owner-freebsd-bugs Wed Oct 3 19:10: 8 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5E89F37B407 for ; Wed, 3 Oct 2001 19:10:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f942A1S55473; Wed, 3 Oct 2001 19:10:01 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D674337B401 for ; 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 To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/31025: link(2)'s man page leaves out reasons for EPERM Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 03 19:10:00 PDT 2001 >Closed-Date: >Last-Modified: >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: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message