sed diff to honor files' owner/group

Denys Vlasenko vda.linux at googlemail.com
Fri Nov 13 08:09:47 UTC 2009


On Thursday 12 November 2009 17:25, LEVAI Daniel wrote:
> Hi!
> 
> Please consider applying this little snippet:
> 
> --- busybox-1.15.2/editors/sed.c.orig	2009-11-12 17:16:02.928116090 +0100
> +++ busybox-1.15.2/editors/sed.c	2009-11-12 17:15:59.542163334 +0100
> @@ -1344,6 +1344,7 @@
>  
>  			fstat(fileno(file), &statbuf);
>  			fchmod(nonstdoutfd, statbuf.st_mode);
> +			fchown(nonstdoutfd, statbuf.st_uid, statbuf.st_gid);
>  			add_input_file(file);
>  			process_files();
>  			fclose(G.nonstdout);


Apllied, thanks!
--
vda


More information about the busybox mailing list