Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Apr 2000 13:50:03 -0700 (PDT)
From:      Jin Guojun (FTG staff) <jin@george.lbl.gov>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/17847: mv symbolic link cross partition fails
Message-ID:  <200004072050.NAA94505@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/17847; it has been noted by GNATS.

From: Jin Guojun (FTG staff) <jin@george.lbl.gov>
To: dwmalone@maths.tcd.ie
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/17847: mv symbolic link cross partition fails
Date: Fri, 7 Apr 2000 13:43:02 -0700 (PDT)

 Yes, following patch fixed the problem.
 Shall we apply the patch and close the case?
 
 Thanks,
 
 	-Jin
 
 --------- original message ------
 >       If every one agree this incorrect, I can trace down the code to
 >       find a patch.
 
 This sounds like a bug, as it doesn't do the same thing as mving
 a symlink on a local partition would. If the file the symlink points
 to is a regular file you'll end up getting a copy of that instead
 of the symlink.
 
 Digital Unix and Linux also do the same "correct" thing as solaris.
 
 It looks like mv has a stat, which should be an lstat. The included
 patch seems to fix it.
 
 BTW - for some strange reason your PR seems to be marked as
 confidential on the web site.
 
         David.
 
 --- mv.c	Fri Apr  7 20:19:19 2000
 +++ mv.c.orig	Fri Apr  7 20:19:45 2000
 @@ -221,7 +221,7 @@
  	 * it's a regular file, do the copy internally; otherwise, use
  	 * cp and rm.
  	 */
 -	if (lstat(from, &sb)) {
 +	if (stat(from, &sb)) {
  		warn("%s", from);
  		return (1);
  	}
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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