Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Nov 1998 11:50:17 +0600
From:      "Nickolay N. Dudorov" <nnd@itfs.nsk.su>
To:        FreeBSD-gnats-submit@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/8756: 'pw' command additional feature request
Message-ID:  <19981119115017.A19054@itfs.nsk.su>
In-Reply-To: <199811190540.VAA11892@freefall.freebsd.org>; from FreeBSD-gnats-submit@FreeBSD.ORG on Wed, Nov 18, 1998 at 09:40:01PM -0800
References:  <199811190535.LAA17771@nnd.itfs.nsk.su> <199811190540.VAA11892@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
	I am very-very-very sorry, but there was incorrect
patch included in my PR. Here is the correct one:


diff -rubN pw/cpdir.c pw.new/cpdir.c
--- pw/cpdir.c	Fri Oct 10 13:23:30 1997
+++ pw.new/cpdir.c	Thu Nov 19 11:44:48 1998
@@ -80,6 +80,7 @@
 						if (S_ISDIR(st.st_mode)) {	/* Recurse for this */
 							if (strcmp(e->d_name, ".") != 0 && strcmp(e->d_name, "..") != 0)
 								copymkdir(dst, src, (st.st_mode & 0777), uid, gid);
+								chflags(dst, st.st_flags);
 							/*
 							 * Note: don't propogate 'special' attributes
 							 */
@@ -98,8 +99,9 @@
 								while ((b = read(infd, copybuf, 4096)) > 0)
 									write(outfd, copybuf, b);
 								close(infd);
+								fchown(outfd, uid, gid);
+								fchflags(outfd, st.st_flags);
 								close(outfd);
-								chown(dst, uid, gid);
 							}
 						}
 					}

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?19981119115017.A19054>